Bug 368560 - Crash when closing activity [Welcome Page related, crash below QQuickRenderControl::~QQuickRenderControl]
Summary: Crash when closing activity [Welcome Page related, crash below QQuickRenderCo...
Status: RESOLVED UPSTREAM
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: drkonqi
: 387733 392942 400204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-10 17:53 UTC by Louis Moureaux
Modified: 2018-10-23 15:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of valgrind --smc-check=all-non-file --track-origins=yes kdevelop (18.95 KB, text/plain)
2016-12-28 19:31 UTC, Adam Markiewicz
Details
valgrind trace (20.16 KB, text/plain)
2016-12-29 14:38 UTC, Adam Markiewicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Moureaux 2016-09-10 17:53:47 UTC
Application: kdevelop (5.0.0)

Qt Version: 5.7.0
Frameworks Version: 5.25.0
Operating System: Linux 4.7.2-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
I use activities to organize my work. Several of them have KDevelop sessions open (Make-based C++ projects). When I close one of these, KDevelop crashes. Other applications (Kate, Okular) don't. I don't get a crash when I close the KDevelop window.

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5012997800 (LWP 30540))]

Thread 6 (Thread 0x7f4f48f56700 (LWP 18575)):
#0  0x00007f50092b110f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f5003965ac4 in ?? () from /usr/lib/libQt5Script.so.5
#2  0x00007f5003965b09 in ?? () from /usr/lib/libQt5Script.so.5
#3  0x00007f50092ab454 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007f500f7bd7df in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7f4fc3fff700 (LWP 30871)):
#0  0x00007f50072ecf69 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f50072a8497 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007f50072a8f8b in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f50072a917c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f50100d659b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007f50100800da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#6  0x00007f500fea30f3 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#7  0x00007f500fea7d78 in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007f50092ab454 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f500f7bd7df in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7f4fdf89d700 (LWP 30543)):
#0  0x00007f50092b14b8 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f500fea8b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007f500d8854c8 in ?? () from /usr/lib/libKDevPlatformLanguage.so.10
#3  0x00007f500fea7d78 in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007f50092ab454 in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007f500f7bd7df in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f4feb4af700 (LWP 30542)):
#0  0x00007f50072ecf60 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f50072a85c5 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007f50072a8f8b in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f50072a917c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f50100d659b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007f50100800da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#6  0x00007f500fea30f3 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#7  0x00007f5011bcfe75 in ?? () from /usr/lib/libQt5DBus.so.5
#8  0x00007f500fea7d78 in ?? () from /usr/lib/libQt5Core.so.5
#9  0x00007f50092ab454 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007f500f7bd7df in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f4ff0fde700 (LWP 30541)):
#0  0x00007f500f7b448d in poll () from /usr/lib/libc.so.6
#1  0x00007f50023ad8e0 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f50023af679 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007f4ff2f1f469 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f500fea7d78 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007f50092ab454 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007f500f7bd7df in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f5012997800 (LWP 30540)):
[KCrash Handler]
#5  0x00007f5010da46ff in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#6  0x00007f5010da4ba9 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#7  0x00007f50100ae380 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#8  0x00007f5010da910b in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007f5010d61e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007f5010d695b1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#11 0x00007f5010081c80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#12 0x00007f50100843fd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#13 0x00007f5005915254 in ?? () from /usr/lib/libQt5Quick.so.5
#14 0x00007f50059154d0 in QQuickRenderControl::~QQuickRenderControl() () from /usr/lib/libQt5Quick.so.5
#15 0x00007f5005e98143 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#16 0x00007f5005e952b3 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#17 0x00007f5005e953a9 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#18 0x00007f50100b5547 in QObject::~QObject() () from /usr/lib/libQt5Core.so.5
#19 0x00007f5010da4933 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#20 0x00007f4fd1b8627e in ?? () from /usr/lib/qt/plugins/kdevplatform/25/kdevwelcomepage.so
#21 0x00007f50100abc51 in QObjectPrivate::deleteChildren() () from /usr/lib/libQt5Core.so.5
#22 0x00007f5010da48bb in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#23 0x00007f5010da4ba9 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#24 0x00007f50100abc51 in QObjectPrivate::deleteChildren() () from /usr/lib/libQt5Core.so.5
#25 0x00007f5010da48bb in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#26 0x00007f500be1c60e in KMainWindow::~KMainWindow() () from /usr/lib/libKF5XmlGui.so.5
#27 0x00007f500d36e16e in Sublime::MainWindow::~MainWindow() () from /usr/lib/libKDevPlatformSublime.so.10
#28 0x00007f5012571e7c in KDevelop::MainWindow::~MainWindow() () from /usr/lib/libKDevPlatformShell.so.10
#29 0x00007f5012571f29 in KDevelop::MainWindow::~MainWindow() () from /usr/lib/libKDevPlatformShell.so.10
#30 0x00007f500d36747e in Sublime::Controller::~Controller() () from /usr/lib/libKDevPlatformSublime.so.10
#31 0x00007f5012598e39 in KDevelop::UiController::~UiController() () from /usr/lib/libKDevPlatformShell.so.10
#32 0x00007f5012593064 in KDevelop::CorePrivate::~CorePrivate() () from /usr/lib/libKDevPlatformShell.so.10
#33 0x00007f5012593b7a in KDevelop::Core::~Core() () from /usr/lib/libKDevPlatformShell.so.10
#34 0x00007f5012593bc9 in KDevelop::Core::~Core() () from /usr/lib/libKDevPlatformShell.so.10
#35 0x00007f50100ae380 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#36 0x00007f5010d61e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#37 0x00007f5010d695b1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#38 0x00007f5010081c80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#39 0x00007f50100843fd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#40 0x00007f5010088609 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#41 0x000000000040b764 in ?? ()
#42 0x00007f500f6f5291 in __libc_start_main () from /usr/lib/libc.so.6
#43 0x000000000040beaa in _start ()

