Bug 203621 - [steps] Session restore: Konsole crashed when closing a broken restored root session (ViewContainer::views, ViewManager::viewProperties, MainWindow::queryClose)
Summary: [steps] Session restore: Konsole crashed when closing a broken restored root ...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 180154 203182 204279 204949 205972 206175 207543 208327 208908 211668 212813 213519 215112 215527 215701 216236 217499 218257 220253 220816 222302 225342 226072 228842 230430 232565 232886 233793 234480 237600 241694 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-12 22:12 UTC by Per (phobie)
Modified: 2020-06-10 20:57 UTC (History)
34 users (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 Per (phobie) 2009-08-12 22:12:31 UTC
Application that crashed: konsole
Version of the application: 2.3
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.30-4.slh.3-sidux-686 i686
Distribution: Debian GNU/Linux unstable (sid)

 -- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault
[KCrash Handler]
#6  QList (this=<value optimized out>) at /usr/include/qt4/QtCore/qlist.h:111
#7  Konsole::ViewContainer::views (this=<value optimized out>) at ../../../../apps/konsole/src/ViewContainer.cpp:191
#8  0x48e12295 in Konsole::ViewManager::viewProperties (this=<value optimized out>) at ../../../../apps/konsole/src/ViewManager.cpp:886
#9  0x476200fd in Konsole::MainWindow::queryClose (this=<value optimized out>) at ../../../../apps/konsole/src/MainWindow.cpp:341
#10 0x48840040 in KMainWindow::closeEvent (this=<value optimized out>, e=<value optimized out>) at ../../kdeui/widgets/kmainwindow.cpp:588
#11 0x47b0e162 in QWidget::event (this=<value optimized out>, event=<value optimized out>) at kernel/qwidget.cpp:7699
#12 0x47ed23d7 in QMainWindow::event (this=<value optimized out>, event=<value optimized out>) at widgets/qmainwindow.cpp:1399
#13 0x4883e5f7 in KMainWindow::event (this=<value optimized out>, ev=<value optimized out>) at ../../kdeui/widgets/kmainwindow.cpp:1094
#14 0x488835bc in KXmlGuiWindow::event (this=<value optimized out>, ev=<value optimized out>) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:131
#15 0x47ab87d4 in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4056
#16 0x47ac0a12 in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4021
#17 0x4875c00d in KApplication::notify (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at ../../kdeui/kernel/kapplication.cpp:302
#18 0x4751cfcb in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:610
#19 0x47534c4e in QCoreApplication::sendEvent(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x47b137d1 in QWidgetPrivate::close_helper (this=<value optimized out>, mode=<value optimized out>) at kernel/qwidget.cpp:7122
#21 0x47b138d8 in QWidget::close (this=) at kernel/qwidget.cpp:7193
#22 0x47b147d0 in QWidget::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at .moc/release-shared/moc_qwidget.cpp:200
#23 0x4813e19a in QMainWindow::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at .moc/release-shared/moc_qmainwindow.cpp:111
#24 0x4883f50a in KMainWindow::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at ./kmainwindow.moc:84
#25 0x48882a5a in KXmlGuiWindow::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at ./kxmlguiwindow.moc:96
#26 0x4761ec8a in Konsole::MainWindow::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at ./MainWindow.moc:93
#27 0x47532133 in QMetaObject::activate (sender=<value optimized out>, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3112
#28 0x47532560 in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, from_local_signal_index=<value optimized out>, to_local_signal_index=<value optimized out>, argv=)
    at kernel/qobject.cpp:3206
#29 0x47ab22d1 in QAction::triggered (this=) at .moc/release-shared/moc_qaction.cpp:236
#30 0x47ab381f in QAction::activate (this=<value optimized out>, event=<value optimized out>) at kernel/qaction.cpp:1160
#31 0x47ef8c94 in QMenuPrivate::activateCausedStack (this=<value optimized out>, causedStack=<value optimized out>, action=<value optimized out>, action_e=<value optimized out>, 
    self=<value optimized out>) at widgets/qmenu.cpp:967
