Bug 154675 - Konsole crashes when closing tab
Summary: Konsole crashes when closing tab
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-27 13:00 UTC by mutlu inek
Modified: 2008-01-15 23:10 UTC (History)
0 users

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 mutlu inek 2007-12-27 13:00:44 UTC
Version:           1.9.2 (svn r753240) (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.2 
OS:                Linux

When several tabs are open and I attempt to close the app, it offers me to close the app altogether or just the active tab. Selecting "Close Current Tab" sometimes closes the current tab and sometimes crashes Konsole.

The backtrace (unfortunately debugging symbols for non-KDE4 libraries are missing):

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
[...]
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb5e6b6d0 (LWP 8984)]
(no debugging symbols found)
[...]
(no debugging symbols found)
[KCrash handler]
#6  0xb6655f19 in ?? () from /usr/lib/libQtGui.so.4
#7  0xb6646dbb in QWidget::removeAction () from /usr/lib/libQtGui.so.4
#8  0xb75cdbf9 in KXMLGUI::ActionList::unplug ()
   from /opt/kde4/lib/libkdeui.so.5
#9  0xb75cdd35 in KXMLGUI::ContainerNode::unplugClient ()
   from /opt/kde4/lib/libkdeui.so.5
#10 0xb75cdfc7 in KXMLGUI::ContainerNode::unplugActions ()
   from /opt/kde4/lib/libkdeui.so.5
#11 0xb75ce02f in KXMLGUI::ContainerNode::destruct ()
   from /opt/kde4/lib/libkdeui.so.5
#12 0xb75ce20b in KXMLGUI::ContainerNode::destructChildren ()
   from /opt/kde4/lib/libkdeui.so.5
#13 0xb75ce020 in KXMLGUI::ContainerNode::destruct ()
   from /opt/kde4/lib/libkdeui.so.5
#14 0xb75ce20b in KXMLGUI::ContainerNode::destructChildren ()
   from /opt/kde4/lib/libkdeui.so.5
#15 0xb75ce020 in KXMLGUI::ContainerNode::destruct ()
   from /opt/kde4/lib/libkdeui.so.5
#16 0xb75c8f15 in KXMLGUIFactory::removeClient ()
   from /opt/kde4/lib/libkdeui.so.5
#17 0xb7f19def in Konsole::MainWindow::activeViewChanged ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#18 0xb7f1a040 in Konsole::MainWindow::qt_metacall ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#19 0xb6e0c596 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#20 0xb6e0cb62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#21 0xb7f5bb93 in Konsole::ViewManager::activeViewChanged ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#22 0xb7f5d9ab in Konsole::ViewManager::qt_metacall ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#23 0xb6e0c596 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#24 0xb6e0cb62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#25 0xb7f37d73 in Konsole::SessionController::focused ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#26 0xb7f3cfbd in Konsole::SessionController::eventFilter ()
   from /opt/kde4/lib/libkdeinit4_konsole.so
#27 0xb6607232 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#28 0xb6609b28 in QApplication::notify () from /usr/lib/libQtGui.so.4
#29 0xb74e0ba3 in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#30 0xb6df978b in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#31 0xb660977a in QApplicationPrivate::setFocusWidget ()
   from /usr/lib/libQtGui.so.4
#32 0xb664ac76 in QWidget::setFocus () from /usr/lib/libQtGui.so.4
#33 0xb660f675 in QApplication::setActiveWindow () from /usr/lib/libQtGui.so.4
#34 0xb66659cd in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#35 0xb668b9a4 in ?? () from /usr/lib/libQtGui.so.4
#36 0xb60742a6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0xb6077632 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#38 0xb6077bee in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0xb6e1e6e2 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#40 0xb668b7d5 in ?? () from /usr/lib/libQtGui.so.4
#41 0xb6df8b72 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#42 0xb6df8c7a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#43 0xb6dfb17d in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#44 0xb66067f7 in QApplication::exec () from /usr/lib/libQtGui.so.4
#45 0xb7f697eb in kdemain () from /opt/kde4/lib/libkdeinit4_konsole.so
#46 0x080487d2 in _start ()
Comment 1 Edwin Schepers 2007-12-27 16:18:51 UTC
quite easy to reproduce here.

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0x2b09b4395380 (LWP 4266)]
[KCrash handler]
#5  0x00002b09b1ca3a95 in raise () from /lib64/libc.so.6
#6  0x00002b09b1ca5030 in abort () from /lib64/libc.so.6
#7  0x00002b09afffdc3e in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff004c4870 "QList: Out of memory") at global/qglobal.cpp:2160
#8  0x00002b09afffdd4d in qFatal (msg=0x2b09b00f4010 "QList: Out of memory")
    at global/qglobal.cpp:2392
#9  0x00002b09b00235dd in QListData::detach2 (this=0x2b09b1fb2cd8)
    at tools/qlistdata.cpp:88