Possible duplicates by query: bug 363486, bug 359241, bug 358847, bug 355527, bug 353740.

Reported using DrKonqi
Comment 1 Adam Markiewicz 2016-12-28 12:00:59 UTC
I experience the same behaviour.

KDevelop 5.0.3
Qt 5.7.1
Frameworks 5.29.0
Arch Linux 4.8.13-1-ARCH x86_64
Comment 2 Kevin Funk 2016-12-28 12:55:54 UTC
This crash seems to be caused by the QML-based Welcome Page plugin (that's likely why you see KDevelop crashing, but not the other Qt-based apps):

#14 0x00007f50059154d0 in QQuickRenderControl::~QQuickRenderControl() () from /usr/lib/libQt5Quick.so.5
#15 0x00007f5005e98143 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#16 0x00007f5005e952b3 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#17 0x00007f5005e953a9 in ?? () from /usr/lib/libQt5QuickWidgets.so.5
#18 0x00007f50100b5547 in QObject::~QObject() () from /usr/lib/libQt5Core.so.5
#19 0x00007f5010da4933 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#20 0x00007f4fd1b8627e in ?? () from /usr/lib/qt/plugins/kdevplatform/25/kdevwelcomepage.so


This looks like an upstream issue in Qt, to debug further we'd need a valgrind run of KDevelop, to get more details about the crash. It'd be awesome if one of you guys could run KDevelop through valgrind and then try to reproduce the crash:

  valgrind --smc-check=all-non-file --track-origins=yes kdevelop &> out

If you just want to work-around the problem for the time being, you could make KDevelop not load the Welcome Page plugin at all, by setting this environment variable:

  KDEV_DISABLE_WELCOMEPAGE=1
Comment 3 Adam Markiewicz 2016-12-28 19:31:38 UTC
Created attachment 103050 [details]
Output of valgrind --smc-check=all-non-file --track-origins=yes kdevelop
Comment 4 Kevin Funk 2016-12-29 08:53:15 UTC
Okay, here's the problem: 

==7712== Invalid read of size 8
==7712==    at 0x642A14F: QWidget::~QWidget() (in /usr/lib/libQt5Widgets.so.5.7.1)
==7712==    by 0x642A5F8: QWidget::~QWidget() (in /usr/lib/libQt5Widgets.so.5.7.1)
==7712==    by 0x74D8F5F: QObject::event(QEvent*) (in /usr/lib/libQt5Core.so.5.7.1)
==7712==    by 0x642EBAA: QWidget::event(QEvent*) (in /usr/lib/libQt5Widgets.so.5.7.1)
==7712==    by 0x63E735B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.7.1)
==7712==    by 0x63EEAD0: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.7.1)
==7712==    by 0x74AC8DF: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/libQt5Core.so.5.7.1)
==7712==    by 0x74AF06C: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/libQt5Core.so.5.7.1)
==7712==    by 0x11DB63A3: ??? (in /usr/lib/libQt5Quick.so.5.7.1)
==7712==    by 0x11DB661F: QQuickRenderControl::~QQuickRenderControl() (in /usr/lib/libQt5Quick.so.5.7.1)
==7712==    by 0x1171B292: ??? (in /usr/lib/libQt5QuickWidgets.so.5.7.1)
==7712==    by 0x117183E2: ??? (in /usr/lib/libQt5QuickWidgets.so.5.7.1)
==7712==  Address 0x8 is not stack'd, malloc'd or (recently) free'd

