Recently, I upgradie my iPad app's code to support iOS 4.0. I just added the following methods with no actual code in them in my AppDelegate:
applicationWillEnterForeground:
applicationDidBecomeActive:
applicationWillResignActive:
applicationDidEnterBackground:
I imagined there shouldn't be any change on my 3.2 device, as it shouldn't even be aware of these methods.
However, I received the following "failed to resume in time" time out, on my 3.2 device, which shouldn't do any resuming. This just doesn't make sense to me. Any ideas?
Incident Identifier: 5AB41509-89C9-4016-959A-96F466170CED
CrashReporter Key: fedcf4c4ba6f9d644032ce85fe1bc62664631a46
Hardware Model: iPad1,1
Process: News [1530]
Path: /var/mobile/Applications/76A324ED-567E-4253-9A3B-29A61892C5E4/News.app/News
Identifier: News
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-11-25 15:49:49.934 +0800
OS Version: iPhone OS 3.2.2 (7B500)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.NewsPad failed to resume in time
elapsed total CPU time (seconds): 1.580 (user 0.790, system 0.790), 8% CPU
elapsed application CPU time (seconds): 0.690, 3% CPU
Thread 0:
0 libSystem.B.dylib 0x000016c4 semaphore_wait_signal_trap + 8
1 libSystem.B.dylib 0x0002ecc2 semaphore_wait_signal + 2
2 libSystem.B.dylib 0x000034b4 pthread_mutex_lock + 248
3 CoreGraphics 0x00025064 CGFontCacheLock + 24
4 CoreGraphics 0x00024ffe CGGlyphLockLockGlyphBitmaps + 142
5 libRIP.A.dylib 0x00002720 ripc_RenderGlyphs + 116
6 libRIP.A.dylib 0x0000ab38 ripc_DrawGlyphs + 1004
7 CoreGraphics 0x00024166 CGContextDelegateDrawGlyphs + 26
8 CoreGraphics 0x0002411c draw_glyphs + 720
9 CoreGraphics 0x00023cae CGContextShowGlyphsWithAdvances + 398
10 WebCore 0x00007b0e WebCore::Font::drawGlyphs(WebCore::GraphicsContext*, WebCore::SimpleFontData const*, WebCore::GlyphBuffer const&, int, int, WebCore::FloatPoint const&, bool) const + 902
11 WebCore 0x0000775e WebCore::Font::drawGlyphBuffer(WebCore::GraphicsContext*, WebCore::GlyphBuffer const&, WebCore::TextRun const&, WebCore::FloatPoint&) const + 154
12 WebCore 0x00007594 WebCore::Font::drawSimpleText(WebCore::GraphicsContext*, WebCore::TextRun const&, WebCore::FloatPoint const&, int, int) const + 380
13 WebCore 0x000073f8 WebCore::Font::drawText(WebCore::GraphicsContext*, WebCore::TextRun const&, WebCore::FloatPoint const&, int, int) const + 104
14 WebCore 0x00007382 drawAtPoint(unsigned short const*, int, WebCore::FloatPoint const&, WebCore::Font const&, WebCore::GraphicsContext*, WebCore::BidiStatus*, int) + 130
15 WebCore 0x00006ea0 -[NSString(WebStringDrawing) _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:] + 308
16 UIKit 0x0003c15e -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:] + 110
17 UIKit 0x0003c0d8 -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:] + 44
18 UIKit 0x00047b2c -[UILabel _drawTextInRect:baselineCalculationOnly:] + 1460
19 UIKit 0x00047560 -[UILabel drawTextInRect:] + 44
20 UIKit 0x00047518 -[UILabel drawRect:] + 52
21 UIKit 0x00043f9e -[UIView(CALayerDelegate) drawLayer:inContext:] + 246
22 QuartzCore 0x00014ba2 -[CALayer drawInContext:] + 86
23 QuartzCore 0x00013b02 -[CALayer _display] + 374
24 QuartzCore 0x0001396e -[CALayer display] + 134
25 QuartzCore 0x000138b6 CALayerDisplayIfNeeded + 178
26 QuartzCore 0x00008b64 CA::Context::commit_transaction(CA::Transaction*) + 212
27 QuartzCore 0x00008974 CA::Transaction::commit() + 180
28 QuartzCore 0x0002e15e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 46
29 CoreFoundation 0x0006f29a __CFRunLoopDoObservers + 406
30 CoreFoundation 0x00022baa CFRunLoopRunSpecific + 1722
31 CoreFoundation 0x000224da CFRunLoopRunInMode + 42
32 GraphicsServices 0x000030d4 GSEventRunModal + 108
33 GraphicsServices 0x00003180 GSEventRun + 56
34 UIKit 0x0000342a -[UIApplication _run] + 374
35 UIKit 0x00001954 UIApplicationMain + 636
36 News 0x00003182 main (main.m:7)
37 News 0x00002e00 start + 32
See the similar questions,
"failed to resume in time" on resumption from background crash
how to resolve "failed to resume in time" on iOS
your problem is because you using some long calculation before the application starts in main thread. Try putting those in thread.
thanks,
Related
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.
All init of CIFilter causes a crash for some devices iPhone 11 & iPhone XR. iOS version 13.3.1, 13.4.1.
I tried to import :
import CoreImage
import CoreImage.CIFilter
import CoreImage.CIFilterBuiltins
But Its not working !
I use xCode 11.4.1 & xCode 11.5
I have tried several things:
if let filter = CIFilter(name: "CIQRCodeGenerator") {
filter.setValue(data, forKey: "inputMessage")
let transform = CGAffineTransform(scaleX: 5, y: 5)
if let output = filter.outputImage?.transformed(by: transform) {
return UIImage(ciImage: output)
}
}
or this :
let filter = CIFilter.qrCodeGenerator()
I also tried to link to CoreImage.framework explicitly in the target settings.
Crash log:
Crashed: com.apple.main-thread
0 CocoaDebug 0x1023a0adc perform_rebinding_with_section + 332
1 CocoaDebug 0x1023a087c rebind_symbols_for_image + 416
2 libdyld.dylib 0x1999c3f4c invocation function for block in dyld3::AllImages::runImageCallbacks(dyld3::Array<dyld3::LoadedImage> const&) + 244
3 libdyld.dylib 0x1999c3768 dyld3::AllImages::runImageCallbacks(dyld3::Array<dyld3::LoadedImage> const&) + 160
4 libdyld.dylib 0x1999c8dd8 dyld3::AllImages::loadImage(Diagnostics&, unsigned int, dyld3::closure::DlopenClosure const*, bool, bool, bool, bool) + 580
5 libdyld.dylib 0x1999c89ec dyld3::AllImages::dlopen(Diagnostics&, char const*, bool, bool, bool, bool, bool, void const*) + 868
6 libdyld.dylib 0x1999ca434 dyld3::dlopen_internal(char const*, int, void*) + 364
7 libdyld.dylib 0x1999bd6c0 dlopen + 116
8 CoreFoundation 0x199bcf5c8 _CFBundleDlfcnLoadBundle + 156
9 CoreFoundation 0x199af1eac _CFBundleLoadExecutableAndReturnError + 372
10 Foundation 0x199ec27a8 -[NSBundle loadAndReturnError:] + 316
11 CoreImage 0x19b479bcc invocation function for block in register_more_builtins(void (NSString*) block_pointer) + 804
12 libdispatch.dylib 0x19986833c _dispatch_client_callout + 20
13 libdispatch.dylib 0x199869a68 _dispatch_once_callout + 32
14 CoreImage 0x19b476318 register_more_builtins(void (NSString*) block_pointer) + 304
15 CoreImage 0x19b476b40 classNameIsSystemFilter(NSString*) + 112
16 CoreImage 0x19b476dbc +[CIFilter(CIFilterRegistryPrivate) filterWithName:setDefaults:] + 396
17 MYApp 0x100656598 QRCodeViewController.generateQRCode(from:) + 4370490776 (<compiler-generated>:4370490776)
18 MYApp 0x1006563a4 QRCodeViewController.viewDidLoad() + 28 (QRCodeViewController.swift:28)
19 MYApp 0x10065642c #objc QRCodeViewController.viewDidLoad() + 4370490412 (<compiler-generated>:4370490412)
20 UIKitCore 0x19d6a236c -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 104
21 UIKitCore 0x19d6a6f20 -[UIViewController loadViewIfRequired] + 952
22 UIKitCore 0x19d6a730c -[UIViewController view] + 32
23 UIKitCore 0x19d602fa4 -[UINavigationController _startCustomTransition:] + 1148
24 UIKitCore 0x19d617478 -[UINavigationController _startDeferredTransitionIfNeeded:] + 692
25 UIKitCore 0x19d618818 -[UINavigationController __viewWillLayoutSubviews] + 176
26 UIKitCore 0x19d5fb4fc -[UILayoutContainerView layoutSubviews] + 228
27 UIKitCore 0x19e1de6a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2168
28 QuartzCore 0x1a08314a0 -[CALayer layoutSublayers] + 292
29 QuartzCore 0x1a08318e0 CA::Layer::layout_if_needed(CA::Transaction*) + 472
30 QuartzCore 0x1a0843dc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
31 QuartzCore 0x1a0788884 CA::Context::commit_transaction(CA::Transaction*, double) + 304
32 QuartzCore 0x1a07b33d0 CA::Transaction::commit() + 656
33 QuartzCore 0x1a07b3fc8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 96
34 CoreFoundation 0x199b42c54 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
35 CoreFoundation 0x199b3d8e4 __CFRunLoopDoObservers + 420
36 CoreFoundation 0x199b3dd84 __CFRunLoopRun + 1020
37 CoreFoundation 0x199b3d660 CFRunLoopRunSpecific + 480
38 GraphicsServices 0x1a3f4e604 GSEventRunModal + 164
39 UIKitCore 0x19dd1215c UIApplicationMain + 1944
40 MYApp 0x100518e54 main + 4369190484 (<compiler-generated>:4369190484)
41 libdyld.dylib 0x1999b91ec start + 4
With the simulator it works well.
Someone would have any idea ?
Thanks
I figured out how to fix it.
The problem was the third-party CocoaDebug !
I remove the pod and I have no more crashes!
Thanks!
We ported our app from UIWebView to WkWebView.
Since then the app crashes sporadically (sometimes after minutes, sometimes after hours, sometimes not at all) while being in background.
Looking at the termination reason 0x8badf00d (see crash report below) and Apple's developer documentation (Understanding and Analyzing Application Crash Reports) the crash seems to be related to a watchdog timeout.
The only task we start in our code while the app moves to background is embedded in appropriate calls to UIApplication.SharedApplication.BeginBackgroundTask and UIApplication.SharedApplication.EndBackgroundTask. That task is a network request that does not run on the main UI thread and it completes within a second.
That said I assume the crash to be related to a WebKit / JavaScriptCore issue.
Did anyone else experience such crashes (exception type EXC_BAD_ACCESS (SIGKILL) & termination reason Namespace ASSERTIOND, Code 0x8badf00d) and can provide any specific hint about how to avoid them?
Many thanks in advance & best regards!
Mario.
Incident Identifier: 2084FF7B-EDFB-41D4-849F-E03F75335214
CrashReporter Key: 0af317c4eee2f011df0e1a9fc253199241998699
Hardware Model: iPhone10,6
Process: App [1798]
Path: /private/var/containers/Bundle/Application/A4FF0F47-4ED6-4A97-8F15-E6AC432FC62D/App.app/App
Identifier: com.abc.app
Version: 7000025 (7.0.25)
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: com.abc.app [792]
Date/Time: 2019-03-20 10:15:43.9491 +0100
Launch Time: 2019-03-20 09:55:44.7537 +0100
OS Version: iPhone OS 12.1.4 (16D57)
Baseband Version: 2.02.51
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4370874368
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 0000000104864000-0000000105bdc000 [ 19.5M] r-x/r-x SM=COW ...honeMobileiOS
Termination Reason: Namespace ASSERTIOND, Code 0x8badf00d
Triggered by Thread: 0
Thread 0 name: tid_303 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001841bef0c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000184241410 _pthread_cond_wait$VARIANT$armv81 + 620
2 JavaScriptCore 0x000000018b95b7d8 WTF::ThreadCondition::timedWait+ 305112 (WTF::Mutex&, WTF::WallTime) + 148
3 JavaScriptCore 0x000000018b9429a0 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void + 203168 ()> const&, WTF::TimeWithDynamicClockType const&) + 2004
4 JavaScriptCore 0x000000018b91c2e4 bool WTF::Condition::waitUntil<WTF::Lock>+ 45796 (WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x000000018b920010 WTF::BinarySemaphore::wait+ 61456 (WTF::TimeWithDynamicClockType) + 112
6 WebKit 0x000000019400a2b0 IPC::Connection::waitForSyncReply+ 455344 (unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 276
7 WebKit 0x0000000194009af8 IPC::Connection::sendSyncMessage+ 453368 (unsigned long long, std::__1::unique_ptr<IPC::Encoder, std::__1::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 416
8 WebKit 0x00000001942cac3c bool IPC::Connection::sendSync<Messages::WebProcess::ProcessWillSuspendImminently>+ 3341372 (Messages::WebProcess::ProcessWillSuspendImminently&&, Messages::WebProcess::ProcessWillSuspendImminently::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 176
9 WebKit 0x00000001942c5a70 bool WebKit::ChildProcessProxy::sendSync<Messages::WebProcess::ProcessWillSuspendImminently>+ 3320432 (Messages::WebProcess::ProcessWillSuspendImminently&&, Messages::WebProcess::ProcessWillSuspendImminently::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 120
10 WebKit 0x00000001942c59e8 WebKit::WebProcessProxy::sendProcessWillSuspendImminently+ 3320296 () + 76
11 WebKit 0x0000000193fafabc -[WKProcessAssertionBackgroundTaskManager _notifyClientsOfImminentSuspension] + 72
12 WebKit 0x00000001940ea7fc __64-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]_block_invoke + 168
13 UIKitCore 0x00000001b1801a8c _fireBackgroundExpirationHandlers + 300
14 FrontBoardServices 0x0000000187057504 __69-[FBSUIApplicationWorkspace clientHandleAssertionExpirationImminent:]_block_invoke + 76
15 FrontBoardServices 0x000000018706ae94 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64
16 libdispatch.dylib 0x0000000184062484 _dispatch_client_callout + 16
17 libdispatch.dylib 0x00000001840393e0 _dispatch_block_invoke_direct$VARIANT$armv81 + 216
18 FrontBoardServices 0x000000018709fa9c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
19 FrontBoardServices 0x000000018709f728 -[FBSSerialQueue _performNext] + 416
20 FrontBoardServices 0x000000018709fd44 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
21 CoreFoundation 0x00000001845ba0e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
22 CoreFoundation 0x00000001845ba060 __CFRunLoopDoSource0 + 88
23 CoreFoundation 0x00000001845b9944 __CFRunLoopDoSources0 + 176
24 CoreFoundation 0x00000001845b4810 __CFRunLoopRun + 1040
25 CoreFoundation 0x00000001845b40e0 CFRunLoopRunSpecific + 436
26 GraphicsServices 0x000000018682d584 GSEventRunModal + 100
27 UIKitCore 0x00000001b1804c00 UIApplicationMain + 212
28 Xamarin.Sdk 0x0000000106da9518 0x106224000 + 12080408
29 Xamarin.Sdk 0x0000000106cfac8c 0x106224000 + 11365516
30 Xamarin.Sdk 0x0000000106cfac4c 0x106224000 + 11365452
31 App 0x00000001049cf7fc App_Application_Main_string__ + 1488892 (/<unknown>:1)
32 Xamarin.Sdk 0x0000000106526bb8 0x106224000 + 3156920
33 Mono 0x0000000105fd7374 mono_jit_runtime_invoke + 904
34 Mono 0x000000010605d1a0 mono_runtime_invoke_checked + 148
35 Mono 0x0000000106063084 mono_runtime_exec_main_checked + 120
36 Mono 0x0000000105fb6c1c mono_jit_exec + 268
37 Xamarin 0x0000000105d76cc8 xamarin_main + 1132
38 App 0x00000001049c8e4c main + 1461836 (main.m:155)
39 libdyld.dylib 0x0000000184072bb4 start + 4
MvvmCross_Core_MvvmCross_Core_ViewModels_MvxViewModelLoader_FindViewModelLocator_ causes app to crash. Looked through the MVVMCross source code and could not tell what caused this error and how to handle it. Appreciate any help here. Below is the crash report
Using MMVMCross 4.0
<package id="MvvmCross.Core" version="4.0.0" targetFramework="xamarinios10" />
Incident Identifier: 73492D3A-04AC-4CB2-A30F-11C03932B333
CrashReporter Key: 89c9f505981a4f47ba51b95e37591830d9aeef45
Hardware Model: iPhone6,1
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-04-12 09:40:49.49 -0400
Launch Time: 2016-04-12 09:40:45.45 -0400
OS Version: iOS 9.3.1 (13E238)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000182c9c11c __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000182d68ef8 pthread_kill + 112
2 libsystem_c.dylib 0x0000000182c0ddac abort + 140
3 MobilityiOS 0x0000000101630678 print_exception(MonoObject*, bool, NSMutableString*) (runtime.m:782)
4 MobilityiOS 0x0000000101538220 mono_invoke_unhandled_exception_hook (mini-exceptions.c:2586)
5 MobilityiOS 0x0000000101537694 mono_handle_exception_internal (mini-exceptions.c:1573)
6 MobilityiOS 0x0000000101536604 mono_handle_exception (mini-exceptions.c:1799)
7 MobilityiOS 0x000000010152f8bc mono_arm_throw_exception (exceptions-arm64.c:383)
8 MobilityiOS 0x000000010051c278 throw_exception + 168
9 MobilityiOS 0x0000000100f07e4c MvvmCross_Core_MvvmCross_Core_ViewModels_MvxViewModelLoader_FindViewModelLocator_MvvmCross_Core_ViewModels_MvxViewModelRequest + 0
10 MobilityiOS 0x0000000100f07d00 MvvmCross_Core_MvvmCross_Core_ViewModels_MvxViewModelLoader_LoadViewModel_MvvmCross_Core_ViewModels_MvxViewModelRequest_MvvmCross_Core_ViewModels_IMvxBundle + 108
11 MobilityiOS 0x00000001010b404c MvvmCross_iOS_MvvmCross_iOS_Views_MvxViewControllerExtensionMethods_LoadViewModel_MvvmCross_iOS_Views_IMvxIosView + 276
12 MobilityiOS 0x0000000100f02474 MvvmCross_Core_MvvmCross_Core_Views_MvxViewExtensionMethods_OnViewCreate_MvvmCross_Core_Views_IMvxView_System_Func_1_MvvmCross_Core_ViewModels_IMvxViewModel + 96
13 MobilityiOS 0x00000001010b3f28 MvvmCross_iOS_MvvmCross_iOS_Views_MvxViewControllerExtensionMethods_OnViewCreate_MvvmCross_iOS_Views_IMvxIosView + 100
14 MobilityiOS 0x00000001010b2ff4 MvvmCross_iOS_MvvmCross_iOS_Views_MvxViewControllerAdapter_HandleViewDidLoadCalled_object_System_EventArgs + 136
15 MobilityiOS 0x000000010042d0d4 mscorlib_wrapper_delegate_invoke__Module_invoke_void_object_EventArgs_object_System_EventArgs + 120
16 MobilityiOS 0x0000000100edd43c MvvmCross_Platform_MvvmCross_Platform_Core_MvxDelegateExtensionMethods_Raise_System_EventHandler_object + 36
17 MobilityiOS 0x0000000100f9bba4 MvvmCross_Platform_iOS_MvvmCross_Platform_iOS_Views_MvxEventSourceViewController_ViewDidLoad + 32
18 MobilityiOS 0x000000010018b7a4 MobilityiOS_Mobility_iOS_Views_BaseMvxViewController_ViewDidLoad + 972
19 MobilityiOS 0x000000010018c758 MobilityiOS_Mobility_iOS_Views_Main_HomeView_ViewDidLoad + 232
20 MobilityiOS 0x00000001004ff784 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
21 MobilityiOS 0x00000001015430dc mono_jit_runtime_invoke (mini-runtime.c:2335)
22 MobilityiOS 0x00000001015aa59c mono_runtime_invoke (object.c:2783)
23 MobilityiOS 0x0000000101262d64 native_to_managed_trampoline_3(objc_object*, objc_selector*, _MonoMethod**, char const*, char const*) (registrar.m:118)
24 MobilityiOS 0x0000000101266400 -[HomeView viewDidLoad] (registrar.m:3608)
25 UIKit 0x000000018824cb40 -[UIViewController loadViewIfRequired] + 996
26 UIKit 0x000000018830d118 -[UINavigationController _layoutViewController:] + 72
27 UIKit 0x000000018830cff0 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 416
28 UIKit 0x000000018830c238 -[UINavigationController _startTransition:fromViewController:toViewController:] + 144
29 UIKit 0x000000018830bddc -[UINavigationController _startDeferredTransitionIfNeeded:] + 868
30 UIKit 0x000000018830ba04 -[UINavigationController __viewWillLayoutSubviews] + 60
31 UIKit 0x000000018830b96c -[UILayoutContainerView layoutSubviews] + 208
32 UIKit 0x00000001882480e4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 656
33 QuartzCore 0x0000000185beea28 -[CALayer layoutSublayers] + 148
34 QuartzCore 0x0000000185be9634 CA::Layer::layout_if_needed(CA::Transaction*) + 292
35 QuartzCore 0x0000000185be94f4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
36 QuartzCore 0x0000000185be8b24 CA::Context::commit_transaction(CA::Transaction*) + 252
37 QuartzCore 0x0000000185be886c CA::Transaction::commit() + 512
38 QuartzCore 0x0000000185be1dd8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
39 CoreFoundation 0x00000001830b87b0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
40 CoreFoundation 0x00000001830b6554 __CFRunLoopDoObservers + 372
41 CoreFoundation 0x0000000182fe0d30 CFRunLoopRunSpecific + 416
42 UIKit 0x00000001882bb834 -[UIApplication _run] + 460
43 UIKit 0x00000001882b5f70 UIApplicationMain + 204
44 MobilityiOS 0x00000001002897a4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 324
45 MobilityiOS 0x000000010020ed74 Xamarin_iOS_UIKit_UIApplication_Main_string___string_string + 156
46 MobilityiOS 0x00000001001830a0 MobilityiOS_Mobility_iOS_Application_Main_string__ + 24
47 MobilityiOS 0x00000001004ff784 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
48 MobilityiOS 0x00000001015430dc mono_jit_runtime_invoke (mini-runtime.c:2335)
49 MobilityiOS 0x00000001015aa59c mono_runtime_invoke (object.c:2783)
50 MobilityiOS 0x00000001015aec90 mono_runtime_exec_main (object.c:4038)
51 MobilityiOS 0x00000001016424ac xamarin_main (monotouch-main.m:404)
52 MobilityiOS 0x000000010128e78c main (main.arm64.m:130)
53 libdyld.dylib 0x0000000182b7e8b8 start + 4
You should have 2 views using the same viewmodel.
This is forbidden by mvvmcross by default, and will crash the view/viewmodel locator.
I am having a lot of Sprite Kit crashes in iOS 9. The below are logs I am getting. I don't think this has anything to do with my code and seems more like a SpriteKit bug in iOS 9. Anyone else faced the same issue and resolved yet?
Thread : Crashed: com.apple.main-thread
0 libmetal_timestamp.dylib 0x2ca73322 (Missing)
1 libmetal_timestamp.dylib 0x2ca73e13 (Missing)
2 RawCamera 0x226b068d (Missing)
3 OpenAL 0x2685a17f (Missing)
4 OpenAL 0x2685a0b3 (Missing)
5 OpenGLES 0x26865079 -[EAGLContext presentRenderbuffer:] + 60
6 Jet 0x2dc85eb7 jet_context_OpenGL::present(std::__1::shared_ptr<jet_texture> const&, double) + 290
7 SpriteKit 0x280ec63d SKCRenderer::render(SKCNode*, float vector[4], std::__1::shared_ptr<jet_framebuffer> const&, unsigned int vector[4], matrix_float4x4, bool, NSDictionary*, SKCStats*, SKCStats*) + 1644
8 SpriteKit 0x28089a7f __51-[SKView _vsyncRenderForTime:preRender:postRender:]_block_invoke + 998
9 SpriteKit 0x28089d59 __51-[SKView _vsyncRenderForTime:preRender:postRender:]_block_invoke196 + 300
10 SpriteKit 0x280895e1 -[SKView _vsyncRenderForTime:preRender:postRender:] + 440
11 SpriteKit 0x2808b15b __29-[SKView setUpRenderCallback]_block_invoke + 118
12 SpriteKit 0x280bc1fb -[SKDisplayLink _callbackForNextFrame:] + 58
13 QuartzCore 0x27afe85f CA::Display::DisplayLinkItem::dispatch() + 106
14 QuartzCore 0x27afe6af CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 594
15 IOMobileFramebuffer 0x2db8b58b IOMobileFramebufferVsyncNotifyFunc + 86
16 IOKit 0x25179345 IODispatchCalloutFromCFMessage + 256
17 CoreFoundation 0x2406ab59 __CFMachPortPerform + 132
18 CoreFoundation 0x2407cf7b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
19 CoreFoundation 0x2407c68f __CFRunLoopDoSource1 + 342
20 CoreFoundation 0x2407aaa1 __CFRunLoopRun + 1704
21 CoreFoundation 0x23fcd0d9 CFRunLoopRunSpecific + 516
22 CoreFoundation 0x23fccecd CFRunLoopRunInMode + 108
23 GraphicsServices 0x2d342af9 GSEventRunModal + 160
24 UIKit 0x282562dd UIApplicationMain + 144
25 jumpytiles 0x9358c main (AppDelegate.swift:17)
26 libdyld.dylib 0x35ec8873 start + 2