#10 0x00002b09b07a1ba1 in QList<QWidget*>::detach_helper (this=0x2b09b1fb2cd8)
    at ../../include/QtCore/../../src/corelib/tools/qlist.h:513
#11 0x00002b09b07aeeb7 in QList<QWidget*>::detach (this=0x2b09b1fb2cd8)
    at ../../include/QtCore/../../src/corelib/tools/qlist.h:112
#12 0x00002b09b07fad6d in QList<QWidget*>::removeAll (this=0x2b09b1fb2cd8, 
    _t=@0x7fff004c6a48)
    at ../../include/QtCore/../../src/corelib/tools/qlist.h:568
#13 0x00002b09b07ec10b in QWidget::removeAction (this=0xc61d60, 
    action=0x1b016a0) at kernel/qwidget.cpp:2512
#14 0x00002b09acecd8b4 in KXMLGUI::ActionList::unplug (this=0x1ada3e8, 
    container=0xc61d60)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:52
#15 0x00002b09acecda61 in KXMLGUI::ContainerNode::unplugClient (this=0xc3df60, 
    client=0x1ada3e0)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:438
#16 0x00002b09acecdc7a in KXMLGUI::ContainerNode::unplugActions (
    this=0xc3df60, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:417
#17 0x00002b09acecdd03 in KXMLGUI::ContainerNode::destruct (this=0xc3df60, 
    element=@0x7fff004c6cc0, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:326
#18 0x00002b09acecdef7 in KXMLGUI::ContainerNode::destructChildren (
    this=0xd8a850, element=@0x7fff004c6da0, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:369
#19 0x00002b09acecdcf6 in KXMLGUI::ContainerNode::destruct (this=0xd8a850, 
    element=@0x7fff004c6da0, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:324
#20 0x00002b09acecdef7 in KXMLGUI::ContainerNode::destructChildren (
    this=0xd6b4d0, element=@0x7fff004c6f80, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:369
#21 0x00002b09acecdcf6 in KXMLGUI::ContainerNode::destruct (this=0xd6b4d0, 
    element=@0x7fff004c6f80, state=@0xd83480)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory_p.cpp:324
#22 0x00002b09acec8555 in KXMLGUIFactory::removeClient (this=0xd72970, 
    client=0x1aa9708)
    at /install/kde4/kdelibs/kdeui/xmlgui/kxmlguifactory.cpp:337
#23 0x00002b09aa86058f in Konsole::MainWindow::activeViewChanged (
    this=0xd769c0, controller=0x1a2a760)
    at /install/kde4/kdebase/apps/konsole/src/MainWindow.cpp:136
#24 0x00002b09aa8607d2 in Konsole::MainWindow::qt_metacall (this=0xd769c0, 
    _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fff004c7590)
    at /install/kde4/kdebase/apps/konsole/src/MainWindow.moc:99
#25 0x00002b09b00cb75d in QMetaObject::activate (sender=0xc61570, 
    from_signal_index=6, to_signal_index=6, argv=0x7fff004c7590)
    at kernel/qobject.cpp:3087
#26 0x00002b09b00cc101 in QMetaObject::activate (sender=0xc61570, 
    m=0x2b09aaae82e0, local_signal_index=2, argv=0x7fff004c7590)
    at kernel/qobject.cpp:3149
#27 0x00002b09aa8a161b in Konsole::ViewManager::activeViewChanged (
    this=0xc61570, _t1=0x1a2a760)
    at /install/kde4/kdebase/apps/konsole/src/ViewManager.moc:161
#28 0x00002b09aa8a311f in Konsole::ViewManager::qt_metacall (this=0xc61570, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fff004c7b50)
    at /install/kde4/kdebase/apps/konsole/src/ViewManager.moc:113
#29 0x00002b09b00cb75d in QMetaObject::activate (sender=0x1a2a760, 
    from_signal_index=9, to_signal_index=9, argv=0x7fff004c7b50)
    at kernel/qobject.cpp:3087
#30 0x00002b09b00cc101 in QMetaObject::activate (sender=0x1a2a760, 
    m=0x2b09aaae71a0, local_signal_index=0, argv=0x7fff004c7b50)
    at kernel/qobject.cpp:3149
#31 0x00002b09aa87dd6b in Konsole::SessionController::focused (this=0x1a2a760, 
    _t1=0x1a2a760)
    at /install/kde4/kdebase/apps/konsole/src/SessionController.moc:185
#32 0x00002b09aa882723 in Konsole::SessionController::eventFilter (
    this=0x1a2a760, watched=0x1a28cb0, event=0x7fff004c8230)
    at /install/kde4/kdebase/apps/konsole/src/SessionController.cpp:318
#33 0x00002b09b07a4207 in QApplicationPrivate::notify_helper (this=0x6277d0, 
    receiver=0x1a28cb0, e=0x7fff004c8230) at kernel/qapplication.cpp:3548
