Thread related crash on failed dive computer download

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Tue Oct 31 03:53:42 PDT 2017


Dear all,

I tried to reset my git repository to head and now I'm getting a crash which I 
didn't get before. I tried "git clean -fx", but that didn't help. 

The crash happens when using invalid Bluetooth addresses. Call trace:
- core/qt-ble.c l.326: report_error(...)
- core/errorhelper.c l.43: error_cb()
- desktop-widgets/mainwindow.cpp l.93: showNotification(...)

This call doesn't return but produces the following output:

*****
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QLabel(0x55a2edc69d70), parent's thread is QThread(0x55a2ed98bf50), 
current thread is DownloadThread(0x7ffc7ab20f70)
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
[...last two lines repeated numerous times...]
QBasicTimer::start: Timers cannot be started from another thread
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
Cannot make QOpenGLContext current in a different thread
Aborted
*****

The crash probably has nothing to do with the membuffer code (which itself 
looks scarily thread-unsafe):
Replacing l. 93 of desktop-widgets/mainwindow.cpp by
  mainwindow->getNotificationWidget()->showNotification("test",...);
still produces the crash. But
  mainwindow->getNotificationWidget()->showNotification("",...);
does not crash.

I have a feeling that I'm doing something obviously wrong, but I don't see it.
Thank you,

Berthold


More information about the subsurface mailing list