When will trigger 'Pointer authentication' crash? - ios

I get a crash by firebase. Only a useful information:
Corrupt NSInvocation detected. Pointer authentication.
I didn't met this type of crash before. And I found this error is related to PAC, which means Pointer Authentication. And PAC is enabled from A12 clip. Thus all devices had this crash were from iPhone XR / 11 / 12 / 13 and so on.
Below is the crash file:
2022-02-07_16-44-57.4063_+0700-4c0b14a2bc46de636f18885059d3ef71e86671cd.crash
Incident Identifier: 3A24760C-2DD9-417C-AD49-DE29CD5DC9FF
Hardware Model: iPhone11,6
Process: ShopeeFood [27579]
Path: /private/var/containers/Bundle/Application/153DB199-A6C5-4237-A7C2-B2AB7F54D97B/ShopeeFood.app/ShopeeFood
Identifier: vn.foody.DeliveryNow
Version: 5.11.1 (24)
AppStoreTools: 13C90b
AppVariant: 1:iPhone11,6:15
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: vn.foody.DeliveryNow [3660]
Date/Time: 2022-02-07 16:44:57.4063 +0700
Launch Time: 2022-02-07 15:21:52.7331 +0700
OS Version: iPhone OS 15.2.1 (19C63)
Release Type: User
Baseband Version: 4.02.02
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000180a17f64
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [27579]
Triggered by Thread: 0
Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
Thread 0 name:
Thread 0 Crashed:
0 CoreFoundation 0x0000000180a17f64 _NSIPoisoned + 16 (NSForwarding.m:3059)
1 CoreFoundation 0x000000018094a1e8 -[NSInvocation setArgument:atIndex:] + 596 (NSForwarding.m:3068)
2 CoreFoundation 0x000000018091e9c4 -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3474)
3 React 0x000000010744b8dc -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:584)
4 React 0x000000010744da2c facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 244 (RCTNativeModule.mm:114)
5 React 0x000000010744d790 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const + 44 (RCTNativeModule.mm:75)
6 React 0x000000010744d790 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 88 (RCTNativeModule.mm:67)
7 React 0x000000010744d5f0 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 388 (RCTNativeModule.mm:80)
8 cxxreact 0x0000000108932e70 facebook::react::JsToNativeBridge::callNativeModules(facebook::react::JSExecutor&, folly::dynamic&&, bool) + 152 (NativeToJsBridge.cpp:62)
9 jsireact 0x0000000108acf1dc facebook::react::JSIExecutor::callNativeModules(facebook::jsi::Value const&, bool) + 92 (JSIExecutor.cpp:388)
10 jsireact 0x0000000108ad132c facebook::react::JSIExecutor::initializeRuntime()::$_1::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const + 8 (JSIExecutor.cpp:104)
11 jsireact 0x0000000108ad132c decltype(std::__1::forward<facebook::react::JSIExecutor::initializeRuntime()::$_1&>(fp)(std::__1::forward<facebook::jsi::Runtime&>(fp0), std::__1::forward<facebook::jsi::Value const&>(fp0), std::__... + 28 (type_traits:3747)
12 jsireact 0x0000000108ad132c facebook::jsi::Value std::__1::__invoke_void_return_wrapper<facebook::jsi::Value>::__call<facebook::react::JSIExecutor::initializeRuntime()::$_1&, facebook::jsi::Runtime&, facebook::jsi::Value cons... + 28 (__functional_base:317)
13 jsireact 0x0000000108ad132c std::__1::__function::__alloc_func<facebook::react::JSIExecutor::initializeRuntime()::$_1, std::__1::allocator<facebook::react::JSIExecutor::initializeRuntime()::$_1>, facebook::jsi::Value (faceboo... + 28 (functional:1553)
14 jsireact 0x0000000108ad132c std::__1::__function::__func<facebook::react::JSIExecutor::initializeRuntime()::$_1, std::__1::allocator<facebook::react::JSIExecutor::initializeRuntime()::$_1>, facebook::jsi::Value (facebook::jsi... + 44 (functional:1727)
15 jsi 0x0000000108a7d804 std::__1::__function::__value_func<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, face... + 28 (functional:1880)
16 jsi 0x0000000108a7d804 std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value... + 44 (functional:2555)
17 jsi 0x0000000108a7d548 facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value cons... + 384 (JSCRuntime.cpp:1151)
18 JavaScriptCore 0x000000018bc2352c JSC::JSCallbackObject<JSC::JSNonFinalObject>::callImpl(JSC::JSGlobalObject*, JSC::CallFrame*) + 468 (JSCallbackObjectFunctions.h:566)
19 JavaScriptCore 0x000000018c3f13c4 JSC::LLInt::setUpCall(JSC::CallFrame*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 1736 (NativeFunction.h:50)
20 JavaScriptCore 0x000000018bb7b7b0 llint_function_for_construct_arity_checkTagGateAfter + 144508
21 JavaScriptCore 0x000000018bb7b70c llint_function_for_construct_arity_checkTagGateAfter + 144344
22 JavaScriptCore 0x000000018bb7b7e0 llint_function_for_construct_arity_checkTagGateAfter + 144556
23 JavaScriptCore 0x000000018bb7b70c llint_function_for_construct_arity_checkTagGateAfter + 144344
24 JavaScriptCore 0x000000018bb7ba70 llint_function_for_construct_arity_checkTagGateAfter + 145212
25 JavaScriptCore 0x000000018bb52028 vmEntryToJavaScriptTrampoline + 8
26 JavaScriptCore 0x000000018c28c704 JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::JSGlobalObject*, JSC::JSObject*) + 12632 (JITCodeInlines.h:42)
27 JavaScriptCore 0x000000018c568c28 JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&, JSC::JSValue, ***::NakedPtr<JSC::Exception>&) + 272 (Completion.cpp:137)
28 JavaScriptCore 0x000000018bc19ae8 JSEvaluateScript + 724 (JSBase.cpp:53)
29 jsi 0x0000000108a78b08 facebook::jsc::JSCRuntime::evaluateJavaScript(std::__1::shared_ptr<facebook::jsi::Buffer const> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 292 (JSCRuntime.cpp:426)
30 jsireact 0x0000000108ace460 facebook::react::JSIExecutor::loadBundle(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::_... + 328 (JSIExecutor.cpp:158)
31 cxxreact 0x0000000108932310 facebook::react::NativeToJsBridge::loadBundleSync(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<faceb... + 152 (NativeToJsBridge.cpp:154)
32 cxxreact 0x0000000108925a4c facebook::react::Instance::loadBundleSync(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::rea... + 164 (Instance.cpp:88)
33 cxxreact 0x0000000108925c08 facebook::react::Instance::loadScriptFromString(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char,... + 72 (Instance.cpp:105)
34 React 0x000000010742ff94 __51-[RCTCxxBridge executeApplicationScript:url:async:]_block_invoke + 684 (RCTCxxBridge.mm:1367)
35 React 0x00000001074348bc std::__1::__function::__value_func<void ()>::operator()() const + 20 (functional:1880)
36 React 0x00000001074348bc std::__1::function<void ()>::operator()() const + 20 (functional:2555)
37 React 0x00000001074348bc facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 40 (RCTCxxUtils.mm:74)
38 React 0x0000000107429c38 -[RCTCxxBridge _tryAndHandleError:] + 100 (RCTCxxBridge.mm:275)
39 React 0x000000010742fc80 -[RCTCxxBridge executeApplicationScript:url:async:] + 164 (RCTCxxBridge.mm:1346)
40 React 0x000000010742fbd4 -[RCTCxxBridge executeApplicationScriptSync:url:] + 24 (RCTCxxBridge.mm:1341)
41 React 0x000000010742d538 -[RCTCxxBridge executeSourceCode:sync:] + 164 (RCTCxxBridge.mm:941)
42 SHPReactNativeSDK 0x0000000107ec1d8c -[SHPRNContainer executePluginCode:] + 236 (SHPRNContainer.m:152)
43 SHPReactNativeSDK 0x0000000107ec15a4 -[SHPRNContainer loadPluginBundle:bundleLoadCompletion:] + 492 (SHPRNContainer.m:80)
44 SHPReactNativeSDK 0x0000000107ed5fd8 -[SHPRNModeReleaseStrategies loadPlugin:bundleName:pageName:bundleLoadCompletion:] + 188 (SHPRNModeStrategies.m:63)
45 SHPReactNativeSDK 0x0000000107ec3070 __72-[SHPRNContainerManager loadPluginBundle:pageName:bundleLoadCompletion:]_block_invoke + 364 (SHPRNContainerManager.m:163)
46 SHPReactNativeSDK 0x0000000107ec3544 __72-[SHPRNContainerManager loadPluginBundle:pageName:bundleLoadCompletion:]_block_invoke.119 + 144 (SHPRNContainerManager.m:203)
47 Foundation 0x00000001820ffc10 -[__NSObserver _doit:] + 348 (NSNotification.m:327)
48 CoreFoundation 0x00000001808d2f88 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
49 CoreFoundation 0x000000018096ec3c ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
50 CoreFoundation 0x0000000180941ff4 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
51 CoreFoundation 0x00000001808e8df4 _CFXNotificationPost + 716 (CFNotificationCenter.c:1147)
52 Foundation 0x00000001820e5f68 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
53 SHPReactNativeSDK 0x0000000107ec4394 __62-[SHPRNContainerManager createPreLoadContainerWithCompletion:]_block_invoke + 88 (SHPRNContainerManager.m:346)
54 SHPReactNativeSDK 0x0000000107ec1b50 -[SHPRNContainer pluginJSLoaded:] + 128 (SHPRNContainer.m:124)
55 CoreFoundation 0x00000001808d2f88 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:652)
56 CoreFoundation 0x000000018096ec3c ___CFXRegistrationPost_block_invoke + 52 (CFNotificationCenter.c:173)
57 CoreFoundation 0x0000000180941ff4 _CFXRegistrationPost + 456 (CFNotificationCenter.c:199)
58 CoreFoundation 0x00000001808e8df4 _CFXNotificationPost + 716 (CFNotificationCenter.c:1147)
59 Foundation 0x00000001820e5f68 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 (NSNotification.m:560)
60 React 0x000000010742d7a4 __39-[RCTCxxBridge executeSourceCode:sync:]_block_invoke_2 + 200 (RCTCxxBridge.mm:928)
61 libdispatch.dylib 0x00000001805b1924 _dispatch_call_block_and_release + 32 (init.c:1517)
62 libdispatch.dylib 0x00000001805b3670 _dispatch_client_callout + 20 (object.m:560)
63 libdispatch.dylib 0x00000001805c1b70 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
64 CoreFoundation 0x00000001808f9d84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
65 CoreFoundation 0x00000001808b3f5c __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
66 CoreFoundation 0x00000001808c7468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
67 GraphicsServices 0x000000019c45238c GSEventRunModal + 164 (GSEvent.c:2200)
68 UIKitCore 0x0000000183269088 -[UIApplication _run] + 1100 (UIApplication.m:3493)
69 UIKitCore 0x0000000182fe7958 UIApplicationMain + 2092 (UIApplication.m:5046)
70 ShopeeFood 0x00000001043ed73c main + 152 (main.m:19)
71 dyld 0x000000010536daa4 start + 520 (dyldMain.cpp:879)
Hope anyone can help me how to solve this problem, or give me any information about this type of crash.
Thank you very much.

Related

ios - webthread- java script core crash

getting lots of crashes as below in ios11: any idea what could be reason behind it. its happening in ios11 only. webkit framework is included in project.
Crashed: WebThread
0 JavaScriptCore 0x18d513a2c bmalloc::Heap::allocateLarge(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, unsigned long) + 24
1 JavaScriptCore 0x18d513a20 bmalloc::Heap::allocateLarge(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, unsigned long) + 12
2 JavaScriptCore 0x18d5112a0 bmalloc::Allocator::allocateLarge(unsigned long) + 92
3 JavaScriptCore 0x18cb6bef4 WTF::fastMalloc(unsigned long) + 112
4 JavaScriptCore 0x18d11e6a8 JSC::Heap::addExecutable(JSC::ExecutableBase*) + 352
5 JavaScriptCore 0x18d10a288 JSC::FunctionExecutable::finishCreation(JSC::VM&) + 48
6 JavaScriptCore 0x18d44f7cc JSC::UnlinkedFunctionExecutable::link(JSC::VM&, JSC::SourceCode const&, std::optional<int>, JSC::Intrinsic) + 280
7 JavaScriptCore 0x18d207860 JSC::functionPrototypeApplyCodeGenerator(JSC::VM&) + 64
8 JavaScriptCore 0x18d10d81c JSC::FunctionPrototype::addFunctionProperties(JSC::ExecState*, JSC::JSGlobalObject*, JSC::JSFunction**, JSC::JSFunction**, JSC::JSFunction**) + 156
9 JavaScriptCore 0x18d21a9f8 JSC::JSGlobalObject::init(JSC::VM&) + 1300
10 JavaScriptCore 0x18d224898 JSC::JSGlobalObject::finishCreation(JSC::VM&, JSC::JSObject*) + 144
11 WebCore 0x18e015590 WebCore::JSDOMGlobalObject::finishCreation(JSC::VM&, JSC::JSObject*) + 24
12 WebCore 0x18e850840 WebCore::JSDOMWindowBase::finishCreation(JSC::VM&, WebCore::JSDOMWindowProxy*) + 44
13 WebCore 0x18e7d28ac WebCore::JSDOMWindow::finishCreation(JSC::VM&, WebCore::JSDOMWindowProxy*) + 36
14 WebCore 0x18e8548a4 WebCore::JSDOMWindowProxy::setWindow(WTF::RefPtr<WebCore::DOMWindow>&&) + 516
15 WebCore 0x18eed505c WebCore::ScriptController::setDOMWindowForWindowProxy(WebCore::DOMWindow*) + 360
16 WebCore 0x18dfed904 WebCore::FrameLoader::clear(WebCore::Document*, bool, bool, bool) + 476
17 WebCore 0x18e3a42c8 WebCore::DocumentWriter::begin(WebCore::URL const&, bool, WebCore::Document*) + 368
18 WebCore 0x18dfebb58 WebCore::DocumentLoader::commitData(char const*, unsigned long) + 176
19 WebKitLegacy 0x18f3d3bd8 -[WebHTMLRepresentation receivedData:withDataSource:] + 112
20 WebKitLegacy 0x18f3d3af8 -[WebDataSource(WebInternal) _receivedData:] + 68
21 WebKitLegacy 0x18f3d3a98 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 112
22 WebCore 0x18e0099c4 WebCore::DocumentLoader::commitLoad(char const*, int) + 172
23 WebCore 0x18e008bec WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction) + 1796
24 WebCore 0x18e3930a0 WebCore::DocumentLoader::responseReceived(WebCore::ResourceResponse const&) + 1820
25 WebCore 0x18e392004 WebCore::DocumentLoader::handleSubstituteDataLoadNow() + 308
26 WebCore 0x18dfaf000 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
27 WebCore 0x18dfaef40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
28 CoreFoundation 0x186152fc0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
29 CoreFoundation 0x186152ce4 __CFRunLoopDoTimer + 864
30 CoreFoundation 0x1861524e4 __CFRunLoopDoTimers + 248
31 CoreFoundation 0x1861500cc __CFRunLoopRun + 1928
32 CoreFoundation 0x18606fe58 CFRunLoopRunSpecific + 436
33 WebCore 0x18dfe0a34 RunWebThread(void*) + 560
34 libsystem_pthread.dylib 0x185dd02b4 _pthread_body + 308
35 libsystem_pthread.dylib 0x185dd0180 _pthread_body + 310
36 libsystem_pthread.dylib 0x185dceb74 thread_start + 4

iOS Crash related to javascript core, web thread

getting lots of crashes in ios11 as below: webkit framework is included in project. any idea what could be reason for this crash ?
Crashed: WebThread
0 JavaScriptCore 0x18bdbeebc bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 680
1 JavaScriptCore 0x18bdbec70 bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 92
2 JavaScriptCore 0x18bdbef58 bmalloc::Heap::allocateSmallPage(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, std::__1::array<bmalloc::List<bmalloc::SmallPage>, 112ul>&) + 152
3 JavaScriptCore 0x18bdbf45c bmalloc::Heap::allocateSmallBumpRangesByObject(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, bmalloc::BumpAllocator&, bmalloc::FixedVector<bmalloc::BumpRange, 3ul>&, std::__1::array<bmalloc::List<bmalloc::SmallPage>, 112ul>&) + 52
4 JavaScriptCore 0x18bdbd228 bmalloc::Allocator::refillAllocatorSlowCase(bmalloc::BumpAllocator&, unsigned long) + 160
5 JavaScriptCore 0x18bdbd358 bmalloc::Allocator::allocateLogSizeClass(unsigned long) + 160
6 JavaScriptCore 0x18bba1cec JSC::MarkedBlock::tryCreate(JSC::Heap&) + 36
7 JavaScriptCore 0x18bba10c0 JSC::MarkedAllocator::allocateSlowCaseImpl(JSC::GCDeferralContext*, bool) + 368
8 JavaScriptCore 0x18bce69d0 JSC::Subspace::allocate(unsigned long) + 152
9 JavaScriptCore 0x18bcfb7a0 JSC::UnlinkedFunctionExecutable::link(JSC::VM&, JSC::SourceCode const&, std::optional<int>, JSC::Intrinsic) + 236
10 JavaScriptCore 0x18b6c9b98 JSC::CodeBlock::finishCreation(JSC::VM&, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*) + 1964
11 JavaScriptCore 0x18bcb9f64 JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&) + 1088
12 JavaScriptCore 0x18bcba384 JSC::ScriptExecutable::prepareForExecutionImpl(JSC::VM&, JSC::JSFunction*, JSC::JSScope*, JSC::CodeSpecializationKind, JSC::CodeBlock*&) + 240
13 JavaScriptCore 0x18b454718 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 672
14 JavaScriptCore 0x18bb9b444 llint_entry + 26996
15 JavaScriptCore 0x18bb94900 vmEntryToJavaScript + 272
16 JavaScriptCore 0x18ba73190 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
17 JavaScriptCore 0x18ba47af4 JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::ExecState*, JSC::JSObject*) + 12168
18 JavaScriptCore 0x18b7108e8 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) + 340
19 WebCore 0x18d77fe4c WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 324
20 WebCore 0x18d786458 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 584
21 WebCore 0x18d4c5750 WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 164
22 WebCore 0x18d7866fc WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 216
23 WebCore 0x18d78ce0c WebCore::ScriptRunner::timerFired() + 456
24 WebCore 0x18c85b000 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
25 WebCore 0x18c85af40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
26 CoreFoundation 0x1849fefc0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
27 CoreFoundation 0x1849fece4 __CFRunLoopDoTimer + 864
28 CoreFoundation 0x1849fe4e4 __CFRunLoopDoTimers + 248
29 CoreFoundation 0x1849fc0cc __CFRunLoopRun + 1928
30 CoreFoundation 0x18491be58 CFRunLoopRunSpecific + 436
31 WebCore 0x18c88ca34 RunWebThread(void*) + 560
32 libsystem_pthread.dylib 0x18467c2b4 _pthread_body + 308
33 libsystem_pthread.dylib 0x18467c180 _pthread_body + 310
34 libsystem_pthread.dylib 0x18467ab74 thread_start + 4

App crash, no idea why and how to fix it

I'm trying to fix the crash issue of a mac app. It's using the web view.
I got the report from fabric but I have no idea how to fix it.
Any suggestion?
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000bbadbeef
Crashed: com.apple.main-thread
0 JavaScriptCore 0x7fff8d7a232e WTFCrash + 62
1 WebCore 0x7fff879ca13d WebCore::DocumentLoader::detachFromFrame() + 269
2 WebKitLegacy 0x7fff866f1f7e WebDocumentLoaderMac::detachFromFrame() + 14
3 WebCore 0x7fff87945178 WebCore::FrameLoader::setDocumentLoader(WebCore::DocumentLoader*) + 104
4 WebCore 0x7fff87ed90a0 WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) + 208
5 WebCore 0x7fff87944a3d WebCore::FrameLoader::commitProvisionalLoad() + 397
6 WebCore 0x7fff879e568d WebCore::DocumentLoader::commitLoad(char const*, int) + 77
7 WebCore 0x7fff879e5254 WebCore::DocumentLoader::dataReceived(WebCore::CachedResource*, char const*, int) + 292
8 WebCore 0x7fff879e4f51 WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) + 177
9 WebCore 0x7fff879e4b2a WebCore::CachedRawResource::addDataBuffer(WebCore::ResourceBuffer*) + 170
10 WebCore 0x7fff879e4802 WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::PassRefPtr<WebCore::SharedBuffer>, long long, WebCore::DataPayloadType) + 210
11 WebCore 0x7fff87a08b0c WebCore::SubresourceLoader::didReceiveBuffer(WTF::PassRefPtr<WebCore::SharedBuffer>, long long, WebCore::DataPayloadType) + 44
12 WebCore 0x7fff87a08a4a WebCore::ResourceLoader::didReceiveBuffer(WebCore::ResourceHandle*, WTF::PassRefPtr<WebCore::SharedBuffer>, int) + 90
13 WebCore 0x7fff87a08985 -[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:] + 101
14 CFNetwork 0x7fff8552c81d __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69
15 CFNetwork 0x7fff8552c681 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 232
16 CFNetwork 0x7fff8552c587 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
17 CFNetwork 0x7fff85538f74 _NSURLConnectionDidReceiveData_LengthReceived(_CFURLConnection*, __CFData const*, long, void const*) + 83
18 CFNetwork 0x7fff8552cf3b ___ZN27URLConnectionClient_Classic29_delegate_didReceiveDataArrayEv_block_invoke + 297
19 CFNetwork 0x7fff855e14a3 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 94
20 CFNetwork 0x7fff8547feec RunloopBlockContext::_invoke_block(void const*, void*) + 72
21 CoreFoundation 0x7fff9122c664 CFArrayApplyFunction + 68
22 CFNetwork 0x7fff8547fdad RunloopBlockContext::perform() + 133
23 CFNetwork 0x7fff8547fb98 MultiplexerSource::perform() + 282
24 CFNetwork 0x7fff8547f9ba MultiplexerSource::_perform(void*) + 72
25 CoreFoundation 0x7fff91260a01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26 CoreFoundation 0x7fff91252b8d __CFRunLoopDoSources0 + 269
27 CoreFoundation 0x7fff912521bf __CFRunLoopRun + 927
28 CoreFoundation 0x7fff91251bd8 CFRunLoopRunSpecific + 296
29 HIToolbox 0x7fff82b9356f RunCurrentEventLoopInMode + 235
30 HIToolbox 0x7fff82b932ea ReceiveNextEventCommon + 431
31 HIToolbox 0x7fff82b9312b _BlockUntilNextEventMatchingListInModeWithFilter + 71
32 AppKit 0x7fff8acc88ab _DPSNextEvent + 978
33 AppKit 0x7fff8acc7e58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
34 AppKit 0x7fff8acbdaf3 -[NSApplication run] + 594
35 AppKit 0x7fff8ac3a244 NSApplicationMain + 1832
36 libdyld.dylib 0x7fff896af5c9 start + 1
above is the log. Any idea why it happens and how to fix it?

