Bug 52554

Summary: [Qt] QtTestBrowser crashes when closing if Facebook is opened
Product: WebKit Reporter: Aparna Nandyal <aparna.nand>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: commit-queue, kling
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Patch to fix the crash
kling: review-
Review comments implemented in patch
kling: review+, commit-queue: commit-queue-
Patch to fix the crash - after rebasing git with correct directory none

Description Aparna Nandyal 2011-01-16 23:25:46 PST
Valid facebook account

Steps to reproduce:

1. Launch QtTestBrowser
2. go to www.facebook.com
3. Login with facebook credentials
4. Wait for login to complete
5. close the browser

Expected result:
Brower should close smoothly with no errors

Actual result:
Segmentation fault
Comment 1 Aparna Nandyal 2011-01-16 23:31:37 PST
Baktrace for the bug:

#0  0x03f8283d in QObject::thread() const () from /usr/lib/libQtCore.so.4
#1  0x01ceb4b5 in WebCore::cookies (document=0xb749ac28, url=...)
    at ../../../WebCore/platform/qt/CookieJarQt.cpp:85
#2  0x01678f96 in WebCore::Document::cookie (this=0xb749ac28, ec=@0xbfffe108)
    at ../../../WebCore/dom/Document.cpp:3621
#3  0x01151f3f in WebCore::jsDocumentCookie (exec=0xb5600508, slotBase=...)
    at generated/JSDocument.cpp:466
#4  0x020060ab in JSC::cti_op_get_by_id_custom_stub (args=0xbfffe1b0)
    at ../../../JavaScriptCore/jit/JITStubs.cpp:1722
#5  0x02003740 in JSC::JITThunks::tryCacheGetByID (callFrame=0x6089dd8,
    codeBlock=0x838d93c, returnAddress=..., baseValue=..., propertyName=...,
    slot=..., stubInfo=0xbfffe228)
    at ../../../JavaScriptCore/jit/JITStubs.cpp:974
#6  0x01ffc1d8 in JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*) ()
   from /home/aparna/webkit/WebKitBuild/Debug/bin/../lib/libQtWebKit.so.4
#7  0x01ff9490 in JSC::Interpreter::executeCall (this=0x838d930,
    callFrame=0xb74cd6dc, function=0xb418e880, callType=JSC::CallTypeJS,
    callData=..., thisValue=..., args=...)
    at ../../../JavaScriptCore/interpreter/Interpreter.cpp:849
#8  0x020234a2 in JSC::call (exec=0xb74cd6dc, functionObject=...,
    callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../../JavaScriptCore/runtime/CallData.cpp:38
#9  0x014ab91c in WebCore::JSMainThreadExecState::call (exec=0xb74cd6dc,
    functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=...,
    args=...) at ../../../WebCore/bindings/js/JSMainThreadExecState.h:48
#10 0x014db137 in WebCore::JSEventListener::handleEvent (this=0x8eeed00,
    scriptExecutionContext=0xb749ac60, event=0x85ff398)
    at ../../../WebCore/bindings/js/JSEventListener.cpp:124
#11 0x016c3d08 in WebCore::EventTarget::fireEventListeners (this=0xb74cd548,
    event=0x85ff398, d=0xb74cd5c4, entry=...)
    at ../../../WebCore/dom/EventTarget.cpp:342
#12 0x016c3b8f in WebCore::EventTarget::fireEventListeners (this=0xb74cd548,
    event=0x85ff398) at ../../../WebCore/dom/EventTarget.cpp:311
#13 0x01a11993 in WebCore::DOMWindow::dispatchEvent (this=0xb74cd548,
    prpEvent=..., prpTarget=...) at ../../../WebCore/page/DOMWindow.cpp:1539
#14 0x0199ce3b in WebCore::FrameLoader::stopLoading (this=0x82eb74c,
    at ../../../WebCore/loader/FrameLoader.cpp:381
#15 0x0199d606 in WebCore::FrameLoader::closeURL (this=0x82eb74c)
    at ../../../WebCore/loader/FrameLoader.cpp:467
#16 0x019a747d in WebCore::FrameLoader::detachFromParent (this=0x82eb74c)
    at ../../../WebCore/loader/FrameLoader.cpp:2571
#17 0x01d448e1 in QWebPage::~QWebPage (this=0x82c9578,
    __in_chrg=<value optimized out>)
    at ../../../WebKit/qt/Api/qwebpage.cpp:1933
#18 0x0807226b in WebPage::~WebPage (this=0x82c9578,
    __in_chrg=<value optimized out>)
    at ../../../../WebKitTools/QtTestBrowser/webpage.cpp:59