#34 0x00002b09b07a5f7f in QApplication::notify (this=0x7fff004c8e60, 
    receiver=0x1a28cb0, e=0x7fff004c8230) at kernel/qapplication.cpp:3497
#35 0x00002b09acddf162 in KApplication::notify (this=0x7fff004c8e60, 
    receiver=0x1a28cb0, event=0x7fff004c8230)
    at /install/kde4/kdelibs/kdeui/kernel/kapplication.cpp:319
#36 0x00002b09b00b7c50 in QCoreApplication::notifyInternal (
    this=0x7fff004c8e60, receiver=0x1a28cb0, event=0x7fff004c8230)
    at kernel/qcoreapplication.cpp:530
#37 0x00002b09ab93f02d in QCoreApplication::sendEvent (receiver=0x1a28cb0, 
    event=0x7fff004c8230)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:200
#38 0x00002b09b07a70a8 in QApplicationPrivate::setFocusWidget (
    focus=0x1a28cb0, reason=Qt::ActiveWindowFocusReason)
    at kernel/qapplication.cpp:1903
#39 0x00002b09b07eca13 in QWidget::setFocus (this=0x1a28cb0, 
    reason=Qt::ActiveWindowFocusReason) at kernel/qwidget.cpp:4511
#40 0x00002b09b07aa912 in QApplication::setActiveWindow (act=0xd769c0)
    at kernel/qapplication.cpp:2208
#41 0x00002b09b080bef9 in QApplication::x11ProcessEvent (this=0x7fff004c8e60, 
    event=0x7fff004c8a30) at kernel/qapplication_x11.cpp:2959
#42 0x00002b09b0835beb in x11EventSourceDispatch (s=0x62b050, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:135
#43 0x00002b09b332c044 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#44 0x00002b09b332f33d in ?? () from /usr/lib64/libglib-2.0.so.0
#45 0x00002b09b332f80e in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#46 0x00002b09b00dfc0a in QEventDispatcherGlib::processEvents (this=0x626260, 
    flags=@0x7fff004c8cc0) at kernel/qeventdispatcher_glib.cpp:338
#47 0x00002b09b0835487 in QGuiEventDispatcherGlib::processEvents (
    this=0x626260, flags=@0x7fff004c8d10)
    at kernel/qguieventdispatcher_glib.cpp:191
#48 0x00002b09b00b4df1 in QEventLoop::processEvents (this=0x7fff004c8dc0, 
    flags=@0x7fff004c8d70) at kernel/qeventloop.cpp:140
#49 0x00002b09b00b4f46 in QEventLoop::exec (this=0x7fff004c8dc0, 
    flags=@0x7fff004c8dd0) at kernel/qeventloop.cpp:182
#50 0x00002b09b00b83ca in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:759
#51 0x00002b09b07a3e5c in QApplication::exec () at kernel/qapplication.cpp:3053
#52 0x00002b09aa8af0bb in kdemain (argc=1, argv=0x7fff004c90d8)
    at /install/kde4/kdebase/apps/konsole/src/main.cpp:98
#53 0x00000000004009d3 in main (argc=1, argv=0x7fff004c90d8)
    at /install/kde4/kdebase/apps/konsole/src/konsole_dummy.cpp:3
#0  0x00002b09b1d08460 in nanosleep () from /lib64/libc.so.6
Comment 2 Robert Knight 2007-12-30 19:24:48 UTC
Hello,

I haven't been able to reproduce the crash here (SVN revision #754536, although I haven't changed anything since the bug was reported which is likely to affect this).  

Can you try the following to see whether they affect the bug:

- Whether the menu bar is visible
- Whether the context menu has ever been shown in the tab being closed
- The content of the tabs (ie. the program running in the session)
- The number of tabs open
- Whether the terminal has a split view or not

Comment 3 mutlu inek 2008-01-02 20:43:50 UTC
Hi Robert,

All I need to do is open konsole without ever having touched the config file or set anything through the menu. I double click to the right of the open tab to create more tabs. Then I click the close button in the window title bar. The popup offers me to quit, close the current tab or cancel. If I chose "close current tab", the chance that the tab is closed is something around 90%, the chance that konsole crashes around 10% (these are estimates based on 'feeling'). Therefore, in order to easily reproduce this, I open maybe 10 tabs and close them one by one using the above method. (This also means, however, that it may not crash even when closing 10 tabs. This is unlikely, though.) No programs are running in konsole, nothing is modified.

I.e.
- menu bar is visible
- context menu has not been shown
- no programs running
- at least 2 tabs; to reproduce more easily, I open ~10
- no split view

I just reproduced this again with a current SVN (r755993)
Comment 4 Robert Knight 2008-01-15 23:10:51 UTC
SVN revision #761925

Potential fix for sporadic crash when selecting 'Close current tab' option when closing a window.  Extract method for disconnecting a controller in the main window and call it in queryClose() before closing the plugged controller's session.

The fix will appear in KDE 4.0.1