Bug 170461 - konqueror does not terminate
Summary: konqueror does not terminate
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.1.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
: 170517 171421 (view as bug list)
Depends on:
Reported: 2008-09-05 17:06 UTC by George Kiagiadakis
Modified: 2008-09-22 15:35 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description George Kiagiadakis 2008-09-05 17:06:25 UTC
Version:            (using KDE 4.1.1)
Compiler:          gcc version 4.3.1 (Debian 4.3.1-9) 
OS:                Linux
Installed from:    Debian testing/unstable Packages

This is not a duplicate of bug 167826 or bug 169881. I have the javascript debugger disabled and I am using KDE 4.1.1

Now, if I open konqueror with a url as an argument, this konqueror instance never terminates. If I open it without a url argument, it terminates when I close the window. This is always reproducable. Run for example "konqueror www.kde.org" in the command line and close the window. It will not return control to the shell. gdb reveals that it is in the event loop and that the KGlobal ref counter is 1.
Comment 1 Kevin Kofler 2008-09-16 23:20:41 UTC
This is caused by the patch for http://bugs.kde.org/show_bug.cgi?id=169881 (see details there).
Comment 2 Kevin Kofler 2008-09-16 23:26:17 UTC
*** Bug 170517 has been marked as a duplicate of this bug. ***
Comment 3 Kevin Kofler 2008-09-17 08:15:44 UTC
So some people report this bug to happen when Konqueror is started with a URL, some without, I'm not sure why. Let's try to figure it out. I think that those are the same underlying issue, but if it turns out not to be the same bug, we can reopen bug 170517. What's sure is that neither is the same as bug 167826.
Comment 4 Kevin Kofler 2008-09-17 08:19:57 UTC
Can all of you please try a build with revision 852920 (i.e. the patch for
bug 169881) reverted? I.e. with the following patch applied:

For those using Fedora, you can try kdelibs-4.1.1-9.fc9:
Comment 5 George Kiagiadakis 2008-09-17 09:53:17 UTC
Well done Kevin :) I also wanted to fix all those bug reports but I wasn't sure if I should do it.

So, as I have already stated in bug 167826 comment 42, the problem is that the javascript debugger always opens hidden in the background and never closes. As the js debugger is a KMainWindow, this prevents the application (konqueror or whatever) from closing. I am sure about this, because I figured it out using gdb (with breakpoints set to KGlobal::ref() and KGlobal::deref()).

For the record, this bug also causes bug 170981 (akregator starts with two system tray icons and very inconsistent state).

PS: And to clarify things from my position, this bug appears *always* when the khtml part is loaded in konqueror (i.e. not only when konqueror is started with a url argument as I had initially reported)
Comment 6 Maksim Orlovich 2008-09-17 15:32:23 UTC
I can't confirm. Please provide a backtrace describing how the DebugWindow constructor got called.
Comment 7 Kevin Kofler 2008-09-17 15:43:11 UTC
Hmmm, what GCC are you using? The reports of this bug are all with GCC 4.3.x.
Comment 8 George Kiagiadakis 2008-09-18 11:50:09 UTC
The requested backtrace:

Breakpoint 1, KGlobal::ref () at /tmp/buildd/kde4libs-4.1.1/kdecore/kernel/kglobal.cpp:265
265     in /tmp/buildd/kde4libs-4.1.1/kdecore/kernel/kglobal.cpp                          
(gdb) bt                                                                                  
#0  KGlobal::ref () at /tmp/buildd/kde4libs-4.1.1/kdecore/kernel/kglobal.cpp:265          
#1  0x00007f624413fa29 in KMainWindowPrivate::init (this=0x311ef60, _q=0x30c13a0) at /tmp/buildd/kde4libs-4.1.1/kdeui/widgets/kmainwindow.cpp:227
#2  0x00007f624413ff5b in KMainWindow (this=0x30c13a0, dd=@0x311ef60, parent=<value optimized out>, f=<value optimized out>)                     
    at /tmp/buildd/kde4libs-4.1.1/kdeui/widgets/kmainwindow.cpp:222                                                                              
#3  0x00007f62441795f2 in KXmlGuiWindow (this=0x30c13a0, __vtt_parm=0x7f623674c3e8, parent=0x0, f=<value optimized out>)                         
    at /tmp/buildd/kde4libs-4.1.1/kdeui/xmlgui/kxmlguiwindow.cpp:87                                                                              
