Bug 85159

Summary: [GTK] ASSERTION FAILED: shouldLoadAsEmptyDocument(r.url()) || !defersLoading() in MainResourceLoader.cpp:382
Product: WebKit Reporter: Sudarsana Nagineni (babu) <naginenis>
Component: WebKitGTKAssignee: Dan Winship <danw>
Status: RESOLVED FIXED    
Severity: Normal CC: danw, gustavo, mrobinson, rakuco, svillar, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch with updated ChangeLog none

Description Sudarsana Nagineni (babu) 2012-04-29 08:05:49 PDT
Assertion failure on loading LayoutTests/loader/load-defer-resume-crash.html in debug build:

Core was generated by `WebKitBuild/Debug/Programs/GtkLauncher LayoutTests/loader/load-defer-resume-cra'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f3dd178d0c3 in WebCore::MainResourceLoader::didReceiveResponse (this=0x7f3d8004d060, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
382         ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
(gdb) bt
#0  0x00007f6503dd702f in WebCore::MainResourceLoader::didReceiveResponse (this=0x2566fe0, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
#1  0x00007f6503de424b in WebCore::ResourceLoader::didReceiveResponse (this=0x2566fe0, response=...) at ../../Source/WebCore/loader/ResourceLoader.cpp:423
#2  0x00007f6503f87369 in WebCore::sendRequestCallback (source=0x245c920, res=0x238f580, data=0x2576520) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:376
#3  0x00007f64ff76cc17 in g_simple_async_result_complete (simple=0x238f580) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:749
#4  0x00007f64ff76cca8 in complete_in_idle_cb_for_thread (_data=0x259a1c0) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:817
#5  0x00007f64ff202a5d in g_main_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#6  g_main_context_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#7  0x00007f64ff203258 in g_main_context_iterate (context=0x2274a50, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#8  0x00007f64ff203792 in g_main_loop_run (loop=0x25c5680) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3297
#9  0x00007f650136cd89 in gtk_dialog_run (dialog=0x236c1c0) at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkdialog.c:1110
#10 0x00007f6503562197 in webkit_web_view_script_dialog (webView=0x23562a0, frame=0x238f520, message=0x25984d0 "Deferring loads", type=WEBKIT_SCRIPT_DIALOG_ALERT, defaultValue=0x0, value=0x0)
    at ../../Source/WebKit/gtk/webkit/webkitwebview.cpp:1192
#11 0x00007f6503562258 in webkit_web_view_real_script_alert (webView=0x23562a0, frame=0x238f520, message=0x25984d0 "Deferring loads") at ../../Source/WebKit/gtk/webkit/webkitwebview.cpp:1211
#12 0x00007f6503570c8f in webkit_marshal_BOOLEAN__OBJECT_STRING (closure=0x235dd80, return_value=0x7fff8ce4dc40, n_param_values=3, param_values=0x2253050, invocation_hint=0x7fff8ce4dc00,
    marshal_data=0x7f650356221b) at DerivedSources/webkit/webkitmarshal.cpp:474
#13 0x00007f64ff4c30a4 in g_closure_invoke (closure=0x235dd80, return_value=0x7fff8ce4dc40, n_param_values=3, param_values=0x2253050, invocation_hint=<optimized out>)
    at /build/buildd/glib2.0-2.30.0/./gobject/gclosure.c:774
#14 0x00007f64ff4d4e5f in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0x23562a0, emission_return=0x7fff8ce4dda0, instance_and_params=0x2253050)
    at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3310
#15 0x00007f64ff4de483 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=<optimized out>)
    at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3013
#16 0x00007f64ff4dea3d in g_signal_emit_by_name (instance=0x23562a0, detailed_signal=0x7f6504958ad6 "script-alert") at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3097
#17 0x00007f650350c0a1 in WebKit::ChromeClient::runJavaScriptAlert (this=0x23657a0, frame=0x233b050, message=...) at ../../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:335
#18 0x00007f6503e21a2e in WebCore::Chrome::runJavaScriptAlert (this=0x2386490, frame=0x233b050, message=...) at ../../Source/WebCore/page/Chrome.cpp:310
#19 0x00007f6503e37560 in WebCore::DOMWindow::alert (this=0x23c0a30, message=...) at ../../Source/WebCore/page/DOMWindow.cpp:970
#20 0x00007f6504556099 in WebCore::jsDOMWindowPrototypeFunctionAlert (exec=0x7f64a9b920d0) at DerivedSources/WebCore/JSDOMWindow.cpp:11283
#21 0x00007f64b2cd1265 in ?? ()
#22 0x00007fff8ce4e260 in ?? ()
#23 0x00007f64f2cd0f70 in ?? ()
#24 0x00007fff8ce4e1e0 in ?? ()
#25 0x0000000002539fc8 in ?? ()
#26 0x0000000000000002 in ?? ()
#27 0x00007f64b001fa60 in ?? ()
#28 0x00007f64b003f420 in ?? ()
#29 0x00007f6501c4e589 in JSC::Register::Register (this=0x7f64ff4b2670) at ../../Source/JavaScriptCore/interpreter/Register.h:105
#30 0x00007f6501da3d71 in JSC::JITCode::execute (this=0x7f64a9b0fe58, registerFile=0x24ba0d8, callFrame=0x7f64a9b92040, globalData=0x23b5e40) at ../../Source/JavaScriptCore/jit/JITCode.h:127
#31 0x00007f6501da0887 in JSC::Interpreter::executeCall (this=0x24ba0c0, callFrame=0x7f64b001fae0, function=0x7f64b003f420, callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:1306
#32 0x00007f6501e5886a in JSC::call (exec=0x7f64b001fae0, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/JavaScriptCore/runtime/CallData.cpp:39
#33 0x00007f6503704055 in WebCore::JSMainThreadExecState::call (exec=0x7f64b001fae0, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/WebCore/bindings/js/JSMainThreadExecState.h:56
#34 0x00007f65037330cd in WebCore::JSEventListener::handleEvent (this=0x255d540, scriptExecutionContext=0x24bf1a8, event=0x24a31b0) at ../../Source/WebCore/bindings/js/JSEventListener.cpp:133
#35 0x00007f65039f2ec6 in WebCore::EventTarget::fireEventListeners (this=0x23c0a30, event=0x24a31b0, d=0x23c0bb0, entry=...) at ../../Source/WebCore/dom/EventTarget.cpp:231
#36 0x00007f65039f2d0c in WebCore::EventTarget::fireEventListeners (this=0x23c0a30, event=0x24a31b0) at ../../Source/WebCore/dom/EventTarget.cpp:198
#37 0x00007f6503e398da in WebCore::DOMWindow::dispatchEvent (this=0x23c0a30, prpEvent=..., prpTarget=...) at ../../Source/WebCore/page/DOMWindow.cpp:1605
#38 0x00007f6503e39644 in WebCore::DOMWindow::dispatchLoadEvent (this=0x23c0a30) at ../../Source/WebCore/page/DOMWindow.cpp:1579
#39 0x00007f650398d925 in WebCore::Document::dispatchWindowLoadEvent (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:3919
#40 0x00007f6503987da7 in WebCore::Document::implicitClose (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:2410
#41 0x00007f6503d9b487 in WebCore::FrameLoader::checkCallImplicitClose (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:782
#42 0x00007f6503d9b23d in WebCore::FrameLoader::checkCompleted (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:728
---Type <return> to continue, or q <return> to quit---
#43 0x00007f6503d9af9e in WebCore::FrameLoader::finishedParsing (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:661
#44 0x00007f6503990486 in WebCore::Document::finishedParsing (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:4662
#45 0x00007f6503c294db in WebCore::HTMLTreeBuilder::finished (this=0x24a3070) at ../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2807
#46 0x00007f6503bfe134 in WebCore::HTMLDocumentParser::end (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:381
#47 0x00007f6503bfe23b in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:390
#48 0x00007f6503bfd2e8 in WebCore::HTMLDocumentParser::prepareToStopParsing (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:153
#49 0x00007f6503bfe280 in WebCore::HTMLDocumentParser::attemptToEnd (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:402
#50 0x00007f6503bfe339 in WebCore::HTMLDocumentParser::finish (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:429
#51 0x00007f6503d94d90 in WebCore::DocumentWriter::end (this=0x2445330) at ../../Source/WebCore/loader/DocumentWriter.cpp:241
#52 0x00007f6503d88972 in WebCore::DocumentLoader::finishedLoading (this=0x2445210) at ../../Source/WebCore/loader/DocumentLoader.cpp:293
#53 0x00007f6503dd766d in WebCore::MainResourceLoader::didFinishLoading (this=0x243abb0, finishTime=0) at ../../Source/WebCore/loader/MainResourceLoader.cpp:480
#54 0x00007f6503de4327 in WebCore::ResourceLoader::didFinishLoading (this=0x243abb0, finishTime=0) at ../../Source/WebCore/loader/ResourceLoader.cpp:435
#55 0x00007f6503f89379 in WebCore::readCallback (source=0x2441060, asyncResult=0x24602a0, data=0x2420ca0) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:841
#56 0x00007f64ff75cb89 in async_ready_callback_wrapper (source_object=0x2441060, res=0x24602a0, user_data=0x2420ca0) at /build/buildd/glib2.0-2.30.0/./gio/ginputstream.c:470
#57 0x00007f64ff76cc17 in g_simple_async_result_complete (simple=0x24602a0) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:749
#58 0x00007f64ff76cca8 in complete_in_idle_cb_for_thread (_data=0x2539980) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:817
#59 0x00007f64ff202a5d in g_main_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#60 g_main_context_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#61 0x00007f64ff203258 in g_main_context_iterate (context=0x2274a50, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#62 0x00007f64ff203792 in g_main_loop_run (loop=0x242b140) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3297
#63 0x00007f65013e8edd in gtk_main () at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkmain.c:1367
#64 0x00000000004055c9 in main (argc=1, argv=0x7fff8ce4f028) at ../../Tools/GtkLauncher/main.c:534
(gdb)


#0  0x00007f6503dd702f in WebCore::MainResourceLoader::didReceiveResponse (this=0x2566fe0, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
382         ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
(gdb) bt
#0  0x00007f6503dd702f in WebCore::MainResourceLoader::didReceiveResponse (this=0x2566fe0, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
#1  0x00007f6503de424b in WebCore::ResourceLoader::didReceiveResponse (this=0x2566fe0, response=...) at ../../Source/WebCore/loader/ResourceLoader.cpp:423
#2  0x00007f6503f87369 in WebCore::sendRequestCallback (source=0x245c920, res=0x238f580, data=0x2576520) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:376
#3  0x00007f64ff76cc17 in g_simple_async_result_complete (simple=0x238f580) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:749
#4  0x00007f64ff76cca8 in complete_in_idle_cb_for_thread (_data=0x259a1c0) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:817
#5  0x00007f64ff202a5d in g_main_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#6  g_main_context_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#7  0x00007f64ff203258 in g_main_context_iterate (context=0x2274a50, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#8  0x00007f64ff203792 in g_main_loop_run (loop=0x25c5680) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3297
#9  0x00007f650136cd89 in gtk_dialog_run (dialog=0x236c1c0) at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkdialog.c:1110
#10 0x00007f6503562197 in webkit_web_view_script_dialog (webView=0x23562a0, frame=0x238f520, message=0x25984d0 "Deferring loads", type=WEBKIT_SCRIPT_DIALOG_ALERT, defaultValue=0x0, value=0x0)
    at ../../Source/WebKit/gtk/webkit/webkitwebview.cpp:1192
#11 0x00007f6503562258 in webkit_web_view_real_script_alert (webView=0x23562a0, frame=0x238f520, message=0x25984d0 "Deferring loads") at ../../Source/WebKit/gtk/webkit/webkitwebview.cpp:1211
#12 0x00007f6503570c8f in webkit_marshal_BOOLEAN__OBJECT_STRING (closure=0x235dd80, return_value=0x7fff8ce4dc40, n_param_values=3, param_values=0x2253050, invocation_hint=0x7fff8ce4dc00,
    marshal_data=0x7f650356221b) at DerivedSources/webkit/webkitmarshal.cpp:474
#13 0x00007f64ff4c30a4 in g_closure_invoke (closure=0x235dd80, return_value=0x7fff8ce4dc40, n_param_values=3, param_values=0x2253050, invocation_hint=<optimized out>)
    at /build/buildd/glib2.0-2.30.0/./gobject/gclosure.c:774
#14 0x00007f64ff4d4e5f in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0x23562a0, emission_return=0x7fff8ce4dda0, instance_and_params=0x2253050)
    at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3310
#15 0x00007f64ff4de483 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=<optimized out>)
    at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3013
#16 0x00007f64ff4dea3d in g_signal_emit_by_name (instance=0x23562a0, detailed_signal=0x7f6504958ad6 "script-alert") at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3097
#17 0x00007f650350c0a1 in WebKit::ChromeClient::runJavaScriptAlert (this=0x23657a0, frame=0x233b050, message=...) at ../../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:335
#18 0x00007f6503e21a2e in WebCore::Chrome::runJavaScriptAlert (this=0x2386490, frame=0x233b050, message=...) at ../../Source/WebCore/page/Chrome.cpp:310
#19 0x00007f6503e37560 in WebCore::DOMWindow::alert (this=0x23c0a30, message=...) at ../../Source/WebCore/page/DOMWindow.cpp:970
#20 0x00007f6504556099 in WebCore::jsDOMWindowPrototypeFunctionAlert (exec=0x7f64a9b920d0) at DerivedSources/WebCore/JSDOMWindow.cpp:11283
#21 0x00007f64b2cd1265 in ?? ()
#22 0x00007fff8ce4e260 in ?? ()
#23 0x00007f64f2cd0f70 in ?? ()
#24 0x00007fff8ce4e1e0 in ?? ()
#25 0x0000000002539fc8 in ?? ()
#26 0x0000000000000002 in ?? ()
#27 0x00007f64b001fa60 in ?? ()
#28 0x00007f64b003f420 in ?? ()
#29 0x00007f6501c4e589 in JSC::Register::Register (this=0x7f64ff4b2670) at ../../Source/JavaScriptCore/interpreter/Register.h:105
#30 0x00007f6501da3d71 in JSC::JITCode::execute (this=0x7f64a9b0fe58, registerFile=0x24ba0d8, callFrame=0x7f64a9b92040, globalData=0x23b5e40) at ../../Source/JavaScriptCore/jit/JITCode.h:127
#31 0x00007f6501da0887 in JSC::Interpreter::executeCall (this=0x24ba0c0, callFrame=0x7f64b001fae0, function=0x7f64b003f420, callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:1306
#32 0x00007f6501e5886a in JSC::call (exec=0x7f64b001fae0, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/JavaScriptCore/runtime/CallData.cpp:39
#33 0x00007f6503704055 in WebCore::JSMainThreadExecState::call (exec=0x7f64b001fae0, functionObject=..., callType=JSC::CallTypeJS, callData=..., thisValue=..., args=...)
    at ../../Source/WebCore/bindings/js/JSMainThreadExecState.h:56
#34 0x00007f65037330cd in WebCore::JSEventListener::handleEvent (this=0x255d540, scriptExecutionContext=0x24bf1a8, event=0x24a31b0) at ../../Source/WebCore/bindings/js/JSEventListener.cpp:133
#35 0x00007f65039f2ec6 in WebCore::EventTarget::fireEventListeners (this=0x23c0a30, event=0x24a31b0, d=0x23c0bb0, entry=...) at ../../Source/WebCore/dom/EventTarget.cpp:231
#36 0x00007f65039f2d0c in WebCore::EventTarget::fireEventListeners (this=0x23c0a30, event=0x24a31b0) at ../../Source/WebCore/dom/EventTarget.cpp:198
#37 0x00007f6503e398da in WebCore::DOMWindow::dispatchEvent (this=0x23c0a30, prpEvent=..., prpTarget=...) at ../../Source/WebCore/page/DOMWindow.cpp:1605
#38 0x00007f6503e39644 in WebCore::DOMWindow::dispatchLoadEvent (this=0x23c0a30) at ../../Source/WebCore/page/DOMWindow.cpp:1579
#39 0x00007f650398d925 in WebCore::Document::dispatchWindowLoadEvent (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:3919
#40 0x00007f6503987da7 in WebCore::Document::implicitClose (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:2410
#41 0x00007f6503d9b487 in WebCore::FrameLoader::checkCallImplicitClose (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:782
#42 0x00007f6503d9b23d in WebCore::FrameLoader::checkCompleted (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:728
---Type <return> to continue, or q <return> to quit---
#43 0x00007f6503d9af9e in WebCore::FrameLoader::finishedParsing (this=0x233b108) at ../../Source/WebCore/loader/FrameLoader.cpp:661
#44 0x00007f6503990486 in WebCore::Document::finishedParsing (this=0x24bf000) at ../../Source/WebCore/dom/Document.cpp:4662
#45 0x00007f6503c294db in WebCore::HTMLTreeBuilder::finished (this=0x24a3070) at ../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2807
#46 0x00007f6503bfe134 in WebCore::HTMLDocumentParser::end (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:381
#47 0x00007f6503bfe23b in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:390
#48 0x00007f6503bfd2e8 in WebCore::HTMLDocumentParser::prepareToStopParsing (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:153
#49 0x00007f6503bfe280 in WebCore::HTMLDocumentParser::attemptToEnd (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:402
#50 0x00007f6503bfe339 in WebCore::HTMLDocumentParser::finish (this=0x247f800) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:429
#51 0x00007f6503d94d90 in WebCore::DocumentWriter::end (this=0x2445330) at ../../Source/WebCore/loader/DocumentWriter.cpp:241
#52 0x00007f6503d88972 in WebCore::DocumentLoader::finishedLoading (this=0x2445210) at ../../Source/WebCore/loader/DocumentLoader.cpp:293
#53 0x00007f6503dd766d in WebCore::MainResourceLoader::didFinishLoading (this=0x243abb0, finishTime=0) at ../../Source/WebCore/loader/MainResourceLoader.cpp:480
#54 0x00007f6503de4327 in WebCore::ResourceLoader::didFinishLoading (this=0x243abb0, finishTime=0) at ../../Source/WebCore/loader/ResourceLoader.cpp:435
#55 0x00007f6503f89379 in WebCore::readCallback (source=0x2441060, asyncResult=0x24602a0, data=0x2420ca0) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:841
#56 0x00007f64ff75cb89 in async_ready_callback_wrapper (source_object=0x2441060, res=0x24602a0, user_data=0x2420ca0) at /build/buildd/glib2.0-2.30.0/./gio/ginputstream.c:470
#57 0x00007f64ff76cc17 in g_simple_async_result_complete (simple=0x24602a0) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:749
#58 0x00007f64ff76cca8 in complete_in_idle_cb_for_thread (_data=0x2539980) at /build/buildd/glib2.0-2.30.0/./gio/gsimpleasyncresult.c:817
#59 0x00007f64ff202a5d in g_main_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#60 g_main_context_dispatch (context=0x2274a50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#61 0x00007f64ff203258 in g_main_context_iterate (context=0x2274a50, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#62 0x00007f64ff203792 in g_main_loop_run (loop=0x242b140) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3297
#63 0x00007f65013e8edd in gtk_main () at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkmain.c:1367
#64 0x00000000004055c9 in main (argc=1, argv=0x7fff8ce4f028) at ../../Tools/GtkLauncher/main.c:534
(gdb)
Comment 1 Martin Robinson 2012-04-30 09:36:45 PDT
Wow! I think what's happening here is that the load is continuing while the alert box is up. I'm pretty sure this shouldn't happen at all -- the box should block page loading.
Comment 2 Martin Robinson 2012-04-30 10:52:12 PDT
It would be useful to have the stack trace from DumpRenderTree as well.
Comment 3 Sudarsana Nagineni (babu) 2012-04-30 12:11:05 PDT
(In reply to comment #2)
> It would be useful to have the stack trace from DumpRenderTree as well.

Here is the stack trace from DRT. Patch in the bug #85134 is needed to reproduce the crash with DRT.

Core was generated by `WebKitBuild/Debug/Programs/DumpRenderTree LayoutTests/loader/load-defer-resume-'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fa907a0f3bb in WebCore::MainResourceLoader::didReceiveResponse (this=0x2335ef0, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
382         ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
(gdb) bt
#0  0x00007fa907a0f3bb in WebCore::MainResourceLoader::didReceiveResponse (this=0x2335ef0, r=...) at ../../Source/WebCore/loader/MainResourceLoader.cpp:382
#1  0x00007fa907a1c5d7 in WebCore::ResourceLoader::didReceiveResponse (this=0x2335ef0, response=...) at ../../Source/WebCore/loader/ResourceLoader.cpp:423
#2  0x00007fa907bbf6f5 in WebCore::sendRequestCallback (source=0x7fa8b4015120, res=0x22f5ee0, data=0x23729d0) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:376
#3  0x00007fa9054c4743 in g_simple_async_result_complete (simple=0x22f5ee0) at gsimpleasyncresult.c:767
#4  0x00007fa9054c4b08 in complete_in_idle_cb_for_thread (_data=<optimized out>) at gsimpleasyncresult.c:835
#5  0x00007fa9053829ca in g_main_dispatch (context=<optimized out>) at gmain.c:2515
#6  g_main_context_dispatch (context=0x1c2b450) at gmain.c:3052
#7  0x00007fa905385168 in g_main_context_iterate (context=0x1c2b450, block=1, dispatch=<optimized out>, self=<optimized out>) at gmain.c:3123
#8  0x00007fa9053853f5 in g_main_loop_run (loop=0x1c6bfa0) at gmain.c:3317
#9  0x00007fa905b47a5d in gtk_main () at gtkmain.c:1161
#10 0x000000000045940d in runTest (testPathOrURL=...) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:696
#11 0x000000000045bb26 in main (argc=2, argv=0x7fffb11da7c8) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:1382
(gdb)
Comment 4 Martin Robinson 2012-04-30 12:13:24 PDT
It seems that the fact that the assertion happened during the alert box is a red herring. While that behavior is clearly wrong, this assertion failure seems to be caused by something else.
Comment 5 Martin Robinson 2012-04-30 12:14:42 PDT
Looks like Soup is calling WebCore::ResourceLoader::didReceiveResponse on a resource that is deferring it's loading.
Comment 6 Dan Winship 2012-05-01 08:18:27 PDT
hm... the call to soup_session_pause_message() in sendRequestCallback() is wrong... It ought to be just "return;", but then there also needs to be logic in platformSetDefersLoading() to handle the case of undeferring at that point (since it will need to call didReceiveResponse() then).
Comment 7 Sergio Villar Senin 2012-05-02 00:07:01 PDT
(In reply to comment #6)
> hm... the call to soup_session_pause_message() in sendRequestCallback() is wrong... It ought to be just "return;", but then there also needs to be logic in platformSetDefersLoading() to handle the case of undeferring at that point (since it will need to call didReceiveResponse() then).

The pause_message() issue is tracked in bug 84955
Comment 8 Dan Winship 2012-05-02 16:40:24 PDT
*** Bug 84955 has been marked as a duplicate of this bug. ***
Comment 9 Dan Winship 2012-05-03 08:53:03 PDT
Created attachment 140024 [details]
patch

Not sure if this actually works, because I'm getting tons of test failures with or without this patch...
Comment 10 Dan Winship 2012-05-03 17:28:10 PDT
(In reply to comment #9)
> Not sure if this actually works, because I'm getting tons of test failures with or without this patch...

That turned out to be libsoup's fault, and that's fixed in git now. The patch works.
Comment 11 Martin Robinson 2012-05-03 21:41:59 PDT
Comment on attachment 140024 [details]
patch

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

> Source/WebCore/ChangeLog:4
> +        Remove a soup_session_pause_message() call that got left behind,
> +        update the defersLoading stuff to handle this case.

Minor nit: The line here should be the title of the bug.
Comment 12 Dan Winship 2012-05-04 06:16:52 PDT
Created attachment 140209 [details]
patch with updated ChangeLog
Comment 13 WebKit Review Bot 2012-05-04 10:11:47 PDT
Comment on attachment 140209 [details]
patch with updated ChangeLog

Clearing flags on attachment: 140209

Committed r116117: <http://trac.webkit.org/changeset/116117>
Comment 14 WebKit Review Bot 2012-05-04 10:11:54 PDT
All reviewed patches have been landed.  Closing bug.