iOS 7 Web Core issus loadPendingImages

I have this crash log, but I don't understand how to find what causes an issue.
Thread : Crashed: WebThread
0 WebCore 954995104 WebCore::StyleResolver::loadPendingImages() + 1135
1 WebCore 955192507 WebCore::ResourceRequestBase::~ResourceRequestBase() + 106
2 WebCore 954966933 WebCore::StyleResolver::applyMatchedProperties(WebCore::StyleResolver::MatchResult const&, WebCore::Element const*) + 792
3 WebCore 955009301 WebCore::StyleResolver::styleForElement(WebCore::Element*, WebCore::RenderStyle*, WebCore::StyleSharingBehavior, WebCore::RuleMatchingBehavior, WebCore::RenderRegion*) + 952
4 WebCore 956072077 WebCore::Document::styleForElementIgnoringPendingStylesheets(WebCore::Element*) + 96
5 WebCore 956071899 WebCore::Element::computedStyle(WebCore::PseudoId) + 142
6 WebCore 956433467 WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const + 466
7 WebCore 957126027 WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const + 42
8 WebCore 957125931 WebCore::CSSComputedStyleDeclaration::getPropertyValue(WTF::String const&) + 26
9 WebCore 957459107 WebCore::jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(JSC::ExecState*) + 258
10 JavaScriptCore 838902235 llint_native_call_trampoline + 64
11 JavaScriptCore 838939999 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 70
12 WebCore 955098071 WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 146
13 WebCore 957106929 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 520
14 WebCore 956836797 WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow>&) + 484
15 WebCore 955783727 WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 178
16 WebCore 955784069 WebCore::EventContext::handleLocalEvents(WebCore::Event*) const + 60
17 WebCore 955783067 WebCore::EventDispatcher::dispatch() + 546
18 WebCore 955782519 WebCore::EventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const + 10
19 WebCore 955780731 WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) + 154
20 WebCore 955780413 WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 100
21 WebCore 955830855 WebCore::Document::finishedParsing() + 102
22 WebCore 955791991 WebCore::HTMLDocumentParser::prepareToStopParsing() + 122
23 WebCore 956118393 WebCore::HTMLDocumentParser::notifyFinished(WebCore::CachedResource*) + 68
24 WebCore 956102527 WebCore::CachedResource::checkNotify() + 42
25 WebCore 956102065 WebCore::SubresourceLoader::didFinishLoading(double) + 112
26 WebCore 956101909 WebCore::didFinishLoading(_CFURLConnection*, void const*) + 132
27 CFNetwork 818745231 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 74
28 CFNetwork 818740111 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 54
29 CFNetwork 818942775 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 18
30 CoreFoundation 821665441 CFArrayApplyFunction + 36
31 CFNetwork 818314757 RunloopBlockContext::perform() + 164
32 CFNetwork 818314453 MultiplexerSource::perform() + 220
33 CFNetwork 818314085 MultiplexerSource::_perform(void*) + 48
34 CoreFoundation 822288159 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
35 CoreFoundation 822285287 __CFRunLoopDoSources0 + 206
36 CoreFoundation 822279127 __CFRunLoopRun + 630
37 CoreFoundation 821666929 CFRunLoopRunSpecific + 524
38 CoreFoundation 821666387 CFRunLoopRunInMode + 106
39 WebCore 955674821 RunWebThread(void*) + 420
40 libsystem_pthread.dylib 1000184925 _pthread_body + 140
41 libsystem_pthread.dylib 1000184783 _pthread_start + 102
42 libsystem_pthread.dylib 1000176848 thread_start + 8

