ConnectIQ Simulator Segmentation Fault

Former Member
Former Member
Hello,

The only other mention of a segmentation fault I can find is from the 2.2.1 SDK and was unresolved:
https://forums.garmin.com/forum/deve...ect-iq/145535-

I am using Debian GNU/Linux and after a recent update of the operating system the simulator is not working.

Unfortunately my development setup is a bit of a frankenstein and I can't actually reproduce the segmentation fault within a headless Docker image used for C/I.


I've tested the simulators from 3.0.4 up to 3.0.8, both via Eclipse (which just gives a "failed to connect to the simulator" message) and the Command Line

[FONT=courier new]$ /opt/connectiq-sdk/bin/monkeyc --version
Connect IQ compiler version 3.0.8
$ /opt/connectiq-sdk/bin/simulator
-> message processor init on channel 0
-> message processor init on channel 0
->message processor init on channel 0
->message processor init on channel 0
->message processor init on channel 0
->message processor init on channel 0
->message processor init on channel 0
->message processor init on channel 0
Segmentation fault[/FONT]

Here's the last few lines of [FONT=courier new]strace
clone(child_stack=0x7f835b93ec70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARE NT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f835b93f9d0, tls=0x7f835b93f700, child_tidptr=0x7f835b93f9d0) = 13284[/FONT]
[FONT=courier new]readlink("/proc/self/exe", "/opt/connectiq-sdk/bin/simulator", 4095) = 32
futex(0x43f0b00, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x43f0ab0, FUTEX_WAKE_PRIVATE, 1) = 1
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8ffffffff} ---
+++ killed by SIGSEGV +++
Segmentation fault[/FONT]


Running the simulator in GDB I was slightly surprised to be able to get the full stack trace and I know exactly where the segmentation fault happens in the simulator's source code.
I don't want to break any licenses by appearing to be reverse engineering the simulator though so I will only post that if requested.

But if there is anything I can do to avoid segmentation faults that would be great.
  • Former Member
    Former Member over 6 years ago
    Sorry for bumping so quickly, (I wrote most of the post yesterday but didn't send it), but I think the problem is something to do with my user account.

    It is an Active Directory user which means the uid is much higher than normal for Linux users, and also that there is a [FONT=courier new]@[/FONT] character in the username. ([FONT=courier new][email protected][/FONT])
    All I know is running as the basic [FONT=courier new]uid=1000[/FONT] user, it seems to work, but running as the AD user, there is a segfault.

    So I have a work around, but hopefully something in this thread is useful.

    Updates:
    • The segmentation fault still happens when using a non Active Directory user created specifically for running the simulator.
      This happens regardless of whether the user has a home directory or not.
      Something about the original user account is different.
  • it could be a debian issue, for linux development only the ubuntu lts releases are supported...
  • Former Member
    Former Member over 6 years ago
    Yes, the problem has been with my environment sorry to waste time.
    The simulator is working again