Bug 70221 - konsole crash after detaching a session and ctrl+d in it attached the session back but konsole crashed after that
Summary: konsole crash after detaching a session and ctrl+d in it attached the session...
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: 2003-12-12 13:58 UTC by crazycrusoe
Modified: 2003-12-18 23:11 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crazycrusoe 2003-12-12 13:58:32 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 mdk 9.2 stock gcc
OS:          Linux

dont know what happened, but i had opened konsole, with 2 tabs in it, detached the 2nd tab, when my cvs download was finished, i did some thing i think exit in the detached session, then it attached it to the main console, but no input suddenly worked, and it crashed

attached back trace, hope it helps

0x411dd656 in waitpid () from /lib/i686/libpthread.so.0
#0  0x411dd656 in waitpid () from /lib/i686/libpthread.so.0
#1  0x4075c22f in KCrash::defaultCrashHandler(int) ()
   from /home/irfan/downloads/kde3.2/lib/libkdecore.so.4
#2  0x411dc4ec in __pthread_clock_settime () from /lib/i686/libpthread.so.0
#3  0x41352ca8 in __libc_sigaction () from /lib/i686/libc.so.6
#4  0x41af7c40 in Konsole::activateSession(TESession*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeinit_konsole.so
#5  0x41af789d in Konsole::activateSession(int) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeinit_konsole.so
#6  0x41af78e1 in Konsole::activateSession(QWidget*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeinit_konsole.so
#7  0x41b02247 in Konsole::qt_invoke(int, QUObject*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeinit_konsole.so
#8  0x40b2c497 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#9  0x40e394a6 in QTabWidget::currentChanged(QWidget*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#10 0x40c45658 in QTabWidget::showTab(int) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#11 0x40e395a1 in QTabWidget::qt_invoke(int, QUObject*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#12 0x405ce103 in KTabWidget::qt_invoke(int, QUObject*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeui.so.4
#13 0x40b2c497 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#14 0x40b2c58e in QObject::activate_signal(int, int) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#15 0x40e38eb8 in QTabBar::selected(int) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#16 0x40c424af in QTabBar::setCurrentTab(QTab*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#17 0x40c420a5 in QTabBar::mousePressEvent(QMouseEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#18 0x405cad97 in KTabBar::mousePressEvent(QMouseEvent*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdeui.so.4
#19 0x40b5e421 in QWidget::event(QEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#20 0x40c42f2d in QTabBar::event(QEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#21 0x40ad326f in QApplication::internalNotify(QObject*, QEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#22 0x40ad2911 in QApplication::notify(QObject*, QEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#23 0x406bda08 in KApplication::notify(QObject*, QEvent*) ()
   from /home/irfan/downloads/kde3.2/lib/libkdecore.so.4
#24 0x40a6de7c in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#25 0x40a6b9c5 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#26 0x40a80c7d in QEventLoop::processEvents(unsigned) ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#27 0x40ae573a in QEventLoop::enterLoop() ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#28 0x40ae5624 in QEventLoop::exec() ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#29 0x40ad3480 in QApplication::exec() ()
   from /home/irfan/downloads/qt-copy/lib/libqt-mt.so.3
#30 0x41ae69e0 in kdemain ()
   from /home/irfan/downloads/kde3.2/lib/libkdeinit_konsole.so
#31 0x4085d930 in kdeinitmain ()
   from /home/irfan/downloads/kde3.2/lib/kde3/konsole.so
#32 0x0804d1a8 in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#33 0x0804e072 in handle_launcher_request(int) ()
#34 0x0804e608 in handle_requests(int) ()
#35 0x0804f63e in main ()
#36 0x4133fc57 in __libc_start_main () from /lib/i686/libc.so.6
Comment 1 Thiago Macieira 2003-12-12 23:14:06 UTC
Confirmed:

- open Konsole
- create new session
- detach new session
- exit detached session (through exit or Ctrl+D)
-> the exited session reattaches to the main window
- select the other session
-> crash

Here goes a backtrace with debugging info:
#4  0x41593141 in Konsole::activateSession(TESession*) (this=0x816d518, 
    s=0x81e8188)
    at /home/thiago/programs/src/kde/kdebase/konsole/konsole/konsole.cpp:2367
#5  0x41592fb3 in Konsole::activateSession(int) (this=0x816d518, position=0)
    at qptrlist.h:103
#6  0x41592fe8 in Konsole::activateSession(QWidget*) (this=0x816d518, 
    w=0x819e238)
    at /home/thiago/programs/src/kde/kdebase/konsole/konsole/konsole.cpp:2326
#7  0x4159b2de in Konsole::qt_invoke(int, QUObject*) (this=0x816d518, _id=71, 
    _o=0xbfffe450) at qucom_p.h:312
#8  0x40a58e09 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#9  0x40d9b856 in QTabWidget::currentChanged(QWidget*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#10 0x40b84a67 in QTabWidget::showTab(int) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#11 0x40d9b994 in QTabWidget::qt_invoke(int, QUObject*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#12 0x4051cc2b in KTabWidget::qt_invoke(int, QUObject*) (this=0x81a6d20, 
    _id=48, _o=0xbfffe590) at ktabwidget.moc:354