#32 0x47eff39b in QMenuPrivate::activateAction (this=<value optimized out>, action=<value optimized out>, action_e=<value optimized out>, self=<value optimized out>) at widgets/qmenu.cpp:1060
#33 0x47effee2 in QMenu::mouseReleaseEvent (this=<value optimized out>, e=<value optimized out>) at widgets/qmenu.cpp:2254
#34 0x488424a5 in KMenu::mouseReleaseEvent (this=<value optimized out>, e=<value optimized out>) at ../../kdeui/widgets/kmenu.cpp:456
#35 0x47b0e73b in QWidget::event (this=<value optimized out>, event=<value optimized out>) at kernel/qwidget.cpp:7549
#36 0x47f02121 in QMenu::event (this=<value optimized out>, e=<value optimized out>) at widgets/qmenu.cpp:2353
#37 0x47ab87d4 in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4056
#38 0x47ac12a1 in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:3758
#39 0x4875c00d in KApplication::notify (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at ../../kdeui/kernel/kapplication.cpp:302
#40 0x4751cfcb in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:610
#41 0x47ac032e in QCoreApplication::sendSpontaneousEvent (receiver=<value optimized out>, event=<value optimized out>, alienWidget=<value optimized out>, nativeWidget=<value optimized out>, 
    buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#42 QApplicationPrivate::sendMouseEvent (receiver=<value optimized out>, event=<value optimized out>, alienWidget=<value optimized out>, nativeWidget=<value optimized out>, 
    buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>) at kernel/qapplication.cpp:2924
#43 0x47b2f09f in QETWidget::translateMouseEvent (this=<value optimized out>, event=<value optimized out>) at kernel/qapplication_x11.cpp:4343
#44 0x47b2e336 in QApplication::x11ProcessEvent (this=<value optimized out>, event=<value optimized out>) at kernel/qapplication_x11.cpp:3428
#45 0x47b58842 in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=) at kernel/qguieventdispatcher_glib.cpp:146
#46 0x4703a368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#47 0x4703d8c3 in ?? () from /usr/lib/libglib-2.0.so.0
#48 0x4703da48 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#49 0x47547e58 in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#50 0x47b57f85 in QGuiEventDispatcherGlib::processEvents (this=) at kernel/qguieventdispatcher_glib.cpp:202
#51 0x4751b61a in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#52 0x4751ba62 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201
#53 0x4751deb9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#54 0x47ab8657 in QApplication::exec () at kernel/qapplication.cpp:3525
#55 0x4762281c in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../../../apps/konsole/src/main.cpp:104
#56 0x080485b2 in main (argc=) at konsole_dummy.cpp:3

This bug may be a duplicate of or related to bug 175758

