Bug 356966 - crash in QXcbWindow::setParent() due to NULL xcbScreen()
Summary: crash in QXcbWindow::setParent() due to NULL xcbScreen()
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-12-20 20:15 UTC by Jon Burgess
Modified: 2018-11-01 18:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Burgess 2015-12-20 20:15:04 UTC
Application: kdeinit5 (15.12.0)

Qt Version: 5.6.0
Operating System: Linux 4.4.0-0.rc5.git3.1.fc24.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:

File->Save Output As

This is reproduced using the Fedora rawhide packages:

qt5-qtbase-5.6.0-0.16.fc24.x86_64
konsole5-15.12.0-1.fc24.x86_64

This looks like a side effect of the changes made for QTBUG-42985. Similar crashes have been seen when these were backported on top of QT 5.5 (bug 356583) but I wanted to verify they are also present in QT 5.6 beta.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Konsole (kdeinit5), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f94ac72e8c0 (LWP 2413))]

Thread 7 (Thread 0x7f948ede7700 (LWP 2414)):
#0  0x00007f94a9dc290d in poll () from /lib64/libc.so.6
#1  0x00007f94a82333dc in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f94a82334ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f94aac05acb in QEventDispatcherGlib::processEvents (this=0x7f94880008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#4  0x00007f94aabae50a in QEventLoop::exec (this=this@entry=0x7f948ede6cd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f94aa9da744 in QThread::exec (this=this@entry=0x7f94ac859040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:503
#6  0x00007f94ac7e7225 in QDBusConnectionManager::run (this=0x7f94ac859040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:152
#7  0x00007f94aa9df6b8 in QThreadPrivate::start (arg=0x7f94ac859040 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:340
#8  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#9  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f9487fff700 (LWP 2415)):
#0  0x00007f94a9dc290d in poll () from /lib64/libc.so.6
#1  0x00007f94a8f99272 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007f94a8f9aee7 in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007f948dc53f09 in QXcbEventReader::run (this=0x5595103aced0) at qxcbconnection.cpp:1288
#4  0x00007f94aa9df6b8 in QThreadPrivate::start (arg=0x5595103aced0) at thread/qthread_unix.cpp:340
#5  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#6  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f947db45700 (LWP 2416)):
#0  0x00007f94a940e340 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9485e72fc3 in thread_function () from /usr/lib64/dri/swrast_dri.so
#2  0x00007f9485e72e27 in impl_thrd_routine () from /usr/lib64/dri/swrast_dri.so
#3  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#4  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f947d344700 (LWP 2417)):
#0  0x00007f94a940e340 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9485e72fc3 in thread_function () from /usr/lib64/dri/swrast_dri.so
#2  0x00007f9485e72e27 in impl_thrd_routine () from /usr/lib64/dri/swrast_dri.so
#3  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#4  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f947cb43700 (LWP 2418)):
#0  0x00007f94a940e340 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9485e72fc3 in thread_function () from /usr/lib64/dri/swrast_dri.so
#2  0x00007f9485e72e27 in impl_thrd_routine () from /usr/lib64/dri/swrast_dri.so
#3  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#4  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f947c342700 (LWP 2419)):
#0  0x00007f94a940e340 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9485e72fc3 in thread_function () from /usr/lib64/dri/swrast_dri.so
#2  0x00007f9485e72e27 in impl_thrd_routine () from /usr/lib64/dri/swrast_dri.so
#3  0x00007f94a94086da in start_thread () from /lib64/libpthread.so.0
#4  0x00007f94a9dce48d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f94ac72e8c0 (LWP 2413)):
[KCrash Handler]
#5  0x00007f948dc6b408 in QXcbWindow::setParent (this=0x5595108d37c0, parent=0x0) at qxcbwindow.cpp:1426
#6  0x00007f94aaf063d3 in QWindow::setParent (this=0x559510a4dad0, parent=parent@entry=0x559510906ff0) at kernel/qwindow.cpp:621
#7  0x00007f94ab51a085 in QWidgetPrivate::setParent_sys (this=this@entry=0x559510712c00, newparent=newparent@entry=0x5595109fd1b0, f=...) at kernel/qwidget.cpp:10606
#8  0x00007f94ab5257d5 in QWidget::setParent (this=this@entry=0x559510687800, parent=parent@entry=0x5595109fd1b0, f=...) at kernel/qwidget.cpp:10461
#9  0x00007f94ab52685c in QWidget::setParent (this=this@entry=0x559510687800, parent=parent@entry=0x5595109fd1b0) at kernel/qwidget.cpp:10397
#10 0x00007f94ab60893c in QDialogButtonBox::addButton (this=0x5595109fd1b0, button=0x559510687800, role=QDialogButtonBox::AcceptRole) at widgets/qdialogbuttonbox.cpp:761
#11 0x00007f94875ea309 in KDEPlatformFileDialog::KDEPlatformFileDialog() () from /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so
#12 0x00007f94875ea5e2 in KDEPlatformFileDialogHelper::KDEPlatformFileDialogHelper() () from /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so
#13 0x00007f94875de42a in KdePlatformTheme::createPlatformDialogHelper(QPlatformTheme::DialogType) const () from /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so
#14 0x00007f94ab6d7e05 in QDialogPrivate::platformHelper (this=this@entry=0x559510683390) at dialogs/qdialog.cpp:94
#15 0x00007f94ab6eae48 in QFileDialogPrivate::platformFileDialogHelper (this=0x559510683390) at dialogs/qfiledialog_p.h:112
#16 QFileDialogPrivate::init (this=this@entry=0x559510683390, directory=..., nameFilter=..., caption=...) at dialogs/qfiledialog.cpp:2800
#17 0x00007f94ab6eb07a in QFileDialog::QFileDialog (this=0x559510711a00, parent=0x55951042b280, caption=..., directory=..., filter=...) at dialogs/qfiledialog.cpp:363
#18 0x00007f94907e018b in Konsole::SaveHistoryTask::execute() () from /lib64/libkonsoleprivate.so.15
#19 0x00007f949081f337 in Konsole::SessionController::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libkonsoleprivate.so.15
#20 0x00007f94aabdd020 in QMetaObject::activate (sender=sender@entry=0x5595105fa910, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe46ff16c0) at kernel/qobject.cpp:3730
#21 0x00007f94aabdd8f7 in QMetaObject::activate (sender=sender@entry=0x5595105fa910, m=m@entry=0x7f94ab9d60e0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe46ff16c0) at kernel/qobject.cpp:3595
#22 0x00007f94ab4d7922 in QAction::triggered (this=this@entry=0x5595105fa910, _t1=false) at .moc/moc_qaction.cpp:365
#23 0x00007f94ab4d9d20 in QAction::activate (this=0x5595105fa910, event=<optimized out>) at kernel/qaction.cpp:1163
#24 0x00007f94ab65b972 in QMenuPrivate::activateCausedStack (this=this@entry=0x5595104ed430, causedStack=..., action=action@entry=0x5595105fa910, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1128
#25 0x00007f94ab661ae6 in QMenuPrivate::activateAction (this=this@entry=0x5595104ed430, action=action@entry=0x5595105fa910, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1205
#26 0x00007f94ab665c09 in QMenu::mouseReleaseEvent (this=<optimized out>, e=0x7ffe46ff1cf0) at widgets/qmenu.cpp:2628
#27 0x00007f94ab524978 in QWidget::event (this=this@entry=0x5595104e78c0, event=event@entry=0x7ffe46ff1cf0) at kernel/qwidget.cpp:9104
#28 0x00007f94ab66669b in QMenu::event (this=0x5595104e78c0, e=0x7ffe46ff1cf0) at widgets/qmenu.cpp:2742
#29 0x00007f94ab4e05ec in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5595104e78c0, e=0x7ffe46ff1cf0) at kernel/qapplication.cpp:3712
#30 0x00007f94ab4e5fb1 in QApplication::notify (this=<optimized out>, receiver=0x5595104e78c0, e=0x7ffe46ff1cf0) at kernel/qapplication.cpp:3270
#31 0x00007f94aabb0948 in QCoreApplication::notifyInternal2 (receiver=0x5595104e78c0, event=0x7ffe46ff1cf0) at kernel/qcoreapplication.cpp:1013
#32 0x00007f94ab4e4d85 in QApplicationPrivate::sendMouseEvent (receiver=0x5595104e78c0, event=0x7ffe46ff1cf0, alienWidget=0x0, nativeWidget=0x5595104e78c0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true) at ../../src/corelib/kernel/qcoreapplication.h:227
#33 0x00007f94ab53e855 in QWidgetWindow::handleMouseEvent (this=this@entry=0x5595105edde0, event=event@entry=0x7ffe46ff2100) at kernel/qwidgetwindow.cpp:452
#34 0x00007f94ab540a13 in QWidgetWindow::event (this=0x5595105edde0, event=0x7ffe46ff2100) at kernel/qwidgetwindow.cpp:210
#35 0x00007f94ab4e05ec in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5595105edde0, e=0x7ffe46ff2100) at kernel/qapplication.cpp:3712
#36 0x00007f94ab4e5836 in QApplication::notify (this=0x7ffe46ff25d0, receiver=0x5595105edde0, e=0x7ffe46ff2100) at kernel/qapplication.cpp:3493
#37 0x00007f94aabb0948 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x5595105edde0, event=event@entry=0x7ffe46ff2100) at kernel/qcoreapplication.cpp:1013
#38 0x00007f94aaefd920 in QCoreApplication::sendSpontaneousEvent (event=0x7ffe46ff2100, receiver=0x5595105edde0) at ../../src/corelib/kernel/qcoreapplication.h:230
#39 QGuiApplicationPrivate::processMouseEvent (e=0x55951071eec0) at kernel/qguiapplication.cpp:1843
#40 0x00007f94aaeff4b5 in QGuiApplicationPrivate::processWindowSystemEvent (e=<optimized out>) at kernel/qguiapplication.cpp:1627
#41 0x00007f94aaedc7ab in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:636
#42 0x00007f948dc87ec0 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:70
#43 0x00007f94a82330aa in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#44 0x00007f94a8233440 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#45 0x00007f94a82334ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#46 0x00007f94aac05aaf in QEventDispatcherGlib::processEvents (this=0x5595103d4800, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#47 0x00007f94aabae50a in QEventLoop::exec (this=this@entry=0x7ffe46ff24a0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#48 0x00007f94aabb6d4c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1283
#49 0x00007f9490a9038e in kdemain () from /lib64/libkdeinit5_konsole.so
#50 0x00005595100e38fc in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#51 0x00005595100e4fce in handle_launcher_request(int, char const*) [clone .isra.23] ()
#52 0x00005595100e553b in handle_requests(int) ()
#53 0x00005595100e029b in main ()

Possible duplicates by query: bug 356867, bug 356718.

Reported using DrKonqi
Comment 1 Jon Burgess 2015-12-20 20:41:51 UTC
Reported to the QT bug tracker: https://bugreports.qt.io/browse/QTBUG-50081
Comment 2 Andrew Crouthamel 2018-11-01 13:47:41 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Jon Burgess 2018-11-01 15:32:07 UTC
Yes, 3 years is a long time ago. I think QT finally fixed all the NULL screen pointer issues I was seeing with X11.

The only bad thing is that there seem to be similar problems handling screens disappearing in Wayland which has made me stick with X11 for now.
Comment 4 Andrew Crouthamel 2018-11-01 18:44:27 UTC
Thanks for the update!