App Crashes after executing background fetch completionHandler

I have updated our app for iOS 7 and added the background fetch functionality. However, i'm noticing some crashes because of this feature. After background fetch call is completed, the completion handler block is executed with either new/no data. This results in a call to 'layoutSubviews' of my custom navigation NavigationBar and sometimes app is crashing with the following stack trace. I could not reproduce this issue myself but constantly receiving these crash logs from our users. Any help would be appreciated.
Thread 0 Crashed:
0 libsystem_platform.dylib 0x39cba486 _platform_memmove$VARIANT$Swift + 102
1 Foundation 0x2fce8f47 -[NSData(NSData) getBytes:range:] + 419
2 CoreFoundation 0x2f30637d CFDataGetBytes + 205
3 ImageIO 0x300e7357 CGImageReadGetBytesAtOffset + 283
4 ImageIO 0x300e7231 CGImageReadSessionGetBytes + 29
5 ImageIO 0x3022baeb read_fn + 23
6 ImageIO 0x300e7189 png_read_sig + 45
7 ImageIO 0x300e6e0d _cg_png_read_info + 33
8 ImageIO 0x300ef62f copyImageBlockSetPNG + 1123
9 ImageIO 0x300eec4b ImageProviderCopyImageBlockSetCallback + 539
10 CoreGraphics 0x2f43577d CGImageProviderCopyImageBlockSetWithOptions + 137
11 CoreGraphics 0x2f43a145 subImageProviderCopyImageBlockSet + 305
12 CoreGraphics 0x2f43577d CGImageProviderCopyImageBlockSetWithOptions + 137
13 CoreGraphics 0x2f435433 img_blocks_create + 383
14 CoreGraphics 0x2f4286fd img_data_lock + 1053
15 CoreGraphics 0x2f427ae1 CGSImageDataLock + 89
16 libRIP.A.dylib 0x2f774da7 ripc_AcquireImage + 99
17 libRIP.A.dylib 0x2f774131 ripc_DrawImage + 601
18 CoreGraphics 0x2f4279f3 CGContextDelegateDrawImage + 51
19 CoreGraphics 0x2f427879 CGContextDrawImage + 285
20 WebCore 0x373120db WebCore::GraphicsContext::drawNativeImage(CGImage*, WebCore::FloatSize const&, WebCore::ColorSpace, WebCore::FloatRect const&, WebCore::FloatRect const&, float, WebCore::CompositeOperator, WebCore::BlendMode, WebCore::ImageOrientation) + 1127
21 WebCore 0x37310e79 WebCore::BitmapImage::draw(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode, WebCore::RespectImageOrientationEnum) + 349
22 WebCore 0x3735d897 WebCore::BitmapImage::draw(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode) + 31
23 WebCore 0x3735892f WebCore::Image::drawTiled(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatPoint const&, WebCore::FloatSize const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode) + 499
24 WebCore 0x37358735 WebCore::GraphicsContext::drawTiledImage(WebCore::Image*, WebCore::ColorSpace, WebCore::IntRect const&, WebCore::IntPoint const&, WebCore::IntSize const&, WebCore::CompositeOperator, bool, WebCore::BlendMode) + 193
25 WebCore 0x3728bc11 WebCore::RenderBoxModelObject::paintFillLayerExtended(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::InlineFlowBox*, WebCore::LayoutSize const&, WebCore::CompositeOperator, WebCore::RenderObject*) + 3321
26 WebCore 0x3728addd WebCore::RenderBox::paintFillLayers(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::CompositeOperator, WebCore::RenderObject*) + 449
27 WebCore 0x3728ab41 WebCore::RenderBox::paintBackground(WebCore::PaintInfo const&, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance) + 317
28 WebCore 0x37289ee5 WebCore::RenderBox::paintBoxDecorations(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 329
29 WebCore 0x3728806f WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 55
30 WebCore 0x37289c3f WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 187
31 WebCore 0x37288cc9 WebCore::RenderBlock::paintFloats(WebCore::PaintInfo&, WebCore::LayoutPoint const&, bool) + 305
32 WebCore 0x3728813d WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 261
33 WebCore 0x37289c3f WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 187
34 WebCore 0x37288cfb WebCore::RenderBlock::paintFloats(WebCore::PaintInfo&, WebCore::LayoutPoint const&, bool) + 355
35 WebCore 0x3728813d WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 261
36 WebCore 0x37289c3f WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 187
37 WebCore 0x37288861 WebCore::RenderLayer::paintForegroundForFragmentsWithPhase(WebCore::PaintPhase, WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow> const&, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int, WebCore::RenderObject*) + 269
38 WebCore 0x372886e7 WebCore::RenderLayer::paintForegroundForFragments(WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow> const&, WebCore::GraphicsContext*, WebCore::GraphicsContext*, WebCore::LayoutRect const&, bool, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int, WebCore::RenderObject*, bool, bool) + 235
39 WebCore 0x37286435 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1585
40 WebCore 0x37285ca9 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 621
41 WebCore 0x372885d9 WebCore::RenderLayer::paintList(WTF::Vector<WebCore::RenderLayer*, 0ul, WTF::CrashOnOverflow>*, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 101
42 WebCore 0x3728647f WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1659
43 WebCore 0x37285ca9 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 621
44 WebCore 0x372885d9 WebCore::RenderLayer::paintList(WTF::Vector<WebCore::RenderLayer*, 0ul, WTF::CrashOnOverflow>*, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 101
45 WebCore 0x3728647f WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1659
46 WebCore 0x37285ca9 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 621
47 WebCore 0x372859b3 WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::LayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, unsigned int) + 103
48 WebCore 0x3728541b WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&) + 499
49 WebKit 0x37c4578d -[WebFrame(WebInternal) _drawRect:contentsOnly:] + 357
50 WebKit 0x37c455b9 -[WebHTMLView drawSingleRect:] + 137
51 WebKit 0x37c454db -[WebHTMLView drawRect:] + 43
52 WebCore 0x37284d93 -[WAKView _drawRect:context:lockFocus:] + 275
53 WebCore 0x37284ec7 -[WAKView _drawRect:context:lockFocus:] + 583
54 WebCore 0x37284ec7 -[WAKView _drawRect:context:lockFocus:] + 583
55 WebCore 0x37284ec7 -[WAKView _drawRect:context:lockFocus:] + 583
56 WebCore 0x37284ec7 -[WAKView _drawRect:context:lockFocus:] + 583
57 WebCore 0x37284c47 -[WAKView displayRect:] + 59
58 WebCore 0x37284c03 -[WAKWindow displayRect:] + 55
59 WebCore 0x37284b49 WebCore::TileCache::drawWindowContent(TileLayer*, CGContext*, CGRect) + 673
60 WebCore 0x37284525 WebCore::TileCache::drawLayer(TileLayer*, CGContext*) + 505
61 QuartzCore 0x317d3813 CABackingStoreUpdate_ + 1859
62 QuartzCore 0x318ad735 ___ZN2CA5Layer8display_Ev_block_invoke + 53
63 QuartzCore 0x317d30c3 x_blame_allocations + 83
64 QuartzCore 0x317d2d77 CA::Layer::display_() + 1119
65 QuartzCore 0x317b6969 CA::Layer::display_if_needed(CA::Transaction*) + 209
66 QuartzCore 0x317b6601 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 25
67 QuartzCore 0x317b600d CA::Context::commit_transaction(CA::Transaction*) + 229
68 QuartzCore 0x317b5e1f CA::Transaction::commit() + 315
69 UIKit 0x31d973c9 _UIWindowUpdateVisibleContextOrder + 209
70 UIKit 0x31d9729d +[UIWindow _prepareWindowsPassingTestForAppResume:] + 13
71 UIKit 0x31db0ac5 -[UIApplication _updateSnapshotAndStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:] + 201
72 UIKit 0x31db0d81 -[UIApplication _replyToBackgroundFetchRequestWithResult:remoteNotificationToken:sequenceNumber:updateApplicationSnapshot:] + 105
73 UIKit 0x31db138d __61-[UIApplication _handleOpportunisticFetchWithSequenceNumber:]_block_invoke + 37
74 MyApp 0x001456b7 -[List fetched:error:withBackgroundFetchCompletionHandler:] (List.m:421)
75 MyApp 0x00144f87 __71-[List fetchFromServerWithBackgroundFetchCompletionHandler:]_block_invoke (List.m:292)
76 MyApp 0x0021ed07 APICompletionBlock_block_invoke_6 (APIRequest.m:305)
77 libdispatch.dylib 0x39b8c103 _dispatch_call_block_and_release + 11
78 libdispatch.dylib 0x39b8c0ef _dispatch_client_callout + 23
79 libdispatch.dylib 0x39b8e9a9 _dispatch_main_queue_callback_4CF + 269
80 CoreFoundation 0x2f3785b9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
81 CoreFoundation 0x2f376e85 __CFRunLoopRun + 1309
82 CoreFoundation 0x2f2e1541 CFRunLoopRunSpecific + 525
83 CoreFoundation 0x2f2e1323 CFRunLoopRunInMode + 107
84 GraphicsServices 0x340182eb GSEventRunModal + 139
85 UIKit 0x31b981e5 UIApplicationMain + 1137
86 MyApp 0x0009f77f main (main.m:14)
When you leave your app to the background, it saves the snapshot of the current view to the memory so it could be shown when you double-click the home button.
With the iOS7 background refresh feature ((void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler), you must execute the completionHandler function after you finish executing your fetch request.
The execution of that function also triggers updates to the UI - [UIApplication _updateSnapshotAndStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:], and in your case it triggers calculating the frame for a UIWebView from a background thread.
UIWebView can be updated only from the UIThread, so to overcome this crash I would suggest to wrap the completionHandler with execution on the main thread:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
{
void (^safeHandler)(UIBackgroundFetchResult) = ^(UIBackgroundFetchResult result){
dispatch_async(dispatch_get_main_queue(), ^{
completionHandler(result);
});
};
[someInstance doSomethingInBackground:userInfo withHandler:safeHandler];
}
And you will no longer have to worry where you invoke the completionHandler (now safeHandler) from.

Resources