lumina-desktop / lumina

Lumina Desktop Environment
http://lumina-desktop.org
BSD 3-Clause "New" or "Revised" License
531 stars 116 forks source link

Fix coredump when starting up lumina-fm #644

Closed maxsteciuk closed 5 years ago

maxsteciuk commented 5 years ago

It seems the issue was caused by some corrupted QImage pointer during its dereferencing in order to pass to futureFinished() slot

Changing slot signature from call-by-value to call-by-reference / pointer and adding explicit check for std::nullptr fixed the crash problem. The lumina-fm started up successfully.

Here is one GDB backtrace

Core was generated by `lumina-fm'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x0000000800d18006 in QImage::QImage(QImage const&) () from /usr/local/lib/qt5/libQt5Gui.so.5

[Current thread is 1 (LWP 102634)] (gdb) bt

0 0x0000000800d18006 in QImage::QImage(QImage const&) () at /usr/local/lib/qt5/libQt5Gui.so.5

1 0x00000000003266f7 in ()

2 0x0000000801651641 in QObject::event(QEvent*) () at /usr/local/lib/qt5/libQt5Core.so.5

3 0x000000080067af61 in QApplicationPrivate::notify_helper(QObject, QEvent) () at /usr/local/lib/qt5/libQt5Widgets.so.5

4 0x000000080067c359 in QApplication::notify(QObject, QEvent) () at /usr/local/lib/qt5/libQt5Widgets.so.5

5 0x0000000801626ee1 in QCoreApplication::notifyInternal2(QObject, QEvent) () at /usr/local/lib/qt5/libQt5Core.so.5

6 0x0000000801627da9 in QCoreApplicationPrivate::sendPostedEvents(QObject, int, QThreadData) () at /usr/local/lib/qt5/libQt5Core.so.5

7 0x0000000801678fd8 in QEventDispatcherUNIX::processEvents(QFlags) () at /usr/local/lib/qt5/libQt5Core.so.5

8 0x0000000801622a2e in QEventLoop::exec(QFlags) () at /usr/local/lib/qt5/libQt5Core.so.5

9 0x000000080145fdec in QThread::exec() () at /usr/local/lib/qt5/libQt5Core.so.5

10 0x0000000801460c83 in () at /usr/local/lib/qt5/libQt5Core.so.5

11 0x00000008018d5756 in thread_start (curthread=0x8061a5100) at /usr/src_tmp/lib/libthr/thread/thr_create.c:291

12 0x0000000000000000 in ()