#13 0x40a58e09 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#14 0x40a58f3c in QObject::activate_signal(int, int) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#15 0x40d9b2a5 in QTabBar::selected(int) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#16 0x40b81af7 in QTabBar::setCurrentTab(QTab*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#17 0x40b81716 in QTabBar::mousePressEvent(QMouseEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#18 0x4051a125 in KTabBar::mousePressEvent(QMouseEvent*) (this=0x81a9960, 
    e=0xbfffeaec)
    at /home/thiago/programs/src/kde/kdelibs/kdeui/ktabbar.cpp:108
#19 0x40a8f823 in QWidget::event(QEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#20 0x40b8245d in QTabBar::event(QEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#21 0x409fb6e9 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#22 0x409fadfd in QApplication::notify(QObject*, QEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#23 0x40609452 in KApplication (this=0xbffff244, argc=@0x81a9960, 
    argv=0xbfffeaec, rAppName=@0x40f9d5c0, allowStyles=false, GUIenabled=false)
    at qstring.h:840
#24 0x40992c2f in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#25 0x40990586 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#26 0x409a5ef9 in QEventLoop::processEvents(unsigned) ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#27 0x40a0f4b3 in QEventLoop::enterLoop() ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#28 0x40a0f378 in QEventLoop::exec() ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#29 0x409fb918 in QApplication::exec() ()
   from /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3
#30 0x41585587 in kdemain (argc=3, argv=0x806d6a0)
    at /home/thiago/programs/src/kde/kdebase/konsole/konsole/main.cpp:483
#31 0x4154d99a in kdeinitmain (argc=3, argv=0x806d6a0) at konsole_dummy.cpp:2
#32 0x0804ccd3 in launch (argc=3, _name=0x806da0c "konsole", 
    args=0x806da21 "\001", cwd=0x0, envc=1, envs=0x806da32 "", 
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x804f5fd "0")
    at /home/thiago/programs/src/kde/kdelibs/kinit/kinit.cpp:604
#33 0x0804d96a in handle_launcher_request (sock=8)
    at /home/thiago/programs/src/kde/kdelibs/kinit/kinit.cpp:1167
#34 0x0804de2e in handle_requests (waitForPid=0)
    at /home/thiago/programs/src/kde/kdelibs/kinit/kinit.cpp:1360
#35 0x0804ed8c in main (argc=1, argv=0xbffff8b4, envp=0xbffff8bc)
    at /home/thiago/programs/src/kde/kdelibs/kinit/kinit.cpp:1797
#36 0x41377654 in __libc_start_main () from /lib/libc.so.6
Current language:  auto; currently c
Comment 2 Thiago Macieira 2003-12-12 23:19:08 UTC
Valgrind logs:

==659270== Invalid read of size 1
==659270==    at 0x40162F26: strcmp (in /usr/lib/valgrind/valgrind.so)
==659270==    by 0x410A23E0: QObjectCleanupHandler::qt_cast(char const*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x4025AF5C: TESession::setListenToKeyPress(bool) (session.cpp:268)
==659270==    by 0x4024C15B: Konsole::activateSession(TESession*) (konsole.cpp:2369)
==659270==    by 0x4024BFB2: Konsole::activateSession(int) (qptrlist.h:103)
==659270==    by 0x4024BFE7: Konsole::activateSession(QWidget*) (konsole.cpp:2326)
==659270==    by 0x402542DD: Konsole::qt_invoke(int, QUObject*) (qucom_p.h:312)
==659270==    by 0x40D77E08: QObject::activate_signal(QConnectionList*, QUObject*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x410BA855: QTabWidget::currentChanged(QWidget*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40EA3A66: QTabWidget::showTab(int) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x410BA993: QTabWidget::qt_invoke(int, QUObject*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x4083BC2A: KTabWidget::qt_invoke(int, QUObject*) (ktabwidget.moc:354)
==659270==    by 0x40D77E08: QObject::activate_signal(QConnectionList*, QUObject*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40D77F3B: QObject::activate_signal(int, int) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x410BA2A4: QTabBar::selected(int) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40EA0AF6: QTabBar::setCurrentTab(QTab*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40EA0715: QTabBar::mousePressEvent(QMouseEvent*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40839124: KTabBar::mousePressEvent(QMouseEvent*) (ktabbar.cpp:108)
==659270==    by 0x40DAE822: QWidget::event(QEvent*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    by 0x40EA145C: QTabBar::event(QEvent*) (in /home/thiago/programs/obj-linux/kde/qt-copy/lib/libqt-mt.so.3.2.3)
==659270==    Address 0x1 is not stack'd, malloc'd or free'd

There are other memory errors that valgrind detected.
Comment 3 Stephan Binner 2003-12-18 23:11:03 UTC
Subject: kdebase/konsole/konsole

CVS commit by binner: 

Don't get confused if a detached session exits.
CCMAIL: 70221-done@bugs.kde.org


  M +7 -3      konsole_child.cpp   1.30


--- kdebase/konsole/konsole/konsole_child.cpp  #1.29:1.30
@@ -208,10 +208,14 @@ KonsoleChild::~KonsoleChild()
   se->setConnect(false);
 
-  TEWidget* old_te=te;
-  emit doneChild(this,se);
-  delete old_te;
   if (session_terminated) {
+    delete te;
     delete se;
     se=NULL;
+    emit doneChild(this,NULL);
+  }
+  else {
+    TEWidget* old_te=te;
+    emit doneChild(this,se);
+    delete old_te;
   }