Bluetooth download - segfault when Choose Bluetooth download mode isn't selected

Rick Walsh rickmwalsh at gmail.com
Sun Sep 6 04:20:27 PDT 2015


Hi,

I get a segfault (on Fedora 22), if I hit 'Download' without first
selecting 'Choose Bluetooth download mode'.  The Vendor (Shearwater), Dive
computer (Petrel) and Device or mount point (the Petrel's MAC address), are
automatically entered from the last time I downloaded dives.  The dive
computer was in upload mode, but I suspect that's irrelevant.  I ran under
gdb and got the backtrace.

(gdb) run
Starting program: /home/rick/src/subsurface/build/subsurface
Missing separate debuginfos, use: dnf debuginfo-install
glibc-2.21-5.fc22.x86_64 glibc-2.21-7.fc22.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Map theme file does not exist: ""
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No
such file or directory
[New Thread 0x7fff79ffb700 (LWP 2590)]
[0.000099] ERROR: No such file or directory (2) [in serial_posix.c:159
(serial_open)]
[0.000178] ERROR: Failed to open the serial port. [in custom_serial.c:69
(dc_serial_native_open)]
[New Thread 0x7fff62354700 (LWP 2610)]
[New Thread 0x7fff78ff9700 (LWP 2600)]
[New Thread 0x7fff7a7fc700 (LWP 2599)]
[New Thread 0x7fff797fa700 (LWP 2589)]
[New Thread 0x7fff7affd700 (LWP 2583)]
[New Thread 0x7fff7b7fe700 (LWP 2582)]
[New Thread 0x7fff7bfff700 (LWP 2581)]
[New Thread 0x7fff80ccc700 (LWP 2580)]
[New Thread 0x7fffc19e0700 (LWP 2579)]
[New Thread 0x7fffc8cbd700 (LWP 2578)]
[New Thread 0x7fffd7a67700 (LWP 2577)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff62354700 (LWP 2610)]
0x00000000007286b3 in shearwater_common_open
(device=device at entry=0x7fff4c005320,
context=context at entry=0x7fff4c003190, name=name at entry=0x248e720
"00:13:43:0E:6B:D0")
    at shearwater_common.c:52
52              rc = serial_configure (device->serial->port, 115200, 8,
SERIAL_PARITY_NONE, 1, SERIAL_FLOWCONTROL_NONE);
Missing separate debuginfos, use: dnf debuginfo-install
bzip2-libs-1.0.6-14.fc22.x86_64 cyrus-sasl-lib-2.1.26-22.fc22.x86_64
cyrus-sasl-lib-2.1.26-23.fc22.x86_64 ...(lots more libraries listed - I
haven't installed the debug packages)
(gdb) bt 30
#0  0x00000000007286b3 in shearwater_common_open
(device=device at entry=0x7fff4c005320,
context=context at entry=0x7fff4c003190,
    name=name at entry=0x248e720 "00:13:43:0E:6B:D0") at shearwater_common.c:52
#1  0x000000000071ebe3 in shearwater_petrel_device_open
(out=out at entry=0x7fff62353cd8,
context=context at entry=0x7fff4c003190,
    name=name at entry=0x248e720 "00:13:43:0E:6B:D0") at
shearwater_petrel.c:102
#2  0x00000000006fa8d3 in dc_device_open (out=0x7fffffffd328,
context=0x7fff4c003190, descriptor=0x7deb98 <g_descriptors+3768>,
name=0x248e720 "00:13:43:0E:6B:D0")
    at device.c:158
#3  0x00000000006aae50 in do_libdivecomputer_import (data=0x7fffffffd2f0)
at /home/rick/src/subsurface/libdivecomputer.c:955
#4  0x00000000005ee1f8 in DownloadThread::run (this=0xf76dd0) at
/home/rick/src/subsurface/qt-ui/downloadfromdivecomputer.cpp:617
#5  0x00007ffff03ee54e in QThreadPrivate::start(void*) () from
/lib64/libQt5Core.so.5
#6  0x00007ffff57b9555 in start_thread () from /lib64/libpthread.so.0
#7  0x00007fffefaf5b9d in clone () from /lib64/libc.so.6



If I select 'Choose Bluetooth download mode', run a Bluetooth scan, and
select my dive computer, everything works as it should.

If it is necessary to use the Bluetooth selection dialogue before
downloading, rather than remembering from last time, we should alert the
user instead of segfaulting.

I just got home from a weekend of collecting data in deep holes on sheep
and dairy farms (the fun part of "testing Subsurface").  I'll try the
Windows beta next, and see if I can crash it in the same way.

Cheers,

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150906/8bb2331e/attachment.html>


More information about the subsurface mailing list