Version: (using KDE KDE 3.3.2) Installed from: Gentoo Packages Compiler: gcc (GCC) 3.4.3 (Gentoo Linux 3.4.3, ssp-3.4.3-0, pie-8.7.6.6) OS: Linux The following code will crash Konq if you triple-click on the text: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> <title>Crash Konq 3.2.2</title> <style type="text/css"> .x:after { content: "!"; } </style> </head> <body> <span class="x">TRIPLE CLICK ME</span> </body> </html>
Can confirm with current 3.4 HEAD. The bt is: Using host libthread_db library "/lib/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 9826)] [KCrash handler] #4 0x41c9d5ac in DOM::DocumentImpl::setSelection (this=0x85bdcd8, s=0x0, sp=0, e=0x0, ep=1) at dom_nodeimpl.h:278 #5 0x41c6feb8 in KHTMLPart::khtmlMouseDoubleClickEvent (this=0x84cd110, event=0x84cd110) at dom_node.h:863 #6 0x41c6f416 in KHTMLPart::customEvent (this=0x84cd110, event=0xbfffe460) at khtml_part.cpp:5621 #7 0x40e5ccce in QObject::event (this=0x84cd110, e=0xbfffe460) at kernel/qobject.cpp:755 #8 0x40dfc65b in QApplication::internalNotify (this=0xbffff3b0, receiver=0x84cd110, e=0xbfffe460) at kernel/qapplication.cpp:2635 #9 0x40dfbb18 in QApplication::notify (this=0xbffff3b0, receiver=0x84cd110, e=0xbfffe460) at kernel/qapplication.cpp:2358 #10 0x4092efdf in KApplication::notify (this=0xbffff3b0, receiver=0x84cd110, event=0xbfffe460) at kapplication.cpp:549 #11 0x41c34935 in KHTMLView::viewportMouseDoubleClickEvent (this=0x84dffe0, _mouse=0xbfffeca0) at khtmlview.cpp:1004 #12 0x41c33733 in KHTMLView::viewportMousePressEvent (this=0x84dffe0, _mouse=0xbfffeca0) at khtmlview.cpp:852 #13 0x40f83140 in QScrollView::eventFilter (this=0x84dffe0, obj=0x84de890, e=0xbfffeca0) at widgets/qscrollview.cpp:1497 #14 0x41c379f2 in KHTMLView::eventFilter (this=0x84dffe0, o=0x84de890, e=0xbfffeca0) at khtmlview.cpp:1891 #15 0x40e5cd84 in QObject::activate_filters (this=0x84de890, e=0xbfffeca0) at kernel/qobject.cpp:902 #16 0x40e5cbf6 in QObject::event (this=0x84de890, e=0xbfffeca0) at kernel/qobject.cpp:735 #17 0x40e96f8f in QWidget::event (this=0x84de890, e=0xbfffeca0) at kernel/qwidget.cpp:4655 #18 0x40dfc65b in QApplication::internalNotify (this=0xbffff3b0, receiver=0x84de890, e=0xbfffeca0) at kernel/qapplication.cpp:2635 #19 0x40dfbe11 in QApplication::notify (this=0xbffff3b0, receiver=0x84de890, e=0xbfffeca0) at kernel/qapplication.cpp:2421 #20 0x4092efdf in KApplication::notify (this=0xbffff3b0, receiver=0x84de890, event=0xbfffeca0) at kapplication.cpp:549 #21 0x40d91f67 in QApplication::sendSpontaneousEvent (receiver=0x84de890, event=0xbfffeca0) at qapplication.h:494 #22 0x40d8b019 in QETWidget::translateMouseEvent (this=0x84de890, event=0xbffff030) at kernel/qapplication_x11.cpp:4288 #23 0x40d88c5d in QApplication::x11ProcessEvent (this=0xbffff3b0, event=0xbffff030) at kernel/qapplication_x11.cpp:3439 #24 0x40da334a in QEventLoop::processEvents (this=0x80b1c48, flags=4) at kernel/qeventloop_x11.cpp:192 #25 0x40e1094e in QEventLoop::enterLoop (this=0x80b1c48) at kernel/qeventloop.cpp:198 #26 0x40e1086a in QEventLoop::exec (this=0x80b1c48) at kernel/qeventloop.cpp:145 #27 0x40dfc7df in QApplication::exec (this=0xbffff3b0) at kernel/qapplication.cpp:2758 #28 0x4005f108 in kdemain (argc=2, argv=0xbffff514) at konq_main.cc:206 #29 0x080486c9 in main (argc=2, argv=0xbffff514) at konqueror.la.cc:2
*** Bug 100437 has been marked as a duplicate of this bug. ***
*** Bug 101132 has been marked as a duplicate of this bug. ***
Created attachment 11178 [details] Testcase attached
*** Bug 117645 has been marked as a duplicate of this bug. ***
*** Bug 120358 has been marked as a duplicate of this bug. ***
SVN commit 524563 by charles: BUG:95319 don't crash when triple-clicking on a line that has :after or :before content, or anything that isn't in the DOM. M +3 -3 khtml_part.cpp --- branches/KDE/3.5/kdelibs/khtml/khtml_part.cpp #524562:524563 @@ -5961,9 +5961,9 @@ if (n->isText()) { khtml::RenderText* const textRenderer = static_cast<khtml::RenderText *>(n); const khtml::InlineTextBoxArray &runs = textRenderer->inlineTextBoxes(); - const unsigned lim = runs.count(); + const unsigned lim = runs.count(); for (unsigned i = 0; i != lim; ++i) { - if (runs[i]->m_y == y) { + if (runs[i]->m_y == y && textRenderer->element()) { startNode = textRenderer->element(); startOffset = runs[i]->m_start; return true; @@ -6004,7 +6004,7 @@ khtml::RenderText* const textRenderer = static_cast<khtml::RenderText *>(n); const khtml::InlineTextBoxArray &runs = textRenderer->inlineTextBoxes(); for (int i = (int)runs.count()-1; i >= 0; --i) { - if (runs[i]->m_y == y) { + if (runs[i]->m_y == y && textRenderer->element()) { endNode = textRenderer->element(); endOffset = runs[i]->m_start + runs[i]->m_len; return true;
*** Bug 127326 has been marked as a duplicate of this bug. ***
*** Bug 107499 has been marked as a duplicate of this bug. ***
*** Bug 133284 has been marked as a duplicate of this bug. ***
*** Bug 119211 has been marked as a duplicate of this bug. ***