Bug 344183 - konsole5 crashes right after login
Summary: konsole5 crashes right after login
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 3.0.1
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
Keywords: drkonqi
: 340075 344523 345117 346830 347108 347477 347904 347955 347998 348007 (view as bug list)
Depends on:
Reported: 2015-02-15 07:28 UTC by Hendrik Woltersdorf
Modified: 2015-05-21 09:12 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Woltersdorf 2015-02-15 07:28:50 UTC
Application: konsole (3.0.1)

Qt Version: 5.4.0
Operating System: Linux 3.18.3-1-desktop i686
Distribution: "openSUSE 20150205 (Tumbleweed) (i586)"

-- Information about the crash:
- What I was doing when the application crashed:
The crash happens, when the session restores programs right after login, which were left open at logout. When I click at the restart button in the crash reporter konsole5 (re)starts and runs without any problems.

The crash can be reproduced every time.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb40fe9c0 (LWP 1856))]

Thread 2 (Thread 0xb259ab40 (LWP 1858)):
#0  0xb77cbdbc in __kernel_vsyscall ()
#1  0xb76b828b in poll () from /lib/libc.so.6
#2  0xb50f68f8 in ?? () from /usr/lib/libxcb.so.1
#3  0xb50f88c4 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#4  0xb26d5333 in QXcbEventReader::run (this=0x8900d08) at qxcbconnection.cpp:1099
#5  0xb5d97795 in QThreadPrivate::start (arg=0x8900d08) at thread/qthread_unix.cpp:337
#6  0xb50d50e2 in start_thread () from /lib/libpthread.so.0
#7  0xb76c231e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb40fe9c0 (LWP 1856)):
[KCrash Handler]
#6  Konsole::ViewManager::saveSessions (this=0x89b9820, group=...) at /usr/src/debug/konsole-14.12.1/src/ViewManager.cpp:910
#7  0xb778af96 in Konsole::MainWindow::saveProperties (this=0x88ed500, group=...) at /usr/src/debug/konsole-14.12.1/src/MainWindow.cpp:599
#8  0xb71cdd3d in KMainWindow::savePropertiesInternal (this=0x88ed500, config=config@entry=0x894f050, number=1) at /usr/src/debug/kxmlgui-5.6.0/src/kmainwindow.cpp:504
#9  0xb71cdfaa in KMWSessionManager::saveState (this=this@entry=0xb723a0b4 <(anonymous namespace)::Q_QGS_ksm::innerFunction()::holder>) at /usr/src/debug/kxmlgui-5.6.0/src/kmainwindow.cpp:140
#10 0xb720eacf in KMWSessionManager::qt_static_metacall (_o=0xb723a0b4 <(anonymous namespace)::Q_QGS_ksm::innerFunction()::holder>, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfa152e8) at /usr/src/debug/kxmlgui-5.6.0/build/src/moc_kmainwindow_p.cpp:70
#11 0xb5fb2ce0 in QMetaObject::activate (sender=sender@entry=0xbfa1628c, signalOffset=8, local_signal_index=<optimized out>, local_signal_index@entry=9, argv=argv@entry=0xbfa152e8) at kernel/qobject.cpp:3716
#12 0xb5fb32fb in QMetaObject::activate (sender=sender@entry=0xbfa1628c, m=m@entry=0xb66a58e0 <QGuiApplication::staticMetaObject>, local_signal_index=local_signal_index@entry=9, argv=argv@entry=0xbfa152e8) at kernel/qobject.cpp:3582
#13 0xb62811d5 in QGuiApplication::saveStateRequest (this=0xbfa1628c, _t1=...) at .moc/moc_qguiapplication.cpp:376
#14 0xb628300d in QGuiApplicationPrivate::saveState (this=0x88ef4d8) at kernel/qguiapplication.cpp:3150
#15 0xb62ca7f2 in QPlatformSessionManager::appSaveState (this=0x89024e0) at kernel/qplatformsessionmanager.cpp:141
#16 0xb26fe291 in sm_performSaveYourself (sm=sm@entry=0x89024e0) at qxcbsessionmanager.cpp:236
#17 0xb26fe541 in sm_saveYourselfCallback (smcConn=0x8924d00, clientData=0x89024e0, saveType=1, shutdown=0, interactStyle=0) at qxcbsessionmanager.cpp:171
#18 0xb5568891 in _SmcProcessMessage (iceConn=0x8925c20, clientData=0x8924d00, opcode=3, length=1, swap=0, replyWait=0x0, replyReadyRet=0xbfa158b8) at sm_process.c:241
#19 0xb555a3b9 in IceProcessMessages (iceConn=0x8925c20, replyWait=0x0, replyReadyRet=0x0) at process.c:386
#20 0xb26fcec5 in QSmSocketReceiver::socketActivated (this=0x8925c98) at qxcbsessionmanager.cpp:322
#21 0xb5fb2ce0 in QMetaObject::activate (sender=sender@entry=0x8920418, signalOffset=3, local_signal_index=<optimized out>, local_signal_index@entry=0, argv=argv@entry=0xbfa159f8) at kernel/qobject.cpp:3716
#22 0xb5fb32fb in QMetaObject::activate (sender=sender@entry=0x8920418, m=m@entry=0xb61c13b8 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0xbfa159f8) at kernel/qobject.cpp:3582
#23 0xb6038245 in QSocketNotifier::activated (this=this@entry=0x8920418, _t1=9) at .moc/moc_qsocketnotifier.cpp:133
#24 0xb5fc0644 in QSocketNotifier::event (this=0x8920418, e=0xbfa15cc4) at kernel/qsocketnotifier.cpp:296
#25 0xb67a3274 in QApplicationPrivate::notify_helper (this=this@entry=0x88ef4d8, receiver=receiver@entry=0x8920418, e=e@entry=0xbfa15cc4) at kernel/qapplication.cpp:3722
#26 0xb67a86a9 in QApplication::notify (this=0xbfa1628c, receiver=0x8920418, e=0xbfa15cc4) at kernel/qapplication.cpp:3505
#27 0xb5f7d7da in QCoreApplication::notifyInternal (this=0xbfa1628c, receiver=0x8920418, event=event@entry=0xbfa15cc4) at kernel/qcoreapplication.cpp:932
#28 0xb5fde1a4 in sendEvent (event=0xbfa15cc4, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:228
#29 socketNotifierSourceDispatch (source=0x8922b68) at kernel/qeventdispatcher_glib.cpp:101
#30 0xb4fb2fd3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0xb4fb3258 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0xb4fb3318 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0xb5fdd15d in QEventDispatcherGlib::processEvents (this=this@entry=0x89250c0, flags=flags@entry=...) at kernel/qeventdispatcher_glib.cpp:418
#34 0xb27027a6 in QPAEventDispatcherGlib::processEvents (this=0x89250c0, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:115
#35 0xb5f7dbc2 in QCoreApplication::processEvents (flags=flags@entry=...) at kernel/qcoreapplication.cpp:1104
#36 0xb6ea175b in KWindowConfig::restoreWindowSize (window=0x89c87a8, config=...) at /usr/src/debug/kconfig-5.6.0/src/gui/kwindowconfig.cpp:87
#37 0xb71ce86d in KMainWindow::applyMainWindowSettings (this=this@entry=0x88ed500, cg=...) at /usr/src/debug/kxmlgui-5.6.0/src/kmainwindow.cpp:613
#38 0xb720a8f8 in KXmlGuiWindow::applyMainWindowSettings (this=0x88ed500, config=...) at /usr/src/debug/kxmlgui-5.6.0/src/kxmlguiwindow.cpp:374
#39 0xb71cbf2f in KMainWindow::setAutoSaveSettings (this=this@entry=0x88ed500, group=..., saveWindowSize=saveWindowSize@entry=true) at /usr/src/debug/kxmlgui-5.6.0/src/kmainwindow.cpp:722
#40 0xb71cebc3 in KMainWindow::setAutoSaveSettings (this=this@entry=0x88ed500, groupName=..., saveWindowSize=saveWindowSize@entry=true) at /usr/src/debug/kxmlgui-5.6.0/src/kmainwindow.cpp:706
#41 0xb779101e in Konsole::MainWindow::applyKonsoleSettings (this=this@entry=0x88ed500) at /usr/src/debug/konsole-14.12.1/src/MainWindow.cpp:707
#42 0xb77924d0 in Konsole::MainWindow::MainWindow (this=0x88ed500, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/konsole-14.12.1/src/MainWindow.cpp:130
#43 0xb77887ba in Konsole::Application::newMainWindow (this=this@entry=0xbfa1628c) at /usr/src/debug/konsole-14.12.1/src/Application.cpp:72
#44 0xb7799a7b in restoreSession (app=...) at /usr/src/debug/konsole-14.12.1/src/main.cpp:294
#45 0xb779a9b7 in kdemain (argc=3, argv=0xbfa16374) at /usr/src/debug/konsole-14.12.1/src/main.cpp:89
#46 0x08048637 in main (argc=3, argv=0xbfa16374) at /usr/src/debug/konsole-14.12.1/build/src/konsole_dummy.cpp:3

