Bug 153533 - konqueror crash on link to javascript:self.close()
Summary: konqueror crash on link to javascript:self.close()
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 153339 153851 154401 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-06 03:04 UTC by Fede
Modified: 2007-12-21 08:16 UTC (History)
4 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 Fede 2007-12-06 03:04:28 UTC
Version:           3.96.1 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          g++ 4.13 
OS:                Linux

if you click on a link that points to "javascript:self.close()" the browser crash..

to reproduce:
go to kde-apps.org
click on any app, after click on the screenshot, this will open a new tab
the link of the screenshot will crash the browser



backtrace
---------
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1238985024 (LWP 9734)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb6612875 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb6614201 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb660bb6e in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#10 0xb7e4488b in KonqView::url () from /opt/kde4/lib/libkdeinit4_konqueror.so
#11 0xb7ea0ce2 in KonqMainWindow::slotAddClosedUrl ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#12 0xb7eb8a79 in KonqMainWindow::qt_metacall ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#13 0xb720bc04 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0xb720c079 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#15 0xb7e507f3 in KonqViewManager::aboutToRemoveTab ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#16 0xb7e5660a in KonqViewManager::removeTab ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#17 0xb7e56d4d in KonqViewManager::removeView ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#18 0xb7e5bb4a in KonqViewManager::removePart ()
   from /opt/kde4/lib/libkdeinit4_konqueror.so
#19 0xb7da0bd9 in KParts::Part::~Part () from /opt/kde4/lib/libkparts.so.4
#20 0xb7da117a in KParts::ReadOnlyPart::~ReadOnlyPart ()
   from /opt/kde4/lib/libkparts.so.4
#21 0xb3a86d64 in KHTMLPart::~KHTMLPart () from /opt/kde4/lib/libkhtml.so.5
#22 0xb720c8ad in QObject::event () from /usr/lib/libQtCore.so.4
#23 0xb69d644d in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#24 0xb69d674e in QApplication::notify () from /usr/lib/libQtGui.so.4
#25 0xb778652a in KApplication::notify () from /opt/kde4/lib/libkdeui.so.5
#26 0xb71fa456 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#27 0xb71fd81f in ?? () from /usr/lib/libQtCore.so.4
#28 0xbfb8214c in ?? ()
#29 0x08e4d190 in ?? ()
#30 0x0839a4f8 in ?? ()
#31 0xb71403d7 in ?? () from /usr/lib/libQtCore.so.4
#32 0x0804bf74 in ?? ()
#33 0xb727fe20 in ?? () from /usr/lib/libQtCore.so.4
#34 0xbfb81d38 in ?? ()
#35 0xb71fa92d in QCoreApplicationPrivate::sendPostedEvents ()
   from /usr/lib/libQtCore.so.4
Backtrace stopped: frame did not save the PC
#0  0xffffe410 in __kernel_vsyscall ()
Comment 1 Marcin Ślusarz 2007-12-09 11:30:23 UTC
i've got it too. better backtrace is below:
i'm using kde4daily rev 746143

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1237563696 (LWP 3934)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb66d3df0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb66d5641 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb66cd43b in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#10 0xb7e98ab0 in KonqView::url (this=0x836a548)
    at /storage/tmp/kde4dev/kdebase/apps/konqueror/src/konqview.cpp:873
#11 0xb7ed1633 in KonqMainWindow::slotAddClosedUrl (this=0x80fea00, 
    tab=0x83653c4)
    at /storage/tmp/kde4dev/kdebase/apps/konqueror/src/konqmainwindow.cpp:5340
#12 0xb7ef3bef in KonqMainWindow::qt_metacall (this=0x80fea00, 
    _c=QMetaObject::InvokeMetaMethod, _id=45, _a=0xbf88220c)
    at /storage/tmp/kde4dev/kdebase-build/apps/konqueror/src/konqmainwindow.moc:365
#13 0xb72ccbc0 in QMetaObject::activate ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#14 0xb72cd035 in QMetaObject::activate ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#15 0xb7ea18b8 in KonqViewManager::aboutToRemoveTab (this=0x8105770, 
    _t1=0x83653c4)
    at /storage/tmp/kde4dev/kdebase-build/apps/konqueror/src/konqviewmanager.moc:100
#16 0xb7ea7537 in KonqViewManager::removeTab (this=0x8105770, 
    currentFrame=0x83653c4)
    at /storage/tmp/kde4dev/kdebase/apps/konqueror/src/konqviewmanager.cpp:366
