Summary: | "abort javascript" dialog + closing tab leads to crash | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Sylvain Joyeux <doudou> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | hughjonesd |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch to suppress kaccel handling when a modal dialog is there. |
Description
Sylvain Joyeux
2002-12-08 02:47:44 UTC
Please provide a testcase html page with script Confirmed. Test page: <html> <script> while (true) ; </script> </html> Additional backtrace: (Runs in an assert that is there to catch this kind of unwanted recursion) [New Thread 16384 (LWP 14115)] 0x4143cfd6 in waitpid () from /lib/libpthread.so.0 #0 0x4143cfd6 in waitpid () from /lib/libpthread.so.0 #1 0x40931714 in KCrash::defaultCrashHandler(int) (sig=6) at kdecore/kcrash.cpp:246 #2 0x4143bbb1 in __pthread_sighandler () from /lib/libpthread.so.0 #3 <signal handler called> #4 0x415b1cc1 in kill () from /lib/libc.so.6 #5 0x41438011 in pthread_kill () from /lib/libpthread.so.0 #6 0x4143838b in raise () from /lib/libpthread.so.0 #7 0x415b1a54 in raise () from /lib/libc.so.6 #8 0x415b2fcc in abort () from /lib/libc.so.6 #9 0x415aaf3b in __assert_fail () from /lib/libc.so.6 #10 0x41c97edf in khtml::HTMLTokenizer::reset() (this=0x83c4980) at htmltokenizer.h:102 #11 0x41c9d3a5 in ~HTMLTokenizer (this=0x83c4980) at khtml/html/htmltokenizer.cpp:1594 #12 0x41c74dd9 in DOM::DocumentImpl::detach() (this=0x83b5530) at khtml/xml/dom_docimpl.cpp:1071 #13 0x41c371b1 in KHTMLPart::clear() (this=0x835b218) at khtml/khtml_part.cpp:1183 #14 0x41c32ac5 in ~KHTMLPart (this=0x835b218) at khtml/khtml_part.cpp:433 #15 0x4007a78a in ~KonqView (this=0x835af68) at qstring.h:844 #16 0x400859c3 in KonqViewManager::removeTab(KonqFrameBase*) (this=0x80dff88, tab=0x0) at konqueror/konq_viewmgr.cc:586 #17 0x400bfbd4 in KonqMainWindow::slotRemoveTab() (this=0x0) at konqueror/konq_mainwindow.cc:2380 #18 0x400d30e5 in KonqMainWindow::qt_invoke(int, QUObject*) (this=0x80d9618, _id=147, _o=0xbfffc980) at konq_mainwindow.moc:609 #19 0x40d9394b in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x81ac648, clist=0x81ac620, o=0xbfffc980) at kernel/qobject.cpp:2359 #20 0x40d937ea in QObject::activate_signal(int) (this=0x81ac648, signal=2) at kernel/qobject.cpp:2328 #21 0x4063cbf5 in KAction::activated() (this=0x81ac648) at qmetaobject.h:261 #22 0x4063c30c in KAction::slotActivated() (this=0x81ac648) at kdeui/kaction.cpp:1054 #23 0x4063cc9c in KAction::qt_invoke(int, QUObject*) (this=0x81ac648, _id=14, _o=0xbfffcaa0) at kaction.moc:181 #24 0x40d9394b in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x81ee4d8, clist=0x834ad70, o=0xbfffcaa0) at kernel/qobject.cpp:2359 #25 0x40d937ea in QObject::activate_signal(int) (this=0x81ee4d8, signal=2) at kernel/qobject.cpp:2328 #26 0x40925415 in KAccelPrivate::menuItemActivated() (this=0x81ee4d8) at qmetaobject.h:261 #27 0x409221b8 in KAccelPrivate::eventFilter(QObject*, QEvent*) ( this=0x81ee4d8, pEvent=0xbfffcf30) at kdecore/kaccel.cpp:319 #28 0x40d91398 in QObject::activate_filters(QEvent*) (this=0x80d9618, e=0xbfffcf30) at kernel/qobject.cpp:902 #29 0x40d9120a in QObject::event(QEvent*) (this=0x80d9618, e=0xbfffcf30) at kernel/qobject.cpp:735 #30 0x40dcb80b in QWidget::event(QEvent*) (this=0x80d9618, e=0xbfffcf30) at kernel/qwidget.cpp:4630 #31 0x40e9313b in QMainWindow::event(QEvent*) (this=0x80d9618, e=0xbfffcf30) at widgets/qmainwindow.cpp:1686 #32 0x400d1e7a in KonqMainWindow::event(QEvent*) (this=0x80d9618, e=0xbfffcf30) at konqueror/konq_mainwindow.cc:4944 #33 0x40d31199 in QApplication::internalNotify(QObject*, QEvent*) ( this=0xbffff1f0, receiver=0x80d9618, e=0xbfffcf30) at kernel/qapplication.cpp:2614 #34 0x40d307b4 in QApplication::notify(QObject*, QEvent*) (this=0xbffff1f0, receiver=0x835d468, e=0xbfffcf30) at kernel/qapplication.cpp:2371 #35 0x40892ebd in KApplication::notify(QObject*, QEvent*) (this=0xbffff1f0, receiver=0x835d468, event=0xbfffcf30) at kdecore/kapplication.cpp:506 #36 0x4091f8b2 in KAccelEventHandler::x11Event(_XEvent*) (this=0x80df680, pEvent=0x409fff8d) at kdecore/kaccel.cpp:104 #37 0x40898662 in KApplication::x11EventFilter(_XEvent*) (this=0xbffff1f0, _event=0xbfffd2b0) at kdecore/kapplication.cpp:1527 #38 0x40cb50eb in qt_x11EventFilter (ev=0xbfffd2b0) at kernel/qapplication_x11.cpp:382 #39 0x40cbe110 in QApplication::x11ProcessEvent(_XEvent*) (this=0xbffff1f0, event=0xbfffd2b0) at kernel/qapplication_x11.cpp:3253 #40 0x40cd8a58 in QEventLoop::processEvents(unsigned) (this=0x8085058, flags=4) at kernel/qeventloop_x11.cpp:192 #41 0x40d4534a in QEventLoop::enterLoop() (this=0x8085058) at kernel/qeventloop.cpp:198 #42 0x40d31383 in QApplication::enter_loop() (this=0xbffff1f0) at kernel/qapplication.cpp:2769 #43 0x40f2ba25 in QDialog::exec() (this=0x82c2360) at dialogs/qdialog.cpp:432 #44 0x406e3e4a in createKMessageBox (dialog=0x82c2360, icon=Warning, text=@0xbfffd670, strlist=@0xbfffd5f0, ask=@0xbfffd560, checkboxReturn=0xbfffd54b, options=1, details=@0x41238124) at kdeui/kmessagebox.cpp:285 #45 0x406e52bd in KMessageBox::warningYesNoListWId(unsigned long, QString const&, QStringList const&, QString const&, KGuiItem const&, KGuiItem const&, QString const&, int) (parent_id=0, text=@0xbfffd670, strlist=@0xbfffd5f0, caption=@0xbfffd570, buttonYes=@0xbfffd6a0, buttonNo=@0xbfffd660, dontAskAgainName=@0xbfffd6c0, options=5) at qstring.h:882 #46 0x406e50ff in KMessageBox::warningYesNoList(QWidget*, QString const&, QStringList const&, QString const&, KGuiItem const&, KGuiItem const&, QString const&, int) (parent=0x0, text=@0xbfffd670, strlist=@0xbfffd5f0, caption=@0xbfffd680, buttonYes=@0xbfffd6a0, buttonNo=@0xbfffd660, dontAskAgainName=@0xbfffd6c0, options=5) at qwidget.h:716 #47 0x406e5043 in KMessageBox::warningYesNo(QWidget*, QString const&, QString const&, KGuiItem const&, KGuiItem const&, QString const&, int) (parent=0x0, text=@0xbfffd670, caption=@0xbfffd680, buttonYes=@0xbfffd6a0, buttonNo=@0xbfffd660, dontAskAgainName=@0xbfffd6c0, options=5) at qstringlist.h:61 #48 0x41d91ffd in KJSCPUGuard::confirmTerminate() () at khtml/ecma/kjs_proxy.cpp:396 #49 0x41ecfd38 in KJS::ExecState::hadException() (this=0xbfffda00) at kjs/interpreter.cpp:384 #50 0x41ea3a72 in KJS::WhileNode::execute(KJS::ExecState*) (this=0x83c6028, exec=0xbfffda00) at kjs/nodes.cpp:2078 #51 0x41ea8eaf in KJS::SourceElementsNode::execute(KJS::ExecState*) ( this=0x83c6060, exec=0xbfffda00) at kjs/nodes.cpp:3049 #52 0x41ea2c03 in KJS::BlockNode::execute(KJS::ExecState*) (this=0x83c6098, exec=0xbfffda00) at kjs/nodes.cpp:1897 #53 0x41ea844c in KJS::FunctionBodyNode::execute(KJS::ExecState*) ( this=0x83c6098, exec=0xbfffda00) at kjs/nodes.cpp:2901 #54 0x41e9a485 in KJS::InterpreterImp::evaluate(KJS::UString const&, KJS::Value const&) (this=0x82d5a38, code=@0xbfffda00, thisV=@0xbfffdc00) at kjs/internal.cpp:876 #55 0x41ecf3e9 in KJS::Interpreter::evaluate(KJS::UString const&, KJS::Value const&) (this=0x0, code=@0xbfffdbf0, thisV=@0xbfffdc00) at kjs/interpreter.cpp:166 #56 0x41d908cd in KJSProxyImpl::evaluate(QString, int, QString const&, DOM::Node const&, KJS::Completion*) (this=0x833b950, filename= {static null = {static null = <same as static member of an already seen type>, d = 0x804b9e0, static shared_null = 0x804b9e0}, d = 0x0, static shared_null = 0x804b9e0}, baseLine=2, str=@0xbfffde80, n=@0xbfffdd70, completion=0xbfffdd00) at khtml/ecma/kjs_proxy.cpp:148 #57 0x41c360ab in KHTMLPart::executeScript(QString const&, int, DOM::Node const&, QString const&) (this=0x835b218, filename=@0xbfffdde0, baseLine=2, n=@0xbfffdd70, script=@0xbfffde80) at khtml/khtml_part.cpp:965 #58 0x41c990c9 in khtml::HTMLTokenizer::scriptExecution(QString const&, QString const&, int) (this=0x83c4980, str=@0xbfffde80, scriptURL=@0xbfffdd80, baseLine=1) at khtmlview.h:110 #59 0x41c98cb7 in khtml::HTMLTokenizer::scriptHandler() (this=0x83c4980) at khtml/html/htmltokenizer.cpp:406 #60 0x41c98a84 in khtml::HTMLTokenizer::parseSpecial(khtml::DOMStringIt&) ( this=0x83c4980, src=@0x83c4a94) at khtml/html/htmltokenizer.cpp:324 #61 0x41c9b983 in khtml::HTMLTokenizer::parseTag(khtml::DOMStringIt&) ( this=0x83c4980, src=@0x83c4a94) at khtml/html/htmltokenizer.cpp:1138 #62 0x41c9c517 in khtml::HTMLTokenizer::write(QString const&, bool) ( this=0x83c4980, str=@0xbfffe150, appendData=false) at khtml/html/htmltokenizer.cpp:1272 #63 0x41c3a37b in KHTMLPart::write(char const*, int) (this=0x835b218, str=0x83c86d0 "<html> \n<script> \n while (true) \n ; \n</script> \n</html>\n", len=138106160) at khtml/khtml_part.cpp:1719 #64 0x41c37927 in KHTMLPart::slotData(KIO::Job*, QMemArray<char> const&) ( this=0x835b218, kio_job=0x83c9e98, data=@0xbfffe830) at khtml/khtml_part.cpp:1407 #65 0x41c52a7e in KHTMLPart::qt_invoke(int, QUObject*) (this=0x835b218, _id=16, _o=0x835b218) at qucom_p.h:312 #66 0x40d9394b in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x83c9e98, clist=0x83ca2b0, o=0xbfffe3f0) at kernel/qobject.cpp:2359 #67 0x4032aa63 in KIO::TransferJob::data(KIO::Job*, QMemArray<char> const&) ( this=0xbfffe42c, t0=0x83c9e98, t1=@0xbfffe830) at jobclasses.moc:722 #68 0x403182ec in KIO::TransferJob::slotData(QMemArray<char> const&) ( this=0x83c9e98, _data=@0xbfffe830) at kio/kio/job.cpp:783 #69 0x4032afba in KIO::TransferJob::qt_invoke(int, QUObject*) (this=0x83c9e98, _id=18, _o=0xbfffe830) at qucom_p.h:312 #70 0x40d9394b in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x827b240, clist=0x82962d0, o=0xbfffe520) at kernel/qobject.cpp:2359 #71 0x40306d16 in KIO::SlaveInterface::data(QMemArray<char> const&) ( this=0x827b240, t0=@0xbfffe830) at slaveinterface.moc:194 #72 0x403042dd in KIO::SlaveInterface::dispatch(int, QMemArray<char> const&) ( this=0x827b240, _cmd=100, rawdata=@0xbfffe830) at kio/kio/slaveinterface.cpp:246 #73 0x4030360e in KIO::SlaveInterface::dispatch() (this=0x827b240) at kio/kio/slaveinterface.cpp:191 #74 0x4030079e in KIO::Slave::gotInput() (this=0x827b240) at kio/kio/slave.cpp:294 #75 0x40302b7c in KIO::Slave::qt_invoke(int, QUObject*) (this=0x827b240, _id=4, _o=0xbfffe9b0) at slave.moc:113 #76 0x40d9394b in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x826a9f8, clist=0x82d9530, o=0xbfffe9b0) at kernel/qobject.cpp:2359 #77 0x40d93cbd in QObject::activate_signal(int, int) (this=0x826a9f8, signal=2, param=13) at kernel/qobject.cpp:2452 #78 0x410e8fb5 in QSocketNotifier::activated(int) (this=0x826a9f8, t0=13) at .moc/debug-shared-mt/moc_qsocketnotifier.cpp:85 #79 0x40db3924 in QSocketNotifier::event(QEvent*) (this=0x826a9f8, e=0xbfffec80) at kernel/qsocketnotifier.cpp:280 #80 0x40d31199 in QApplication::internalNotify(QObject*, QEvent*) ( this=0xbffff1f0, receiver=0x826a9f8, e=0xbfffec80) at kernel/qapplication.cpp:2614 #81 0x40d30656 in QApplication::notify(QObject*, QEvent*) (this=0xbffff1f0, receiver=0x826a9f8, e=0xbfffec80) at kernel/qapplication.cpp:2337 #82 0x40892ebd in KApplication::notify(QObject*, QEvent*) (this=0xbffff1f0, receiver=0x826a9f8, event=0xbfffec80) at kdecore/kapplication.cpp:506 #83 0x40cc792f in QApplication::sendEvent(QObject*, QEvent*) ( receiver=0x826a9f8, event=0xbfffec80) at qapplication.h:490 #84 0x40d1f55e in QEventLoop::activateSocketNotifiers() (this=0x8085058) at kernel/qeventloop_unix.cpp:580 #85 0x40cd94f1 in QEventLoop::processEvents(unsigned) (this=0x8085058, flags=4) at kernel/qeventloop_x11.cpp:383 #86 0x40d4534a in QEventLoop::enterLoop() (this=0x8085058) at kernel/qeventloop.cpp:198 #87 0x40d45266 in QEventLoop::exec() (this=0x8085058) at kernel/qeventloop.cpp:145 #88 0x40d31319 in QApplication::exec() (this=0xbffff1f0) at kernel/qapplication.cpp:2737 #89 0x40067600 in kdemain (argc=2, argv=0xbffff344) at konqueror/konq_main.cc:184 #90 0x08048627 in main (argc=2, argv=0xbffff344) at konqueror/kdeinit_konqueror.cpp:2 This is a somewhat fundamental Qt/KAccel problem. The Ctrl-W keypress is handled *BEFORE* the modal dialog is into place that is supposed to prevent that. A similar problem can be seen when in e.g. kedit when you press Ctrl-O (Open File) twice in quick succession. The second Ctrl-O then gets processed as part of the event loop for the first file open dialog resulting in a second file open dialog. Created attachment 4475 [details]
Patch to suppress kaccel handling when a modal dialog is there.
The problem is caused by KAccelEventHandler::x11Event( XEvent* pEvent )
in kaccel.cpp. Attached patch seems to fix it by eating key events for the old
focus widget if a modal widget is showing in the meantime.
*** Bug 62724 has been marked as a duplicate of this bug. *** *** Bug has been marked as fixed ***. |