Reported using DrKonqi
Comment 1 Arjun AK 2015-03-15 14:47:26 UTC
*** Bug 345117 has been marked as a duplicate of this bug. ***
Comment 2 Wolfgang Bauer 2015-03-25 16:55:48 UTC
*** Bug 340075 has been marked as a duplicate of this bug. ***
Comment 3 Wolfgang Bauer 2015-03-25 16:58:58 UTC
The same crash happens here on every login.
I'm using the latest versions, Konsole 3.0.1 from KDE Applications 14.12.3, KDE Frameworks 5.8.0, and Qt 5.4.1.
Comment 4 Wolfgang Bauer 2015-04-04 19:47:50 UTC
*** Bug 344523 has been marked as a duplicate of this bug. ***
Comment 5 Felix Miata 2015-04-13 00:18:07 UTC
I can avoid this only either by using Fedora 22 or Rawhide (host big41, ATI Cedar), instead of openSUSE Tumbleweed (host gx745, I), or by closing Konsole before logging out. 64 bit TW w/ plasma5-workspace-5.2.2-3.1 & konsole5-14.12.3-1.1.
Comment 6 Christoph Feck 2015-05-09 20:11:29 UTC
*** Bug 346830 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2015-05-09 20:11:57 UTC
*** Bug 347108 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2015-05-09 20:12:16 UTC
*** Bug 347477 has been marked as a duplicate of this bug. ***
Comment 9 Hrvoje Senjan 2015-05-15 19:54:07 UTC
Sorry for the troubles, this is a openSUSE specific crash, as we're applying https://git.reviewboard.kde.org/r/119593/ without upstream consent...