#17 0xb7ea7c95 in KonqViewManager::removeView (this=0x8105770, view=0x836a548)
    at /storage/tmp/kde4dev/kdebase/apps/konqueror/src/konqviewmanager.cpp:563
#18 0xb7ea83b5 in KonqViewManager::removePart (this=0x8105770, part=0x813a6c0)
    at /storage/tmp/kde4dev/kdebase/apps/konqueror/src/konqviewmanager.cpp:603
#19 0xb7df3c09 in ~Part (this=0x813a6c0, __vtt_parm=0xb48d3988)
    at /storage/tmp/kde4dev/kdelibs/kparts/part.cpp:204
#20 0xb7df3f95 in ~ReadOnlyPart (this=0x813a6c0, __vtt_parm=0xb48d3984)
    at /storage/tmp/kde4dev/kdelibs/kparts/part.cpp:455
#21 0xb451f0f7 in ~KHTMLPart (this=0x813a6c0)
    at /storage/tmp/kde4dev/kdelibs/khtml/khtml_part.cpp:520
#22 0xb72cd869 in QObject::event ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#23 0xb6a94ce1 in QApplicationPrivate::notify_helper ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtGui.so.4
#24 0xb6a94fe2 in QApplication::notify ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtGui.so.4
#25 0xb784e8d7 in KApplication::notify (this=0xbf882ddc, receiver=0x813a6c0, 
    event=0x8a3cb70)
    at /storage/tmp/kde4dev/kdelibs/kdeui/kernel/kapplication.cpp:319
#26 0xb72bb41e in QCoreApplication::notifyInternal ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#27 0xb72be7ed in QCoreApplication::sendEvent ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#28 0xb72bb8f5 in QCoreApplicationPrivate::sendPostedEvents ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#29 0xb72bba4b in QCoreApplication::sendPostedEvents ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#30 0xb72e4e61 in postEventSourceDispatch ()
   from /storage/tmp/kde4dev/qt-unstable/lib/libQtCore.so.4
#31 0xb6568df2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#32 0xb656bdcf in ?? () from /usr/lib/libglib-2.0.so.0
#33 0x08060698 in ?? ()
#34 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 2 Alyssa Hung 2007-12-10 02:54:35 UTC
I have the same problem on the same family of sites, most frequently kde-look.org. The crash only occurs if the page with the javascript:self.close() instruction is not the only tab in the Konqueror window. Konqueror does not crash if a self.close() instruction is invoked in a single-tabbed window.

Using a KDE SVN snapshot from 2007-12-08, compiled with GCC 4.2.2 on Arch Linux (current).

Backtrace:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0x2b2ab7b5e590 (LWP 26002)]
[KCrash handler]
#5  0x00002b2ab59920b5 in raise () from /lib/libc.so.6
#6  0x00002b2ab5993560 in abort () from /lib/libc.so.6
#7  0x00002b2ab598b6af in __assert_fail () from /lib/libc.so.6
#8  0x00002b2aaf6804a6 in KonqView::url (this=<value optimized out>)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqview.cpp:873
#9  0x00002b2aaf6d284c in KonqMainWindow::slotAddClosedUrl (this=0x726d60, 
    tab=0x14616d8)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqmainwindow.cpp:5340
#10 0x00002b2aaf6eaed4 in KonqMainWindow::qt_metacall (this=0x726d60, 
    _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7ffffb67f0e0)
    at /usr/src/kde4/build/kdebase/apps/konqueror/src/konqmainwindow.moc:365
#11 0x00002b2ab346ea21 in QMetaObject::activate (sender=0x75e200, 
    from_signal_index=10, to_signal_index=10, argv=0xffffffffffffffff)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qobject.cpp:3087
#12 0x00002b2aaf68b44f in KonqViewManager::aboutToRemoveTab (this=0x6592, 
    _t1=0x14616d8)
    at /usr/src/kde4/build/kdebase/apps/konqueror/src/konqviewmanager.moc:100
#13 0x00002b2aaf690f4f in KonqViewManager::removeTab (this=0x75e200, 
    currentFrame=0x14616d8)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqviewmanager.cpp:366
#14 0x00002b2aaf691710 in KonqViewManager::removeView (this=0x75e200, 
    view=0x1460a50)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqviewmanager.cpp:563
#15 0x00002b2aaf6965d6 in KonqViewManager::removePart (this=0x75e200, 
    part=<value optimized out>)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqviewmanager.cpp:603
