<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FrameLoader::commitProvisionalLoad crash"
   href="https://bugs.webkit.org/show_bug.cgi?id=145038">145038</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FrameLoader::commitProvisionalLoad crash
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>iOS
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>iOS 8.2
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebCore Misc.
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ljin.zq&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I use test UIWebView with my own  monkey test .

The monkey test will do the following test case:
1、open random url
2、goBack
3、goForward
4、close UIWebView then open it
5、stopLoading


After test for half hours , I found some crash.
In function FrameLoader::commitProvisionalLoad , the following code:

        StringWithDirection title = m_documentLoader-&gt;title();
        if (!title.isNull())
            m_client.dispatchDidReceiveTitle(title);


The &quot;m_documentLoader&quot; is NULL.  I think we should check it before use &quot;m_documentLoader&quot;.

This is my first time to report it bug at Webkit.org,  what should I do to help to fix this bug?




Thread 1 crash stack:
* thread #1: tid = 0x14e67, 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WTF::RefPtr&lt;WTF::StringImpl&gt;::RefPtr(WTF::RefPtr&lt;WTF::StringImpl&gt; const&amp;) at RefPtr.h:44, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x448)
  * frame #0: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WTF::RefPtr&lt;WTF::StringImpl&gt;::RefPtr(WTF::RefPtr&lt;WTF::StringImpl&gt; const&amp;) at RefPtr.h:44
    frame #1: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WTF::RefPtr&lt;WTF::StringImpl&gt;::RefPtr(WTF::RefPtr&lt;WTF::StringImpl&gt; const&amp;) at RefPtr.h:44
    frame #2: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WTF::String::String(WTF::String const&amp;) at WTFString.h:132
    frame #3: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WTF::String::String(WTF::String const&amp;) at WTFString.h:132
    frame #4: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WebCore::StringWithDirection::StringWithDirection(WebCore::StringWithDirection const&amp;) at StringWithDirection.h:47
    frame #5: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad() [inlined] WebCore::StringWithDirection::StringWithDirection(WebCore::StringWithDirection const&amp;) at StringWithDirection.h:47
    frame #6: 0x0f1b62b6 WebCore`WebCore::FrameLoader::commitProvisionalLoad(this=0x35391710) + 806 at FrameLoader.cpp:1802
    frame #7: 0x0f1ba48b WebCore`WebCore::FrameLoader::loadProvisionalItemFromCachedPage(this=&lt;unavailable&gt;) + 203 at FrameLoader.cpp:3094
    frame #8: 0x0f1bd35a WebCore`std::__1::__function::__func&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4, std::__1::allocator&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4&gt;, void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;::operator()(WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;&amp;&amp;, bool&amp;&amp;) [inlined] WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4::operator()(WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool) const + 33 at FrameLoader.cpp:1458
    frame #9: 0x0f1bd339 WebCore`std::__1::__function::__func&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4, std::__1::allocator&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4&gt;, void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;::operator()(WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;&amp;&amp;, bool&amp;&amp;) [inlined] decltype(std::__1::forward&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4&amp;&gt;(fp)(std::__1::forward&lt;WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormStat
    frame #10: 0x0f1bd339 WebCore`std::__1::__function::__func&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4, std::__1::allocator&lt;WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr&lt;WebCore::FormState&gt;, WebCore::AllowNavigationToInvalidURL)::$_4&gt;, void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;::operator(this=0xbfffc020, __arg=0xbfffbe80, __arg=0xbfffbca0, __arg=0xbfffbcaa)(WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;&amp;&amp;, bool&amp;&amp;) + 41 at functional:1370
    frame #11: 0x0f959ebb WebCore`WebCore::PolicyCallback::call(bool) [inlined] std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;::operator(__arg=&lt;unavailable&gt;)(WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool) const + 75 at functional:1756
    frame #12: 0x0f959e9f WebCore`WebCore::PolicyCallback::call(this=0xbfffbe80, shouldContinue=true) + 47 at PolicyCallback.cpp:95
    frame #13: 0x0f95c478 WebCore`WebCore::PolicyChecker::continueAfterNavigationPolicy(this=&lt;unavailable&gt;, policy=&lt;unavailable&gt;) + 840 at PolicyChecker.cpp:206
    frame #14: 0x0f95d41d WebCore`std::__1::__function::__func&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1, std::__1::allocator&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1&gt;, void (WebCore::PolicyAction)&gt;::operator()(WebCore::PolicyAction&amp;&amp;) [inlined] WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, boo
    frame #15: 0x0f95d411 WebCore`std::__1::__function::__func&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1, std::__1::allocator&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1&gt;, void (WebCore::PolicyAction)&gt;::operator()(WebCore::PolicyAction&amp;&amp;) [inlined] decltype(std::__1::forward&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&
    frame #16: 0x0f95d411 WebCore`std::__1::__function::__func&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1, std::__1::allocator&lt;WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&amp;, WebCore::DocumentLoader*, WTF::PassRefPtr&lt;WebCore::FormState&gt;, std::__1::function&lt;void (WebCore::ResourceRequest const&amp;, WTF::PassRefPtr&lt;WebCore::FormState&gt;, bool)&gt;)::$_1&gt;, void (WebCore::PolicyAction)&gt;::operator(this=0xbfffc0b0, __arg=0xbfffc0ac)(WebCore::PolicyAction&amp;&amp;) + 17 at functional:1370
    frame #17: 0x0eb4a511 WebKitLegacy`-[WebFramePolicyListener receivedPolicyDecision:] [inlined] std::__1::function&lt;void (WebCore::PolicyAction)&gt;::operator(__arg=&lt;unavailable&gt;)(WebCore::PolicyAction) const + 24 at functional:1756
    frame #18: 0x0eb4a4f9 WebKitLegacy`-[WebFramePolicyListener receivedPolicyDecision:](self=&lt;unavailable&gt;, _cmd=0x0ebdffc4, action=&lt;unavailable&gt;) + 169 at WebFrameLoaderClient.mm:2340
    frame #19: 0x0eb4a689 WebKitLegacy`-[WebFramePolicyListener use](self=0x21148a00, _cmd=0x0e87ab46) + 41 at WebFrameLoaderClient.mm:2369
    frame #20: 0x07c0e656 UIKit`-[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 844
    frame #21: 0x07c10bb9 UIKit`-[UIWebViewWebViewDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 80
    frame #22: 0x0644284d CoreFoundation`__invoking___ + 29
    frame #23: 0x064426f8 CoreFoundation`-[NSInvocation invoke] + 360
    frame #24: 0x064db32a CoreFoundation`-[NSInvocation invokeWithTarget:] + 74
    frame #25: 0x0eba6540 WebKitLegacy`-[_WebSafeForwarder forwardInvocation:](self=&lt;unavailable&gt;, _cmd=0x0a9dc6a4, invocation=0x1bf0bbb0) + 160 at WebView.mm:4611
    frame #26: 0x064b004e CoreFoundation`___forwarding___ + 478
    frame #27: 0x064afe4e CoreFoundation`__forwarding_prep_0___ + 14
    frame #28: 0x0644284d CoreFoundation`__invoking___ + 29
    frame #29: 0x064426f8 CoreFoundation`-[NSInvocation invoke] + 360
    frame #30: 0x0fe80d16 WebCore`HandleDelegateSource(void*) [inlined] SendMessage(invocation=0x211907b0) + 18 at WebCoreThread.mm:150
    frame #31: 0x0fe80d04 WebCore`HandleDelegateSource(info=0x00000000) + 100 at WebCoreThread.mm:178
    frame #32: 0x0648306f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    frame #33: 0x06478b7d CoreFoundation`__CFRunLoopDoSources0 + 253
    frame #34: 0x064780d8 CoreFoundation`__CFRunLoopRun + 952
    frame #35: 0x06477a5b CoreFoundation`CFRunLoopRunSpecific + 443
    frame #36: 0x0647788b CoreFoundation`CFRunLoopRunInMode + 123
    frame #37: 0x0c1ce2c9 GraphicsServices`GSEventRunModal + 192
    frame #38: 0x0c1ce106 GraphicsServices`GSEventRun + 104
    frame #39: 0x07935106 UIKit`UIApplicationMain + 1526
    frame #40: 0x00002dc6 UCWEB`main(argc=1, argv=0xbfffd2bc) + 230 at main.mm:161
    frame #41: 0x0b230ac9 libdyld.dylib`start + 1