Could you install debug symbols for qtbase so we can see line numbers in the trace? Thanks!
Comment 5 Adam Markiewicz 2016-12-29 14:38:15 UTC
Created attachment 103063 [details]
valgrind trace
Comment 6 Kevin Funk 2016-12-29 15:09:32 UTC
Important part of the valgrind trace:

==18229== Invalid read of size 8
==18229==    at 0x642A14F: QWidget::~QWidget() (qwidget.cpp:1602)
==18229==    by 0x642A5F8: QWidget::~QWidget() (qwidget.cpp:1714)
==18229==    by 0x74D8F5F: QObject::event(QEvent*) (qobject.cpp:1254)
==18229==    by 0x642EBAA: QWidget::event(QEvent*) (qwidget.cpp:9225)
==18229==    by 0x63E735B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3799)
==18229==    by 0x63EEAD0: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3556)
==18229==    by 0x74AC8DF: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:988)
==18229==    by 0x74AF06C: sendEvent (qcoreapplication.h:231)
==18229==    by 0x74AF06C: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1649)
==18229==    by 0x11DB63A3: ??? (in /usr/lib/libQt5Quick.so.5.7.1)
==18229==    by 0x11DB661F: QQuickRenderControl::~QQuickRenderControl() (in /usr/lib/libQt5Quick.so.5.7.1)
==18229==    by 0x1171B292: ??? (in /usr/lib/libQt5QuickWidgets.so.5.7.1)
==18229==    by 0x117183E2: ??? (in /usr/lib/libQt5QuickWidgets.so.5.7.1)
==18229==  Address 0x8 is not stack'd, malloc'd or (recently) free'd

Thanks a lot Adam!

This looks a lot like a upstream issue, thus reported on the Qt bug tracker now: https://bugreports.qt.io/browse/QTBUG-57841

Again, for a work-around, just do this before starting kdevelop:
  export KDEV_DISABLE_WELCOMEPAGE=1
Comment 7 Kevin Funk 2018-04-09 20:14:02 UTC
*** Bug 392942 has been marked as a duplicate of this bug. ***
Comment 8 Kevin Funk 2018-10-23 15:43:31 UTC
*** Bug 400204 has been marked as a duplicate of this bug. ***
Comment 9 Kevin Funk 2018-10-23 15:44:32 UTC
*** Bug 387733 has been marked as a duplicate of this bug. ***