@Thomas, any ideas about this one?
From *very* limited testing, seems now the the rb patch is no longer needed with Qt 5.4.x (?)
Comment 10 Thomas Lübking 2015-05-15 20:29:12 UTC
The restored client restores its window size, that (due to the patch) processes events what triggers a state save (apparently posted there by the SM) what requires _viewSplitter->activeContainer(), which simply isn't present at this moment (konsole just starts)

I don't know enough about the konsole code, but assume scheduling the connection to QGuiApplication::saveStateRequest() is not an option?!

Checking Qt5.4 to see whether they forward early QWidget resizes to the platform window.
Comment 11 Thomas Lübking 2015-05-15 23:39:48 UTC
"nope" - the Qt code changed a bit (instead of updateGeometry there's now updateSize and updatePosition) but the geneal issue remains, https://bugreports.qt.io/browse/QTBUG-40584 is still open and the testcase attached there still reliably fails on vanilla Qt.


The problem dealt with by this patch is some sort of cornercase - it happens when you resize a widget before the eventloop is up, resp. before calling "show".

Most prominent cases are nested eventloops by modal dialogs.
Comment 12 Hrvoje Senjan 2015-05-17 19:28:47 UTC
i see.
somehow i feel users will find crashes a bit more annoying than incorrect size (?), i shall retract the kconfig patch for now.
Comment 13 Thomas Lübking 2015-05-17 20:01:16 UTC
(In reply to Hrvoje Senjan from comment #12)
> i shall retract the kconfig patch for now.


Leaving aside the crash (I'd here say that konsole should harden the function, because many things could processEvents() in an early phase), the patch was ineffective w/o the fix to the Qt bug (why I never pushed it itfp)

As I just figured, that patch doesn't work w/ Qt 5.4 anymore anyway - sorry :-(
Comment 14 Hrvoje Senjan 2015-05-19 15:29:14 UTC
*** Bug 347955 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2015-05-21 09:12:16 UTC
*** Bug 347904 has been marked as a duplicate of this bug. ***
Comment 16 Christoph Feck 2015-05-21 09:12:34 UTC
*** Bug 347998 has been marked as a duplicate of this bug. ***
Comment 17 Christoph Feck 2015-05-21 09:12:48 UTC
*** Bug 348007 has been marked as a duplicate of this bug. ***