#4  0x00007f62363cdee5 in DebugWindow (this=0x30c13a0, parent=0x0) at /tmp/buildd/kde4libs-4.1.1/khtml/ecma/debugger/debugwindow.cpp:107         
#5  0x00007f62363ce4c7 in KJSDebugger::DebugWindow::window () at /tmp/buildd/kde4libs-4.1.1/khtml/ecma/debugger/debugwindow.cpp:98               
#6  0x00007f62363ad3e0 in KJS::JSEventListener::handleEvent (this=0x311ef60, evt=@0x30c13a0) at /tmp/buildd/kde4libs-4.1.1/khtml/ecma/kjs_events.cpp:68
#7  0x00007f62361bebd3 in DOM::DocumentImpl::defaultEventHandler (this=0x2b43bf0, evt=0x2be7440) at /tmp/buildd/kde4libs-4.1.1/khtml/xml/dom_docimpl.cpp:2699
#8  0x00007f62361d82d0 in DOM::NodeImpl::dispatchWindowEvent (this=0x2b43c08, _id=16, canBubbleArg=<value optimized out>, cancelableArg=<value optimized out>)
    at /tmp/buildd/kde4libs-4.1.1/khtml/xml/dom_nodeimpl.cpp:565                                                                                              
#9  0x00007f6236226809 in DOM::HTMLDocumentImpl::close (this=0x2b43bf0) at /tmp/buildd/kde4libs-4.1.1/khtml/html/html_documentimpl.cpp:249                    
#10 0x00007f623615cbcd in KHTMLPart::checkCompleted (this=0x2aa8370) at /tmp/buildd/kde4libs-4.1.1/khtml/khtml_part.cpp:2274                                  
#11 0x00007f6236189fc3 in KHTMLPart::qt_metacall (this=0x2aa8370, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4d5cfb80)             
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/khtml/khtml_part.moc:314                                                                               
#12 0x00007f6241f8f474 in QMetaObject::activate (sender=0x2a1ece0, from_signal_index=<value optimized out>, to_signal_index=5, argv=0xa)                      
    at kernel/qobject.cpp:3016                                                                                                                                
#13 0x00007f6236320adb in khtml::Loader::requestDone (this=0x311ef60, _t1=0x300d5e0, _t2=0x2c8c190)                                                           
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/khtml/loader.moc:150                                                                                   
#14 0x00007f6236325e9d in khtml::Loader::slotFinished (this=0x2a1ece0, job=0x2c9bfc0) at /tmp/buildd/kde4libs-4.1.1/khtml/misc/loader.cpp:1404                
#15 0x00007f623632b767 in khtml::Loader::qt_metacall (this=0x2a1ece0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4d5cfd90)         
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/khtml/loader.moc:129                                                                                   
#16 0x00007f6241f8f474 in QMetaObject::activate (sender=0x2c9bfc0, from_signal_index=<value optimized out>, to_signal_index=7, argv=0xa)                      
    at kernel/qobject.cpp:3016                                                                                                                                
#17 0x00007f6243b05592 in KJob::result (this=0x311ef60, _t1=0x2c9bfc0) at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/kdecore/kjob.moc:186                
#18 0x00007f6243b05957 in KJob::emitResult (this=0x2c9bfc0) at /tmp/buildd/kde4libs-4.1.1/kdecore/jobs/kjob.cpp:290                                           
#19 0x00007f6244548ed0 in KIO::SimpleJob::slotFinished (this=0x2c9bfc0) at /tmp/buildd/kde4libs-4.1.1/kio/kio/job.cpp:498                                     
#20 0x00007f624454f703 in KIO::TransferJob::slotFinished (this=0x2c9bfc0) at /tmp/buildd/kde4libs-4.1.1/kio/kio/job.cpp:967                                   
#21 0x00007f6244550465 in KIO::TransferJob::qt_metacall (this=0x2c9bfc0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4d5d0190)      
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/kio/jobclasses.moc:336                                                                                 
#22 0x00007f6241f8f474 in QMetaObject::activate (sender=0x24ecf30, from_signal_index=<value optimized out>, to_signal_index=8, argv=0xa)                      
    at kernel/qobject.cpp:3016                                                                                                                                
#23 0x00007f62446035d1 in KIO::SlaveInterface::dispatch (this=0x24ecf30, _cmd=104, rawdata=<value optimized out>)                                             
    at /tmp/buildd/kde4libs-4.1.1/kio/kio/slaveinterface.cpp:175                                                                                              