#19 0x03f84816 in QObjectPrivate::deleteChildren() ()
   from /usr/lib/libQtCore.so.4
#20 0x033ac8fc in QWidget::~QWidget() () from /usr/lib/libQtGui.so.4
#21 0x037e6c31 in QMainWindow::~QMainWindow() () from /usr/lib/libQtGui.so.4
#22 0x0806a3eb in MainWindow::~MainWindow (this=0x825c150,
    __in_chrg=<value optimized out>)
    at ../../../../WebKitTools/QtTestBrowser/mainwindow.h:41
#23 0x080630ec in LauncherWindow::~LauncherWindow (this=0x825c150,
    __in_chrg=<value optimized out>)
    at ../../../../WebKitTools/QtTestBrowser/launcherwindow.cpp:59
#24 0x03f829a5 in qDeleteInEventHandler(QObject*) ()
   from /usr/lib/libQtCore.so.4
#25 0x03f846c8 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#26 0x033a6936 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x037e7917 in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#28 0x03348fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#29 0x0334f0e9 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#30 0x03f71b3b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#31 0x03f74d8b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#32 0x03f74f4d in QCoreApplication::sendPostedEvents(QObject*, int) ()
   from /usr/lib/libQtCore.so.4
#33 0x03fa0a74 in ?? () from /usr/lib/libQtCore.so.4
#34 0x04b7c0e5 in g_main_dispatch (context=0x811d4c0) at gmain.c:2149
#35 g_main_context_dispatch (context=0x811d4c0) at gmain.c:2702
#36 0x04b800b8 in g_main_context_iterate (context=0x811d4c0,
    block=<value optimized out>, dispatch=1, self=0x811bbe8) at gmain.c:2780
#37 0x04b80298 in g_main_context_iteration (context=0x811d4c0, may_block=1)
    at gmain.c:2843
#38 0x03fa0565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#39 0x0340abe5 in ?? () from /usr/lib/libQtGui.so.4
#40 0x03f70609 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#41 0x03f70a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQtCore.so.4
#42 0x03f7500f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#43 0x03347e07 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#44 0x0806bb33 in launcherMain (app=...)
    at ../../../../WebKitTools/QtTestBrowser/main.cpp:41
#45 0x0806dc76 in main (argc=1, argv=0xbffff454)
    at ../../../../WebKitTools/QtTestBrowser/main.cpp:256
Comment 2 Aparna Nandyal 2011-01-17 00:02:13 PST
Created attachment 79132 [details]
Patch to fix the crash

Patch to fix the crash
Comment 3 Andreas Kling 2011-01-17 04:10:57 PST
Comment on attachment 79132 [details]
Patch to fix the crash

This patch needs a ChangeLog entry explaining what is being changed and why.
Please see http://trac.webkit.org/wiki/QtWebKitContrib for more information on how to contribute patches.
Comment 4 Aparna Nandyal 2011-01-17 06:39:34 PST
Created attachment 79163 [details]
Review comments implemented in patch

Added ChangeLog to the patch
Comment 5 Andreas Kling 2011-01-17 12:37:43 PST
Comment on attachment 79163 [details]
Review comments implemented in patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79163&action=review

This looks sane, r=me

> WebKitTools/ChangeLog:5
> +        Fixing crash bug 52554

This line is redundant, we already have a reference to the bug#. Leave it out next time :)
Comment 6 WebKit Commit Bot 2011-01-17 12:53:28 PST
Comment on attachment 79163 [details]
Review comments implemented in patch

Rejecting attachment 79163 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-sf-cq', 'ap..." exit_code: 2

Last 500 characters of output:
ps you used the wrong -p or --strip option?
The text leading up to this was:
|Index: WebKitTools/QtTestBrowser/launcherwindow.cpp
|index 1a4d28f..c0fd658 100644
|--- WebKitTools/QtTestBrowser/launcherwindow.cpp
|+++ WebKitTools/QtTestBrowser/launcherwindow.cpp
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

Failed to run "[u'/Projects/CommitQueue/Tools/Scripts/svn-apply', u'--reviewer', u'Andreas Kling', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/7538159
Comment 7 Aparna Nandyal 2011-01-19 02:10:28 PST
Created attachment 79403 [details]
Patch to fix the crash - after rebasing git with correct directory

Earlier failure was due to the code being in WebKitTools which was renamed to Tools. Corrected this.
Comment 8 WebKit Commit Bot 2011-01-19 06:01:22 PST
Comment on attachment 79403 [details]
Patch to fix the crash - after rebasing git with correct directory

Clearing flags on attachment: 79403

Committed r76119: <http://trac.webkit.org/changeset/76119>