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

Rick Walsh rickmwalsh at gmail.com
Mon Sep 7 01:30:14 PDT 2015


Hi Claudiu,

On 7 September 2015 at 15:15, Claudiu Olteanu <
olteanu.vasilica.claudiu at gmail.com> wrote:

> Thanks for the quick response Claudiu. I'll test this tonight my time.
>> Just out of curiosity, could you reproduce/test it by selecting Shearwater,
>> Petrel, and any MAC address?  I think the crash happened before it
>> connected with my dive computer.
>>
> I don't know why I didn't think about that :-). Yes, I can reproduce the
> bug if I select the Shearwater, Petrel and a dumb MAC address.
> I also tested with the patch applied and the application doesn't crash
> anymore.
>
> With your first patch applied to libdivecomputer, I confirm that it
doesn't crash for me either.  It fails nicely with an insufficient
privileges error.

The two other patches to remember the Bluetooth download mode preference
work as advertised.


> Btw, the native Bluetooth is great and I'm impressed by how way it works.
>> I'm deliberately trying to find ways to make it do the wrong thing.
>>
> Thanks. I am glad that it resists to the dark side attacks :).
> There are some scenarios that I forgot to test but I am not sure if they
> will affect the flow:
> - use the "Force download of all dives" option
>
I just tested (on Linux), and it works fine for me


> - save the libdivecomputer dump/log file
>
Saving the log file works as it should

I cannot save the dump file.  Subsurface froze when trying to select a
file.  I'm not sure it's related to Bluetooth download (I'll test with my
other dive computer, which has a serial over usb connection).  Here's 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 5668)]
Invalid URL: QUrl("subsurface.bin")
Invalid URL: QUrl("subsurface.bin")
[Thread 0x7fff79ffb700 (LWP 5668) exited]
^C[New Thread 0x7fff797fa700 (LWP 5667)]
[New Thread 0x7fff7affd700 (LWP 5661)]
[New Thread 0x7fff7b7fe700 (LWP 5660)]
[New Thread 0x7fff7bfff700 (LWP 5659)]
[New Thread 0x7fff80ccc700 (LWP 5658)]
[New Thread 0x7fffc19e0700 (LWP 5657)]
[New Thread 0x7fffc8cbf700 (LWP 5656)]
[New Thread 0x7fffd7a67700 (LWP 5655)]

Program received signal SIGINT, Interrupt.
0x00007fffefaea2fd in poll () from /lib64/libc.so.6
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-
...
(gdb) bt
#0  0x00007fffefaea2fd in poll () from /lib64/libc.so.6
#1  0x00007fffea6b2dbc in g_main_context_iterate.isra () from
/lib64/libglib-2.0.so.0
#2  0x00007fffea6b2ecc in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#3  0x00007ffff0625d8f in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /lib64/libQt5Core.so.5
#4  0x00007ffff05ccdaa in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/lib64/libQt5Core.so.5
#5  0x00007ffff175f21d in QDialog::exec() () from /lib64/libQt5Widgets.so.5
#6  0x00007fffd6c3a49f in KDEPlatformFileDialogHelper::exec() () from
/usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so
#7  0x00007ffff175f0da in QDialog::exec() () from /lib64/libQt5Widgets.so.5
#8  0x00007ffff1772785 in QFileDialog::getSaveFileUrl(QWidget*, QString
const&, QUrl const&, QString const&, QString*, QFlags<QFileDialog::Option>,
QStringList const&)
    () from /lib64/libQt5Widgets.so.5
#9  0x00007ffff1772852 in QFileDialog::getSaveFileName(QWidget*, QString
const&, QString const&, QString const&, QString*,
QFlags<QFileDialog::Option>) ()
   from /lib64/libQt5Widgets.so.5
#10 0x00000000005edf4c in DownloadFromDCWidget::pickDumpFile
(this=0x7fffffffd180) at
/home/rick/src/subsurface/qt-ui/downloadfromdivecomputer.cpp:416
#11 0x00000000005edd46 in DownloadFromDCWidget::checkDumpFile
(this=0x7fffffffd180, state=2) at
/home/rick/src/subsurface/qt-ui/downloadfromdivecomputer.cpp:402
#12 0x00000000005beb6f in DownloadFromDCWidget::qt_static_metacall
(_o=0x7fffffffd180, _c=QMetaObject::InvokeMetaMethod, _id=9,
_a=0x7fffffffc4b0)
    at /home/rick/src/subsurface/build/moc_downloadfromdivecomputer.cpp:301
#13 0x00007ffff05fe15a in QMetaObject::activate(QObject*, int, int, void**)
() from /lib64/libQt5Core.so.5
#14 0x00007ffff18ff3fe in QCheckBox::stateChanged(int) () from
/lib64/libQt5Widgets.so.5
#15 0x00007ffff1662f60 in QAbstractButtonPrivate::click() () from
/lib64/libQt5Widgets.so.5
#16 0x00007ffff1663094 in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
() from /lib64/libQt5Widgets.so.5
#17 0x00007ffff15a75d8 in QWidget::event(QEvent*) () from
/lib64/libQt5Widgets.so.5
#18 0x00007ffff15644ac in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () from /lib64/libQt5Widgets.so.5
#19 0x00007ffff156a079 in QApplication::notify(QObject*, QEvent*) () from
/lib64/libQt5Widgets.so.5
#20 0x00007ffff05cf61b in QCoreApplication::notifyInternal(QObject*,
QEvent*) () from /lib64/libQt5Core.so.5
#21 0x00007ffff1568f82 in QApplicationPrivate::sendMouseEvent(QWidget*,
QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /lib64/libQt5Widgets.so.5


Cheers,

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


More information about the subsurface mailing list