Webthread Satck:

* thread #10: tid = 0x14ed3, 0x0b51d512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'WebThread'
  * frame #0: 0x0b51d512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0b54aa4a libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x0b54e20c libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x0fe7fbb9 WebCore`SendDelegateMessage(NSInvocation*) [inlined] WebTimedConditionLock(condition=&lt;unavailable&gt;, lock=&lt;unavailable&gt;, interval=10) + 633 at WebCoreThread.mm:780
    frame #4: 0x0fe7fb4a WebCore`SendDelegateMessage(invocation=&lt;unavailable&gt;) + 522 at WebCoreThread.mm:220
    frame #5: 0x0eba64d5 WebKitLegacy`-[_WebSafeForwarder forwardInvocation:](self=&lt;unavailable&gt;, _cmd=0x0a9dc6a4, invocation=0x211907b0) + 53 at WebView.mm:4605
    frame #6: 0x064b004e CoreFoundation`___forwarding___ + 478
    frame #7: 0x064afe4e CoreFoundation`__forwarding_prep_0___ + 14
    frame #8: 0x0eb456d6 WebKitLegacy`WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(this=&lt;unavailable&gt;, action=0xb0479390, request=&lt;unavailable&gt;, formState=PassRefPtr&lt;WebCore::FormState&gt; at 0xb0479298, function=&lt;unavailable&gt;)&gt;) + 294 at WebFrameLoaderClient.mm:912
    frame #9: 0x0f95b816 WebCore`WebCore::PolicyChecker::checkNavigationPolicy(this=0x18898000, request=&lt;unavailable&gt;, loader=&lt;unavailable&gt;, formState=&lt;unavailable&gt;, function=&lt;unavailable&gt;)&gt;) + 3126 at PolicyChecker.cpp:122
    frame #10: 0x0f1b3008 WebCore`WebCore::FrameLoader::loadWithDocumentLoader(this=&lt;unavailable&gt;, loader=0x00000000, type=&lt;unavailable&gt;, prpFormState=&lt;unavailable&gt;, allowNavigationToInvalidURL=&lt;unavailable&gt;) + 2360 at FrameLoader.cpp:1457
    frame #11: 0x0f1ac46c WebCore`WebCore::FrameLoader::loadDifferentDocumentItem(this=&lt;unavailable&gt;, item=&lt;unavailable&gt;, loadType=&lt;unavailable&gt;, cacheLoadPolicy=&lt;unavailable&gt;) + 700 at FrameLoader.cpp:3161
    frame #12: 0x0f1bbd0b WebCore`WebCore::FrameLoader::loadItem(this=0x35391710, item=0x49b74bc8, loadType=&lt;unavailable&gt;) + 123 at FrameLoader.cpp:3246
    frame #13: 0x0f239c4d WebCore`WebCore::HistoryController::recursiveGoToItem(this=&lt;unavailable&gt;, item=&lt;unavailable&gt;, fromItem=&lt;unavailable&gt;, type=&lt;unavailable&gt;) + 397 at HistoryController.cpp:736
    frame #14: 0x0f239845 WebCore`WebCore::HistoryController::goToItem(this=&lt;unavailable&gt;, targetItem=&lt;unavailable&gt;, type=&lt;unavailable&gt;) + 197 at HistoryController.cpp:302
    frame #15: 0x0f9232c5 WebCore`WebCore::Page::goToItem(this=&lt;unavailable&gt;, item=0x49b74bc8, type=&lt;unavailable&gt;) + 85 at Page.cpp:448
    frame #16: 0x0ede11a7 WebCore`WebCore::BackForwardController::goForward(this=0x41f4a6c0) + 55 at BackForwardController.cpp:96
    frame #17: 0x0eba8281 WebKitLegacy`__20-[WebView goForward]_block_invoke(.block_descriptor=0x2473c970) + 49 at WebView.mm:5641
    frame #18: 0x0fe8195a WebCore`HandleRunSource(void*) [inlined] (anonymous namespace)::WebThreadBlock::operator()() const + 14 at WebCoreThreadRun.cpp:97
    frame #19: 0x0fe8194c WebCore`HandleRunSource(info=0x00000000) + 380 at WebCoreThreadRun.cpp:133
    frame #20: 0x0648306f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    frame #21: 0x06478c4e CoreFoundation`__CFRunLoopDoSources0 + 462
    frame #22: 0x064780d8 CoreFoundation`__CFRunLoopRun + 952
    frame #23: 0x06477a5b CoreFoundation`CFRunLoopRunSpecific + 443
    frame #24: 0x0647788b CoreFoundation`CFRunLoopRunInMode + 123
    frame #25: 0x0fe810f0 WebCore`RunWebThread(arg=0x00000000) + 608 at WebCoreThread.mm:692
    frame #26: 0x0b549e13 libsystem_pthread.dylib`_pthread_body + 138
    frame #27: 0x0b549d89 libsystem_pthread.dylib`_pthread_start + 162
    frame #28: 0x0b547e52 libsystem_pthread.dylib`thread_start + 34</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>