WebThread 中的 iOS uiwebview 崩溃 [英] iOS uiwebview crash in WebThread
问题描述
我正在寻找一些建议或帮助诊断我所看到的这次崩溃.目前,我认为这可能是一个 webkit 错误,但一切皆有可能,所以请提供您可能有的任何见解:
<前>事件标识符:AEB8EE37-E5D4-4975-97F4-2B2038AC225ACrashReporter 密钥:92349a05395ea832c40c49c9e48997c1d65a2371硬件型号:iPad3,3过程:触摸[242]路径:/var/mobile/Applications/4D2CAEEE-D0F8-4BB4-989A-F8623C877C78/Touch.app/Touch标识符:StayinFrontTouch版本:3.2.40 (3.2.40)代码类型:ARM(本机)父进程:launchd [1]日期/时间:2014-04-30 15:26:46.137 +1200操作系统版本:iOS 7.1.1 (11D201)报告版本:104异常类型:EXC_BAD_ACCESS (SIGSEGV)异常子类型:KERN_INVALID_ADDRESS 在 0x00000258线程触发:2线程 0:0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 201 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 442 核心基金会 0x2f06e896 __CFRunLoopServiceMachPort + 1503 核心基金会 0x2f06d002 __CFRunLoopRun + 8504 核心基金会 0x2efd7f0a CFRunLoopRunSpecific + 5185 核心基金会 0x2efd7cee CFRunLoopRunInMode + 1026 图形服务 0x33f0a65e GSEventRunModal + 1347 UIKit 0x31923168 UIApplicationMain + 11328 触摸 0x000c064a 0xbd000 + 138989 触摸 0x000bf854 0xbd000 + 10324主题 1:0 libsystem_kernel.dylib 0x3a2ff808 kevent64 + 241 libdispatch.dylib 0x3a241078 _dispatch_mgr_invoke + 2282 libdispatch.dylib 0x3a240dfe _dispatch_mgr_thread$VARIANT$mp + 34线程 2 名称:WebThread线程 2 崩溃:0 WebCore 0x37584302 WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) + 261 WebCore 0x377f751c WebCore::DocumentLoader::substituteResourceDeliveryTimerFired(WebCore::Timer*) + 2122 WebCore 0x374ad3f4 WebCore::ThreadTimers::sharedTimerFiredInternal() + 1323 WebCore 0x374ad346 WebCore::timerFired(__CFRunLoopTimer*, void*) + 224 核心基金会 0x2f06f1b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 125 核心基金会 0x2f06edca __CFRunLoopDoTimer + 7786 核心基金会 0x2f06d166 __CFRunLoopRun + 12067 核心基金会 0x2efd7f0a CFRunLoopRunSpecific + 5188 核心基金会 0x2efd7cee CFRunLoopRunInMode + 1029 WebCore 0x3753a116 RunWebThread(void*) + 41410 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 13811 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 9812 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4线程 3 名称:com.apple.NSURLConnectionLoader主题 3:0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 201 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 442 核心基金会 0x2f06e896 __CFRunLoopServiceMachPort + 1503 核心基金会 0x2f06cfbc __CFRunLoopRun + 7804 核心基金会 0x2efd7f0a CFRunLoopRunSpecific + 5185 核心基金会 0x2efd7cee CFRunLoopRunInMode + 1026 基础 0x2fa17082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 3147 基础 0x2fa8ca5a __NSThread__main__ + 10588 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1389 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 9810 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4主题 4:0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 201 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 442 核心基金会 0x2f06e896 __CFRunLoopServiceMachPort + 1503 核心基金会 0x2f06cfbc __CFRunLoopRun + 7804 核心基金会 0x2efd7f0a CFRunLoopRunSpecific + 5185 核心基金会 0x2efd7cee CFRunLoopRunInMode + 1026 libAVFAudio.dylib 0x2e04f44c GenericRunLoopThread::Entry(void*) + 1247 libAVFAudio.dylib 0x2e0437bc CAPThread::Entry(CAPThread*) + 1768 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1389 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 9810 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4线程 5 名称:JavaScriptCore::BlockFree主题 5:0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 241 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 5182 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 363 JavaScriptCore 0x30004ee4 JSC::BlockAllocator::blockFreeingThreadMain() + 2044 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 125 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1386 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 987 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4线程 6 名称:JavaScriptCore::Marking主题 6:0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 241 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 5182 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 363 JavaScriptCore 0x301a0406 JSC::GCThread::waitForNextPhase() + 744 JavaScriptCore 0x301a0460 JSC::GCThread::gcThreadMain() + 485 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 126 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1387 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 988 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4线程 7 名称:WebCore:CFNetwork Loader主题 7:0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 201 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 442 核心基金会 0x2f06e896 __CFRunLoopServiceMachPort + 1503 核心基金会 0x2f06cfbc __CFRunLoopRun + 7804 核心基金会 0x2efd7f0a CFRunLoopRunSpecific + 5185 核心基金会 0x2efd7cee CFRunLoopRunInMode + 1026 WebCore 0x37582b12 WebCore::runLoaderThread(void*) + 2507 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 128 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1389 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 9810 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4线程 8 名称:com.apple.CFSocket.private主题 8:0 libsystem_kernel.dylib 0x3a312434 __select + 201 核心基金会 0x2f072758 __CFSocketManager + 4802 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1383 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 984 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4主题 9 名称:WebCore:LocalStorage主题 9:0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 241 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 5182 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 363 JavaScriptCore 0x30005012 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 584 WebCore 0x3766cf2c WTF::PassOwnPtr > WTF::MessageQueue >::waitForMessageFilteredWithTimeout*)>(WTF::MessageQueueWaitResult&, bool (&)(WTF::Function*), double) + 1045 WebCore 0x3766ceb2 WebCore::StorageThread::threadEntryPoint() + 1626 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 127 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 1388 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 989 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4主题 10:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4主题 11:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4主题 12:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4主题 13:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4主题 14:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4主题 15:0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 81 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 3062 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4线程 2 因 ARM 线程状态(32 位)而崩溃:r0:0x00000000 r1:0x04ee0238 r2:0x375842e9 r3:0x019cb6b8r4:0x0a916c00 r5:0x04ee0238 r6:0x0a916c00 r7:0x01bbf028r8:0x0549ea00 r9:0x00000002 r10:0x0549e9c8 r11:0x03bc3000ip:0x3a6c7838 sp:0x01bbf014 lr:0x377f751f pc:0x37584302cpsr:0x20000030二进制图像:...我对堆栈跟踪做了一些进一步的调查,并在这里找到了 Subresourceloader 的代码(https://webkit.googlesource.com/WebKit/+/master/Source/WebCore/loader/SubresourceLoader.cpp).
我的猜测是此时 m_resource 为 NULL 标记为 (****) 导致崩溃:
void SubresourceLoader::didReceiveResponse(const ResourceResponse& response){断言(!response.isNull());断言(m_state == 初始化);//引用这个方法中的对象,因为额外的处理可以做//任何事情,包括删除对这个对象的最后一个引用;一个例子是 3266216.Ref<SubresourceLoader>保护(*这个);if (m_resource->resourceToRevalidate()) { ****如果(响应.httpStatusCode()== 304){//304 未修改/使用本地副本//现有资源没问题,用它更新过期时间.m_resource->setResponse(response);memoryCache()->revalidationSucceeded(m_resource, response);如果 (!reachedTerminalState())ResourceLoader::didReceiveResponse(response);返回;}//没有得到 304 响应,继续作为常规资源加载.memoryCache()->revalidationFailed(m_resource);}...
如果它在重新安装后工作,那么您可以尝试在不缓存的情况下执行 URL 请求,因为我认为这会产生相同的结果:
NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30];[webView loadRequest:request];
我猜资源缓存出了问题.
I'm looking for some advice or help diagnosing this crash that I am seeing. For the moment, I think it is probably a webkit bug, but anything is possible, so please provide any insight you may have:
Incident Identifier: AEB8EE37-E5D4-4975-97F4-2B2038AC225A CrashReporter Key: 92349a05395ea832c40c49c9e48997c1d65a2371 Hardware Model: iPad3,3 Process: Touch [242] Path: /var/mobile/Applications/4D2CAEEE-D0F8-4BB4-989A-F8623C877C78/Touch.app/Touch Identifier: StayinFrontTouch Version: 3.2.40 (3.2.40) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2014-04-30 15:26:46.137 +1200 OS Version: iOS 7.1.1 (11D201) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00000258 Triggered by Thread: 2 Thread 0: 0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 44 2 CoreFoundation 0x2f06e896 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x2f06d002 __CFRunLoopRun + 850 4 CoreFoundation 0x2efd7f0a CFRunLoopRunSpecific + 518 5 CoreFoundation 0x2efd7cee CFRunLoopRunInMode + 102 6 GraphicsServices 0x33f0a65e GSEventRunModal + 134 7 UIKit 0x31923168 UIApplicationMain + 1132 8 Touch 0x000c064a 0xbd000 + 13898 9 Touch 0x000bf854 0xbd000 + 10324 Thread 1: 0 libsystem_kernel.dylib 0x3a2ff808 kevent64 + 24 1 libdispatch.dylib 0x3a241078 _dispatch_mgr_invoke + 228 2 libdispatch.dylib 0x3a240dfe _dispatch_mgr_thread$VARIANT$mp + 34 Thread 2 name: WebThread Thread 2 Crashed: 0 WebCore 0x37584302 WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) + 26 1 WebCore 0x377f751c WebCore::DocumentLoader::substituteResourceDeliveryTimerFired(WebCore::Timer*) + 212 2 WebCore 0x374ad3f4 WebCore::ThreadTimers::sharedTimerFiredInternal() + 132 3 WebCore 0x374ad346 WebCore::timerFired(__CFRunLoopTimer*, void*) + 22 4 CoreFoundation 0x2f06f1b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12 5 CoreFoundation 0x2f06edca __CFRunLoopDoTimer + 778 6 CoreFoundation 0x2f06d166 __CFRunLoopRun + 1206 7 CoreFoundation 0x2efd7f0a CFRunLoopRunSpecific + 518 8 CoreFoundation 0x2efd7cee CFRunLoopRunInMode + 102 9 WebCore 0x3753a116 RunWebThread(void*) + 414 10 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 11 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 12 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 3 name: com.apple.NSURLConnectionLoader Thread 3: 0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 44 2 CoreFoundation 0x2f06e896 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x2f06cfbc __CFRunLoopRun + 780 4 CoreFoundation 0x2efd7f0a CFRunLoopRunSpecific + 518 5 CoreFoundation 0x2efd7cee CFRunLoopRunInMode + 102 6 Foundation 0x2fa17082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314 7 Foundation 0x2fa8ca5a __NSThread__main__ + 1058 8 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 9 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 10 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 4: 0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 44 2 CoreFoundation 0x2f06e896 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x2f06cfbc __CFRunLoopRun + 780 4 CoreFoundation 0x2efd7f0a CFRunLoopRunSpecific + 518 5 CoreFoundation 0x2efd7cee CFRunLoopRunInMode + 102 6 libAVFAudio.dylib 0x2e04f44c GenericRunLoopThread::Entry(void*) + 124 7 libAVFAudio.dylib 0x2e0437bc CAPThread::Entry(CAPThread*) + 176 8 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 9 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 10 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 5 name: JavaScriptCore::BlockFree Thread 5: 0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 518 2 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 36 3 JavaScriptCore 0x30004ee4 JSC::BlockAllocator::blockFreeingThreadMain() + 204 4 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 12 5 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 6 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 7 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 6 name: JavaScriptCore::Marking Thread 6: 0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 518 2 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 36 3 JavaScriptCore 0x301a0406 JSC::GCThread::waitForNextPhase() + 74 4 JavaScriptCore 0x301a0460 JSC::GCThread::gcThreadMain() + 48 5 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 12 6 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 7 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 8 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 7 name: WebCore: CFNetwork Loader Thread 7: 0 libsystem_kernel.dylib 0x3a2ffa58 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3a2ff854 mach_msg + 44 2 CoreFoundation 0x2f06e896 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x2f06cfbc __CFRunLoopRun + 780 4 CoreFoundation 0x2efd7f0a CFRunLoopRunSpecific + 518 5 CoreFoundation 0x2efd7cee CFRunLoopRunInMode + 102 6 WebCore 0x37582b12 WebCore::runLoaderThread(void*) + 250 7 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 12 8 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 9 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 10 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 8 name: com.apple.CFSocket.private Thread 8: 0 libsystem_kernel.dylib 0x3a312434 __select + 20 1 CoreFoundation 0x2f072758 __CFSocketManager + 480 2 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 3 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 4 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 9 name: WebCore: LocalStorage Thread 9: 0 libsystem_kernel.dylib 0x3a311f2c __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x3a37af22 _pthread_cond_wait + 518 2 libsystem_pthread.dylib 0x3a37bd60 pthread_cond_wait + 36 3 JavaScriptCore 0x30005012 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 58 4 WebCore 0x3766cf2c WTF::PassOwnPtr > WTF::MessageQueue >::waitForMessageFilteredWithTimeout*)>(WTF::MessageQueueWaitResult&, bool (&)(WTF::Function*), double) + 104 5 WebCore 0x3766ceb2 WebCore::StorageThread::threadEntryPoint() + 162 6 JavaScriptCore 0x30002538 WTF::wtfThreadEntryPoint(void*) + 12 7 libsystem_pthread.dylib 0x3a37b916 _pthread_body + 138 8 libsystem_pthread.dylib 0x3a37b886 _pthread_start + 98 9 libsystem_pthread.dylib 0x3a379aa0 thread_start + 4 Thread 10: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 11: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 12: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 13: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 14: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 15: 0 libsystem_kernel.dylib 0x3a312c70 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3a379bda _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3a379a94 start_wqthread + 4 Thread 2 crashed with ARM Thread State (32-bit): r0: 0x00000000 r1: 0x04ee0238 r2: 0x375842e9 r3: 0x019cb6b8 r4: 0x0a916c00 r5: 0x04ee0238 r6: 0x0a916c00 r7: 0x01bbf028 r8: 0x0549ea00 r9: 0x00000002 r10: 0x0549e9c8 r11: 0x03bc3000 ip: 0x3a6c7838 sp: 0x01bbf014 lr: 0x377f751f pc: 0x37584302 cpsr: 0x20000030 Binary Images: ...
I did some further investigation into the stack trace and found the code for Subresourceloader here (https://webkit.googlesource.com/WebKit/+/master/Source/WebCore/loader/SubresourceLoader.cpp).
My guess is that m_resource is NULL at this point marked with (****) causing the crash:
void SubresourceLoader::didReceiveResponse(const ResourceResponse& response)
{
ASSERT(!response.isNull());
ASSERT(m_state == Initialized);
// Reference the object in this method since the additional processing can do
// anything including removing the last reference to this object; one example of this is 3266216.
Ref<SubresourceLoader> protect(*this);
if (m_resource->resourceToRevalidate()) { ****
if (response.httpStatusCode() == 304) {
// 304 Not modified / Use local copy
// Existing resource is ok, just use it updating the expiration time.
m_resource->setResponse(response);
memoryCache()->revalidationSucceeded(m_resource, response);
if (!reachedTerminalState())
ResourceLoader::didReceiveResponse(response);
return;
}
// Did not get 304 response, continue as a regular resource load.
memoryCache()->revalidationFailed(m_resource);
}
...
If it worked after a reinstall then you could try doing the URL request without caching, since I would assume that will give the same outcome:
NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30];
[webView loadRequest:request];
I'm guessing something is going wrong with the caching of a resource.
这篇关于WebThread 中的 iOS uiwebview 崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!