#16 0x00002b2aafdb038d in ~Part (this=0x145ddf0, __vtt_parm=0x2b2abcf42350)
    at /usr/src/kde4/kdelibs/kparts/part.cpp:204
#17 0x00002b2abc9c3cf4 in ~KHTMLPart (this=0x145ddf0)
    at /usr/src/kde4/kdelibs/khtml/khtml_part.cpp:520
#18 0x00002b2ab346c22a in QObject::event (this=0x6592, e=0xffffffffffffffff)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qobject.cpp:1114
#19 0x00002b2ab3f90c2a in QApplicationPrivate::notify_helper (this=0x640640, 
    receiver=0x145ddf0, e=0x1545820)
    at /usr/src/kde4/qt-copy/src/gui/kernel/qapplication.cpp:3556
#20 0x00002b2ab3f97005 in QApplication::notify (this=0x7ffffb680250, 
    receiver=0x145ddf0, e=0x1545820)
    at /usr/src/kde4/qt-copy/src/gui/kernel/qapplication.cpp:3497
#21 0x00002b2ab0ae036b in KApplication::notify (this=0x7ffffb680250, 
    receiver=0x145ddf0, event=0x1545820)
    at /usr/src/kde4/kdelibs/kdeui/kernel/kapplication.cpp:319
#22 0x00002b2ab345e5d0 in QCoreApplication::notifyInternal (
    this=0x7ffffb680250, receiver=0x145ddf0, event=0x1545820)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qcoreapplication.cpp:530
#23 0x00002b2ab345ff61 in QCoreApplicationPrivate::sendPostedEvents (
    receiver=0x0, event_type=0, data=0x603f60)
    at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:200
#24 0x00002b2ab347cefc in postEventSourceDispatch (s=<value optimized out>)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:207
#25 0x00002b2ab6addf44 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#26 0x00002b2ab6ae122d in g_main_context_iterate ()
   from /usr/lib/libglib-2.0.so.0
#27 0x00002b2ab6ae16fe in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#28 0x00002b2ab347d141 in QEventDispatcherGlib::processEvents (this=0x616220, 
    flags=<value optimized out>)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:338
#29 0x00002b2ab3fff76f in QGuiEventDispatcherGlib::processEvents (this=0x6592, 
    flags=<value optimized out>)
    at /usr/src/kde4/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:191
#30 0x00002b2ab345db88 in QEventLoop::processEvents (
    this=<value optimized out>, flags=<value optimized out>)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qeventloop.cpp:140
#31 0x00002b2ab345dc9d in QEventLoop::exec (this=0x7ffffb67ffe0, 
    flags=@0x7ffffb67fff0)
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qeventloop.cpp:182
#32 0x00002b2ab34602c1 in QCoreApplication::exec ()
    at /usr/src/kde4/qt-copy/src/corelib/kernel/qcoreapplication.cpp:759
#33 0x00002b2aaf70b44a in kdemain (argc=<value optimized out>, 
    argv=<value optimized out>)
    at /usr/src/kde4/kdebase/apps/konqueror/src/konqmain.cpp:218
#34 0x00002b2ab597f164 in __libc_start_main () from /lib/libc.so.6
#35 0x0000000000400869 in _start ()
#0  0x00002b2ab59f7fb1 in nanosleep () from /lib/libc.so.6
Comment 3 Tommi Tervo 2007-12-10 08:20:30 UTC
*** Bug 153339 has been marked as a duplicate of this bug. ***
Comment 4 Pino Toscano 2007-12-11 17:30:45 UTC
*** Bug 153851 has been marked as a duplicate of this bug. ***
Comment 5 Maksim Orlovich 2007-12-11 19:12:28 UTC
Another high-priority-for-release target bug, I think.
Comment 6 David Faure 2007-12-17 22:02:39 UTC
SVN commit 749776 by dfaure:

Fix crash when a part in a tab commits suicide (e.g. due to javascript:self.close()).
With unit test, because fixing the same bugs over and over again every 4 years is getting tiresome :)
BUG: 153533


 M  +15 -22    konqmainwindow.cpp  
 M  +17 -1     tests/konqviewmgrtest.cpp  
 M  +1 -0      tests/konqviewmgrtest.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=749776
Comment 7 Tommi Tervo 2007-12-21 08:16:32 UTC
*** Bug 154401 has been marked as a duplicate of this bug. ***