Reported using DrKonqi
Comment 1 Dario Andres 2009-08-12 22:54:42 UTC
*** Bug 203182 has been marked as a duplicate of this bug. ***
Comment 2 Dario Andres 2009-08-12 22:55:33 UTC
This is probably bug 180154 but in KDE4.3.
Thanks
Comment 3 Dario Andres 2009-08-18 17:44:09 UTC
*** Bug 204279 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2009-08-25 03:21:09 UTC
*** Bug 204949 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-09-02 14:03:42 UTC
*** Bug 205972 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2009-09-04 00:36:57 UTC
*** Bug 206175 has been marked as a duplicate of this bug. ***
Comment 7 Dario Andres 2009-09-16 15:23:49 UTC
*** Bug 207543 has been marked as a duplicate of this bug. ***
Comment 8 Dario Andres 2009-09-25 01:38:03 UTC
*** Bug 208327 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2009-09-30 13:39:43 UTC
*** Bug 208908 has been marked as a duplicate of this bug. ***
Comment 10 Jonathan Thomas 2009-10-20 19:51:14 UTC
*** Bug 180154 has been marked as a duplicate of this bug. ***
Comment 11 Dario Andres 2009-11-03 22:23:31 UTC
*** Bug 212813 has been marked as a duplicate of this bug. ***
Comment 12 Jonathan Thomas 2009-11-10 02:08:20 UTC
*** Bug 213519 has been marked as a duplicate of this bug. ***
Comment 13 Dario Andres 2009-11-18 18:04:53 UTC
*** Bug 215112 has been marked as a duplicate of this bug. ***
Comment 14 Dario Andres 2009-11-21 14:26:36 UTC
Updated backtrace from bug 215527:
---
Application: Konsole (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#6  QList (this=0x0) at /usr/include/QtCore/qlist.h:111
#7  Konsole::ViewContainer::views (this=0x0) at
/home/phil/kdemod/core/kdebase/src/kdebase-4.3.3/apps/konsole/src/ViewContainer.cpp:191
#8  0xb40d6005 in Konsole::ViewManager::viewProperties (this=0x8f10e70) at
/home/phil/kdemod/core/kdebase/src/kdebase-4.3.3/apps/konsole/src/ViewManager.cpp:886
#9  0xb52dee8d in Konsole::MainWindow::queryClose (this=0x8f09750) at
/home/phil/kdemod/core/kdebase/src/kdebase-4.3.3/apps/konsole/src/MainWindow.cpp:341
#10 0xb6e8d081 in KMainWindow::closeEvent (this=0x8f09750, e=0xbfc6f0e8) at
/home/phil/kdemod/core/kdelibs/src/kdelibs-4.3.3/kdeui/widgets/kmainwindow.cpp:588
Comment 15 Dario Andres 2009-11-21 14:26:39 UTC
*** Bug 215527 has been marked as a duplicate of this bug. ***
Comment 16 Dario Andres 2009-11-23 15:02:51 UTC
*** Bug 215701 has been marked as a duplicate of this bug. ***
Comment 17 Harald Nikolisin 2009-11-24 21:52:09 UTC
I have also a problem with crashed konsole - and it's perfectly reproducable.

1. open konsole - the default profile start
2. open a second tab with your default profile
3. open a third tab with root profile - login and execute e.g. "ll"
4. then close konsole with the close icon on the upper right corner.

What happens:
Before I closed the konsole session "ps -ef" shows me
"kdeinit4: konsole [kdeinit] --profile development"
After closing the session I'm still detection the process. If I want to restart konsole no window appear - "ps -ef" shows now three processes:
kdeinit4: konsole [kdeinit] --profile development
kdeinit4: konsole [kdeinit] --profile development
[konsole] <defunct>

No more konsole at my KDE session - so I logged out and login in KDE again.
Now an konsole windows opens with gray background an no input possibility. I click on the close button and the KDE crash dialog appears....

...tatatata and now the final!
I click in the crash dialog on the button "restart the application". The button grayed out and nothing happens.

Ok, the bug was present in all of my KDE 4.3 and 4.2 versions - and I got everyone from the openSUSE repos. I'm not sure if it was present in 4.1
Comment 18 Harald Nikolisin 2009-11-24 22:03:40 UTC
*** This bug has been confirmed by popular vote. ***
Comment 19 Dario Andres 2009-11-26 13:53:36 UTC
*** Bug 216236 has been marked as a duplicate of this bug. ***
Comment 20 Dario Andres 2009-12-05 23:34:34 UTC
*** Bug 217499 has been marked as a duplicate of this bug. ***
Comment 21 Dario Andres 2009-12-11 12:30:20 UTC
*** Bug 218257 has been marked as a duplicate of this bug. ***
Comment 22 Dario Andres 2009-12-27 23:04:36 UTC
*** Bug 220253 has been marked as a duplicate of this bug. ***
Comment 23 Dario Andres 2009-12-31 16:19:14 UTC
*** Bug 220816 has been marked as a duplicate of this bug. ***
Comment 24 Dario Andres 2010-01-11 23:59:47 UTC
*** Bug 222302 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Feck 2010-01-31 03:11:43 UTC
Is this bug 175758?
Comment 26 joona.halo 2010-01-31 08:29:13 UTC
(In reply to comment #25)
> Is this bug 175758?

It could be, that's why it says: "This bug may be a duplicate of or related to bug 175758"
Comment 27 Dario Andres 2010-02-04 02:55:00 UTC
*** Bug 225342 has been marked as a duplicate of this bug. ***
Comment 28 Dario Andres 2010-02-10 13:24:55 UTC
*** Bug 226072 has been marked as a duplicate of this bug. ***
Comment 29 Dario Andres 2010-02-28 14:19:28 UTC
*** Bug 228842 has been marked as a duplicate of this bug. ***
Comment 30 Kurt Hindenburg 2010-03-24 04:27:06 UTC
All these are from KDE 4.3.x.  If anyone can reproduce using a 4.4.x please mention it.

I can't reproduce here on 4.4.x or trunk.
Comment 31 Harald Nikolisin 2010-03-25 00:24:39 UTC
It's still there and so simple to reproduce.

1. open a konsole session with at least one root profile
2. do what you want with it or do nothing
3. close the konsole window (e.g., with the "close-X-button")

Voila,
- defunct konsole program (not terminated)
- no chance to restart a konsole session (you have to do killall konsole in xterm first)
- if you do no restart konsole but logout from KDE, the next KDE login will startup a broken konsole session with immediately crashes


I wonder why only 40 votes are given...
Comment 32 Dario Andres 2010-04-01 14:18:05 UTC
*** Bug 232886 has been marked as a duplicate of this bug. ***
Comment 33 Dario Andres 2010-04-09 14:56:27 UTC
From bug 233793:
-- Information about the crash:
When I logged in and KDE restored the session, I got a Konsole window that had
no tabs - just a grey background. Most of the menus were empty - "Edit",
"Scrollback", etc. Then I tried the "split view" feature, just to see what
happens, and konsole crashed.
In case this is related: the last time I logged out, Konsole had a tab open
with "bash" that was stuck in uninterruptable sleep, and Konsole would freeze
for a while when I tried to close the tab.
Comment 34 Dario Andres 2010-04-09 14:56:51 UTC
*** Bug 233793 has been marked as a duplicate of this bug. ***
Comment 35 Jonathan Thomas 2010-04-16 04:09:04 UTC
*** Bug 230430 has been marked as a duplicate of this bug. ***
Comment 36 Jonathan Thomas 2010-04-16 04:11:34 UTC
Bug 203621 is a duplicate from KDE 4.4.

This happens whenever the session data is corrupted or missing. This same crash happened on upgrades from 4.2 -> 4.3, when Konsole gained session support in the first place. What Konsole needs to do is check to see if there is valid session data, then if not just load a default session. Currently it's just loading nothing since the data is either not there or invalid, and the crash on exit is a result of it trying to access an empty list of views.
Comment 37 Jonathan Thomas 2010-04-16 04:24:42 UTC
To reproduce this bug at will, edit the konsole file in ~/.kde/share/config/sessions/ (The file name is dynamic, so it will be different for everyone.)

Inside the file, delete all config sections dedicated to sessions. Also, delete the "Sessions=" key in the [1] group, as well as the "NumberOfSessions=" key in the [Numbers] group.

Once this is done, and this is important, you must kill your KDE session in way that KDE will not be able to save the session. I'd suggest either init 0-ing or doing this as a separate user, then killing that user's Xorg.

While it is true that my method of reproducing this crash is quite involved, it is replicating the situation that appeared on upgrades to KDE 4.3, as well as situations that are still arising in KDE 4.4 when the session data becomes corrupt.
Comment 38 Jonathan Thomas 2010-04-16 04:28:02 UTC
...and of course to conclude the crash, you must log back in. You'll then observe that the konsole window has no console views, and that closing the window will trigger this crash.
Comment 39 Kurt Hindenburg 2010-04-16 04:45:51 UTC
Thanks for the info #37.  You can also just log out and then edit the konsole session file.

I'll see what I can do about it.
Comment 40 Kurt Hindenburg 2010-04-16 17:15:15 UTC
SVN commit 1115480 by hindenburg:

Use the default profile if the session management's Konsole file is unusable (corrupt/missing/etc).

CCBUG: 203621


 M  +9 -0      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115480
Comment 41 Richard Hartmann 2010-04-16 17:32:03 UTC
Thanks!

Can you add a (non-modal) notification that the session was broken & thus reset?
Comment 42 Jonathan Thomas 2010-04-17 02:40:48 UTC
I can confirm that the fix works, thanks. Did you mean to close that bug with the commit, or was the CCBUG intentional?
Comment 43 Kurt Hindenburg 2010-04-17 04:20:37 UTC
Thanks for testing .  I'll close it when I backport to 4.4 branch.
Comment 44 Kurt Hindenburg 2010-04-17 05:31:47 UTC
SVN commit 1115610 by hindenburg:

Use the default profile if the session management's Konsole file is unusable (corrupt/missing/etc).

BUG: 203621


 M  +9 -0      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115610
Comment 45 Kurt Hindenburg 2010-04-17 05:42:50 UTC
#41 - Creating a modal or non-modal dialog would be non-trival for this message.
Comment 46 Christoph Feck 2010-11-09 18:06:44 UTC
*** Bug 241694 has been marked as a duplicate of this bug. ***
Comment 47 Christoph Feck 2010-11-09 18:07:10 UTC
*** Bug 237600 has been marked as a duplicate of this bug. ***
Comment 48 Christoph Feck 2010-11-09 18:07:36 UTC
*** Bug 234480 has been marked as a duplicate of this bug. ***
Comment 49 Christoph Feck 2010-11-09 18:07:55 UTC
*** Bug 232565 has been marked as a duplicate of this bug. ***
Comment 50 Kurt Hindenburg 2011-03-05 22:55:45 UTC
*** Bug 211668 has been marked as a duplicate of this bug. ***