#24 0x00007f6244600432 in KIO::SlaveInterface::dispatch (this=0x24ecf30) at /tmp/buildd/kde4libs-4.1.1/kio/kio/slaveinterface.cpp:90                          
#25 0x00007f62445f1493 in KIO::Slave::gotInput (this=0x24ecf30) at /tmp/buildd/kde4libs-4.1.1/kio/kio/slave.cpp:319                                           
#26 0x00007f62445f3bb8 in KIO::Slave::qt_metacall (this=0x24ecf30, _c=QMetaObject::InvokeMetaMethod, _id=1145329712, _a=0x7fff4d5d05b0)                       
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/kio/slave.moc:75                                                                                       
#27 0x00007f6241f8f474 in QMetaObject::activate (sender=0x2c00910, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xa)                      
    at kernel/qobject.cpp:3016                                                                                                                                
#28 0x00007f62445167c0 in KIO::ConnectionPrivate::dequeue (this=0x2ad4070) at /tmp/buildd/kde4libs-4.1.1/kio/kio/connection.cpp:82
#29 0x00007f62445168fa in KIO::Connection::qt_metacall (this=0x2c00910, _c=QMetaObject::InvokeMetaMethod, _id=1145329712, _a=0x2918ea0)
    at /tmp/buildd/kde4libs-4.1.1/obj-x86_64-linux-gnu/kio/connection.moc:72
#30 0x00007f6241f8a0e5 in QObject::event (this=0x2c00910, e=0x2b303d0) at kernel/qobject.cpp:1140
#31 0x00007f624269a41d in QApplicationPrivate::notify_helper (this=0x23cb0f0, receiver=0x2c00910, e=0x2b303d0) at kernel/qapplication.cpp:3800
#32 0x00007f62426a217a in QApplication::notify (this=0x7fff4d5d11e0, receiver=0x2c00910, e=0x2b303d0) at kernel/qapplication.cpp:3765
#33 0x00007f6244082fab in KApplication::notify (this=0x7fff4d5d11e0, receiver=0x2c00910, event=0x2b303d0)
    at /tmp/buildd/kde4libs-4.1.1/kdeui/kernel/kapplication.cpp:311
#34 0x00007f6241f7b11f in QCoreApplication::notifyInternal (this=0x7fff4d5d11e0, receiver=0x2c00910, event=0x2b303d0) at kernel/qcoreapplication.cpp:591
#35 0x00007f6241f7bdba in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x23b62d0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#36 0x00007f6241fa37d3 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#37 0x00007f623ead1892 in IA__g_main_context_dispatch (context=0x23cd880) at /build/buildd/glib2.0-2.16.5/glib/gmain.c:2012
#38 0x00007f623ead501d in g_main_context_iterate (context=0x23cd880, block=1, dispatch=1, self=<value optimized out>)
    at /build/buildd/glib2.0-2.16.5/glib/gmain.c:2645
#39 0x00007f623ead51db in IA__g_main_context_iteration (context=0x23cd880, may_block=1) at /build/buildd/glib2.0-2.16.5/glib/gmain.c:2708
#40 0x00007f6241fa345f in QEventDispatcherGlib::processEvents (this=0x23ca130, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:325
#41 0x00007f624272b86f in QGuiEventDispatcherGlib::processEvents (this=0x311ef60, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#42 0x00007f6241f79a42 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 1297944352}) at kernel/qeventloop.cpp:149
#43 0x00007f6241f79bcd in QEventLoop::exec (this=0x7fff4d5d0f60, flags={i = 1297944432}) at kernel/qeventloop.cpp:200
#44 0x00007f6241f7c07d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:849
#45 0x00007f624518ab71 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /tmp/buildd/kdebase-4.1.1/apps/konqueror/src/konqmain.cpp:227
#46 0x00007f6244d8a1a6 in __libc_start_main () from /lib/libc.so.6
#47 0x0000000000400629 in _start ()
Comment 9 Maksim Orlovich 2008-09-18 15:12:12 UTC
That should be fixed in r.854183; while 4.1.1 is 853753 + one backport.

Comment 10 Kevin Kofler 2008-09-22 07:29:23 UTC
Closing as fixed in 4.1.2.
Comment 11 Maksim Orlovich 2008-09-22 15:35:04 UTC
*** Bug 171421 has been marked as a duplicate of this bug. ***