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
Related
We encountered an OpenGL related crash on ios14. It has nothing to do with the application background. The vast majority of crashes occurred on IOS 14 low-end devices, and it is not clear how to solve them.
The only possible clue is that the crash may have something to do with opening the WebView.
Monitor Type: Unix Signal
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x00000001c7517414
Crashed Thread: 0
Pthread id: 10322737
Thread 0 Crashed:
0 libsystem_kernel.dylib __pthread_kill + 8
1 libsystem_pthread.dylib pthread_kill + 272
2 libsystem_c.dylib abort + 104
3 AppleMetalGLRenderer GLDContextRec::flushContextInternal() + 852
4 GLEngine gliPresentViewES_Exec + 188
5 OpenGLES -[EAGLContext presentRenderbuffer:] + 76
6 myapp -[EJCanvasContextWebGLScreen present] (EJCanvasContextWebGLScreen.m:142)
7 QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 664
8 QuartzCore display_timer_callback(__CFMachPort*, void*, long, void*) + 280
9 CoreFoundation __CFMachPortPerform + 176
10 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
11 CoreFoundation __CFRunLoopDoSource1 + 596
12 CoreFoundation __CFRunLoopRun + 2360
13 CoreFoundation CFRunLoopRunSpecific + 600
14 GraphicsServices GSEventRunModal + 164
15 UIKitCore -[UIApplication _run] + 1072
16 UIKitCore UIApplicationMain + 168
17 myapp main (main.m:36)
18 libdyld.dylib start + 4
I'm 100% sure presentRenderBuffer works fine in iOS14.
According to the error message, it seems like a thread issue.
In my case, I use a queue to detail with all of the OpenGL things.
dispatch_sync(queue, ^{
// All of the OpenGL things
[self bindCurrentRenderBuffer];
[self presentRenderBuffer];
});
You can see my OpenGL project in Github: IRPlayer
Updated to Xcode 7.1 today. Cannot open, due to a crash that says "Xcode quit unexpectedly while using the libswiftCore.dylib plug-in.
Stack trace:
Process: Xcode [610]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.1 (9079)
Build Info: IDEFrameworks-9079000000000000~8
App Item ID: 497799835
App External ID: 813804225
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [610]
User ID: 502
PlugIn Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib
PlugIn Identifier: libswiftCore.dylib
PlugIn Version: 2.1 (700.1.101.6)
Date/Time: 2015-10-23 17:33:26.756 +0100
OS Version: Mac OS X 10.11.1 (15B42)
Report Version: 11
Anonymous UUID: 92906A5F-963D-4D90-6510-F624BB6F0130
Time Awake Since Boot: 350 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 7B91b
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x00007fff9a2fed32 strlen + 18
1 libswiftCore.dylib 0x00000001124f7aac _buildDemanglingForNominalType(swift::Demangle::Node::Kind, swift::Metadata const*, swift::NominalTypeDescriptor const*) + 44
2 libswiftCore.dylib 0x00000001124f5cc5 _buildDemanglingForMetadata(swift::Metadata const*) + 133
3 libswiftCore.dylib 0x00000001124f7b7c _buildDemanglingForNominalType(swift::Demangle::Node::Kind, swift::Metadata const*, swift::NominalTypeDescriptor const*) + 252
4 libswiftCore.dylib 0x00000001124f5cc5 _buildDemanglingForMetadata(swift::Metadata const*) + 133
5 libswiftCore.dylib 0x00000001124f59bc swift_getGenericClassObjCName + 28
6 libswiftCore.dylib 0x00000001124475dd 0x1122ae000 + 1676765
7 libswiftCore.dylib 0x00000001124ebdd8 (anonymous namespace)::GenericCacheEntry* llvm::function_ref<(anonymous namespace)::GenericCacheEntry* ()>::callback_fn<swift::swift_getGenericMetadata::$_0>(long) + 24
8 libswiftCore.dylib 0x00000001124ebce0 swift::MetadataCache<(anonymous namespace)::GenericCacheEntry>::addMetadataEntry(swift::EntryRef<(anonymous namespace)::GenericCacheEntry>, ConcurrentList<swift::MetadataCache<(anonymous namespace)::GenericCacheEntry>::EntryPair>&, llvm::function_ref<(anonymous namespace)::GenericCacheEntry* ()>) + 128
9 libswiftCore.dylib 0x00000001124e8488 swift_getGenericMetadata + 504
10 libswiftCore.dylib 0x00000001124e851d swift_getGenericMetadata3 + 29
11 libswiftFoundation.dylib 0x00000001127c9226 _TZFe0_Rq_Ss8Hashable_10FoundationVSs10Dictionary26_forceBridgeFromObjectiveCu0_Rq_S__fMGS1_q_q0__FTCSo12NSDictionary6resultRGSqGS1_q_q0____T_ + 54
12 libswiftFoundation.dylib 0x00000001127c90ed _TF10Foundation32_convertNSDictionaryToDictionaryu0_Rq_Ss8Hashable_FGSqCSo12NSDictionary_GVSs10Dictionaryq_q0__ + 61
13 ca.nri.ColorSenseRainbow 0x000000011207e1ad _TTSf4g_n___TZFC17ColorSenseRainbow17ColorSenseRainbow13pluginDidLoadfMS0_FCSo8NSBundleT_ + 189 (ColorSenseRainbow.swift:33)
14 ca.nri.ColorSenseRainbow 0x000000011207c6f5 _TToZFC17ColorSenseRainbow17ColorSenseRainbow13pluginDidLoadfMS0_FCSo8NSBundleT_ + 37
15 com.apple.Xcode.DevToolsCore 0x000000010ded1658 __46-[XCPluginManager loadPluginBundle:forDomain:]_block_invoke + 143
16 com.apple.dt.DVTFoundation 0x00000001058ba9bc DVTInvokeWithFailureHint + 83
17 com.apple.Xcode.DevToolsCore 0x000000010ded13c8 -[XCPluginManager loadPluginBundle:forDomain:] + 1054
18 com.apple.Xcode.DevToolsCore 0x000000010ded0e5b __46-[XCPluginManager findAndLoadPluginsInDomain:]_block_invoke + 621
19 com.apple.dt.DVTFoundation 0x00000001058a02c5 -[DVTPlugInManager _allowNonApplePlugInsFromDescriptors:error:] + 470
20 com.apple.dt.DVTFoundation 0x00000001058a054d -[DVTPlugInManager _checkNonApplePlugIns] + 239
21 com.apple.dt.DVTFoundation 0x00000001058a062e -[DVTPlugInManager initializePlugIns:] + 27
22 com.apple.dt.IDEFoundation 0x00000001063f1724 _IDEInitializeOtherPlugInStuff + 175
23 com.apple.dt.IDEFoundation 0x00000001063f2814 IDEInitialize + 3725
24 com.apple.dt.IDEKit 0x0000000106aee2fc -[IDEApplicationController applicationWillFinishLaunching:] + 708
25 com.apple.CoreFoundation 0x00007fff9d30cc9c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
26 com.apple.CoreFoundation 0x00007fff9d30cc2f ___CFXRegistrationPost_block_invoke + 63
27 com.apple.CoreFoundation 0x00007fff9d30cba7 _CFXRegistrationPost + 407
28 com.apple.CoreFoundation 0x00007fff9d30c912 ___CFXNotificationPost_block_invoke + 50
29 com.apple.CoreFoundation 0x00007fff9d2c96d2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
30 com.apple.CoreFoundation 0x00007fff9d2c8925 _CFXNotificationPost + 693
31 com.apple.Foundation 0x00007fff97dc40fa -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
32 com.apple.dt.DVTFoundation 0x0000000105892d45 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 698
33 com.apple.AppKit 0x00007fff91657022 -[NSApplication finishLaunching] + 354
34 com.apple.dt.DVTKit 0x0000000105e9349c -[DVTApplication finishLaunching] + 149
35 com.apple.AppKit 0x00007fff91656b65 -[NSApplication run] + 231
36 com.apple.AppKit 0x00007fff9161ffbe NSApplicationMain + 1176
37 libdyld.dylib 0x00007fff938e75ad start + 1
Please help. Anyone else get this? I did have to update this again after the update bombed in the middle of the download, and I had to manually download the .dmg file from the dev portal. After wiping the machine clean of anything related to Xcode, I reinstalled from the App Store. Giving me this every time, even after a restart.
Take out the ColorSenseRainbow plugin from:
~/Library/Application Support/Developer/Shared/Xcode/Plugin-ins
I'm looking into why it's causing Xcode to crash.
When it's fixed I'll post a note up at the GitHub site at https://github.com/NorthernRealities/ColorSenseRainbow
Recently our released app have crashed several times with a stack trace that contain very little information to what the root cause can be. According to the crash log, the crash happens in thread 1, but this thread only have two calls. Could it be that the real problem is still in the main thread 0?
Could anyone suggest the best approach to find the background problem?
Hardware Model: iPhone6,2
Process: App [159]
Version: 0813 (1.3.2)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2014-08-16 16:51:48.114 +0200
OS Version: iOS 7.1.2 (11D257)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x00000001924901d0 objc_msgSend + 16
1 UIKit 0x0000000189026d94 -[UITableView _updateVisibleCellsNow:] + 1748
2 UIKit 0x0000000189026610 -[UITableView layoutSubviews] + 164
3 UIKit 0x0000000188f3afdc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 344
4 QuartzCore 0x0000000188b2c254 -[CALayer layoutSublayers] + 180
5 QuartzCore 0x0000000188b26e1c CA::Layer::layout_if_needed(CA::Transaction*) + 296
6 QuartzCore 0x0000000188b26cd4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
7 QuartzCore 0x0000000188b2655c CA::Context::commit_transaction(CA::Transaction*) + 276
8 QuartzCore 0x0000000188b26300 CA::Transaction::commit() + 420
9 QuartzCore 0x0000000188b1fc34 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 76
10 CoreFoundation 0x0000000185f37854 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
11 CoreFoundation 0x0000000185f34adc __CFRunLoopDoObservers + 368
12 CoreFoundation 0x0000000185e75df4 CFRunLoopRunSpecific + 488
13 GraphicsServices 0x000000018bb5dc08 GSEventRunModal + 164
14 UIKit 0x0000000188fa6fc0 UIApplicationMain + 1152
15 App 0x00000001000c8808 main (main.m:16)
16 libdyld.dylib 0x0000000192a73a9c start + 0
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x0000000192b55aa8 kevent64 + 8
1 libdispatch.dylib 0x0000000192a59998 _dispatch_mgr_thread + 48
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x0000000192b55ca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185f36d20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185f34eb0 __CFRunLoopRun + 832
3 CoreFoundation 0x0000000185e75dcc CFRunLoopRunSpecific + 448
4 Foundation 0x0000000186a6a424 +[NSURLConnection(Loader) _resourceLoadLoop:] + 344
5 Foundation 0x0000000186af8408 __NSThread__main__ + 996
6 libsystem_pthread.dylib 0x0000000192befe18 _pthread_body + 164
7 libsystem_pthread.dylib 0x0000000192befd70 _pthread_start + 13
I have only a little knowledge on how to read the crash reason in device logs. Please give me some clue on where should I start to look at in my app. It crashed the minute I clicked on a button when I open the app. I only got this error when I unplugged the device. I cannot reproduce the device if I try to build with my phone via Xcode.
Thank you.
OS Version: iOS 7.0.5 (11B601)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x3a45bb66 objc_msgSend + 6
1 CoreFoundation 0x3003ec4a -[__NSDictionaryM setObject:forKey:] + 178
2 UIKit 0x32b157a4 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:truncationRect:] + 456
3 UIKit 0x32b155c8 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:] + 72
4 UIKit 0x32b15512 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:] + 70
5 UIKit 0x32b14f9e -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:] + 54
6 ST iPhone Standalone AppStore 0x001fc4a4 -[ArticleTableViewCell_CG drawContentView:] (ArticleTableViewCell_CG.m:178)
7 ST iPhone Standalone AppStore 0x001f9a7c -[ABTableViewCellView drawRect:] (ABTableViewCell.m:43)
8 UIKit 0x32907dd4 -[UIView(CALayerDelegate) drawLayer:inContext:] + 368
9 QuartzCore 0x3253da74 -[CALayer drawInContext:] + 96
10 QuartzCore 0x32527240 CABackingStoreUpdate_ + 1856
11 QuartzCore 0x326012e8 ___ZN2CA5Layer8display_Ev_block_invoke + 48
12 QuartzCore 0x32526af0 x_blame_allocations + 80
13 QuartzCore 0x325267a2 CA::Layer::display_() + 1114
14 QuartzCore 0x3250a364 CA::Layer::display_if_needed(CA::Transaction*) + 204
15 QuartzCore 0x32509ffc CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 20
16 QuartzCore 0x32509a08 CA::Context::commit_transaction(CA::Transaction*) + 224
17 QuartzCore 0x3250981a CA::Transaction::commit() + 310
18 QuartzCore 0x32503548 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 52
19 CoreFoundation 0x300cef66 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
20 CoreFoundation 0x300cc8f2 __CFRunLoopDoObservers + 282
21 CoreFoundation 0x300ccc3e __CFRunLoopRun + 734
22 CoreFoundation 0x3003746c CFRunLoopRunSpecific + 520
23 CoreFoundation 0x3003724e CFRunLoopRunInMode + 102
24 GraphicsServices 0x34d712e6 GSEventRunModal + 134
25 UIKit 0x328ec840 UIApplicationMain + 1132
26 ST iPhone Standalone AppStore 0x000597cc main (main.m:14)
27 ST iPhone Standalone AppStore 0x00059764 start + 36
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x3a9fd838 kevent64 + 24
1 libdispatch.dylib 0x3a94c0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a94661e _dispatch_mgr_thread + 34
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,