Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with Navin Minihomer #351

Open
kgraefe opened this issue May 13, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@kgraefe
Copy link

commented May 13, 2019

When trying to download the GPS log from my minihomer, gpsbabel segfaults. I think the device has tracks from both before and after the week rollover, so that might cause the issue?

root@raspberrypi0-wifi:~# gpsbabel -D 3 -i miniHomer,initbaud=0 -f /dev/ttyUSB0  -o gpx -F /var/run/minimonty.gpx
GPSBabel Version: 1.6.0
main: Compiled with Qt 5.10.1 for architecture arm-little_endian-ilp32-eabi-hardfloat
main: Running with Qt 5.10.1 on Linux 4.14.68, arm
main: QLocale::system() is C
main: QLocale() is C
main: QTextCodec::codecForLocale() is ISO-8859-1, mib 4
options: module/option=value: miniHomer/baud="115200" (=default)
options: module/option=value: miniHomer/erase="0" (=default)
options: module/option=value: miniHomer/first-sector="0" (=default)
options: module/option=value: miniHomer/initbaud="0"
options: module/option=value: miniHomer/last-sector="-1" (=default)
options: module/option=value: miniHomer/no-output="0" (=default)
options: module/option=value: miniHomer/read-at-once="255" (=default)
skytraq: Probing SkyTraq Venus at 9600baud...
skytraq: Didn't get message start tag
Didn't receive ACK (-3), retrying...
skytraq: Didn't get message start tag
Didn't receive ACK (-3)
skytraq: Probing SkyTraq Venus at 230400baud...
skytraq: Didn't get message start tag
Didn't receive ACK (-3), retrying...
skytraq: Didn't get message start tag
Didn't receive ACK (-3)
skytraq: Probing SkyTraq Venus at 115200baud...
Receiving message with 2 bytes of payload (expected >=2)
Receiving message with 2 bytes of payload (expected >=2)
Got ACK (id=0x02)
Receiving message with 14 bytes of payload (expected >=14)
skytraq: Venus device found: Kernel version = 1.4.42, ODM version = 1.4.57, revision (Y/M/D) = 13/10/24
Receiving message with 2 bytes of payload (expected >=2)
Receiving message with 2 bytes of payload (expected >=2)
Got ACK (id=0x17)
Receiving message with 41 bytes of payload (expected >=35)
#logging: tmin=5, tmax=65535, dmin=0, dmax=65535, vmin=0, vmax=65535
skytraq: Device status: free sectors: 449 / total sectors: 509 / 12% used / write ptr: 256108
skytraq: Reading log data from device...
skytraq: start=0 used=61
skytraq: opt_last_sector_val=-1
Reading 61 sectors beginning from #0...
Receiving message with 2 bytes of payload (expected >=2)
Receiving message with 2 bytes of payload (expected >=2)
Got ACK (id=0x1d)
Receiving data of sector #0...
Receiving data of sector #1...
Receiving data of sector #2...
Receiving data of sector #3...
Receiving data of sector #4...
Receiving data of sector #5...
Receiving data of sector #6...
Receiving data of sector #7...
Receiving data of sector #8...
Receiving data of sector #9...
Receiving data of sector #10...
Receiving data of sector #11...
Receiving data of sector #12...
Receiving data of sector #13...
Receiving data of sector #14...
Receiving data of sector #15...
Receiving data of sector #16...
Receiving data of sector #17...
Receiving data of sector #18...
Receiving data of sector #19...
Receiving data of sector #20...
Receiving data of sector #21...
Receiving data of sector #22...
Receiving data of sector #23...
Receiving data of sector #24...
Receiving data of sector #25...
Receiving data of sector #26...
Receiving data of sector #27...
Receiving data of sector #28...
Receiving data of sector #29...
Receiving data of sector #30...
Receiving data of sector #31...
Receiving data of sector #32...
Receiving data of sector #33...
Receiving data of sector #34...
Receiving data of sector #35...
Receiving data of sector #36...
Receiving data of sector #37...
Receiving data of sector #38...
Receiving data of sector #39...
Receiving data of sector #40...
Receiving data of sector #41...
Receiving data of sector #42...
Receiving data of sector #43...
Receiving data of sector #44...
Receiving data of sector #45...
Receiving data of sector #46...
Receiving data of sector #47...
Receiving data of sector #48...
Receiving data of sector #49...
Receiving data of sector #50...
Receiving data of sector #51...
Receiving data of sector #52...
Receiving data of sector #53...
Receiving data of sector #54...
Receiving data of sector #55...
Receiving data of sector #56...
Receiving data of sector #57...
Receiving data of sector #58...
Receiving data of sector #59...
Receiving data of sector #60...
Segmentation fault
@tsteven4

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

@tsteven4

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

@tsteven4

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

@kgraefe kgraefe referenced a pull request that will close this issue May 13, 2019

Open

Fix crash on download from Navin/ZNEX miniHomer #352

@kgraefe

This comment has been minimized.

Copy link
Author

commented May 13, 2019

I found it: opt_gps_utc_offset and opt_gps_week_rollover have not been initialized properly when using the miniHomer driver. And apparently atoi(NULL) is undefined and behaves differently on ARM (Segmentation fault) than on x86_64 (returns 0).

@robertlipe

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

@kgraefe

This comment has been minimized.

Copy link
Author

commented May 13, 2019

TBH, "on ARM" isn't very accurate here. The "x86_64" system is an Ubuntu 18.04 LTS where the "ARM" system is running an embedded distro (Yocto Sumo).... So on a second thought I guess it's more likely caused by a version of libc optimized for size or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.