Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
471 views
in Technique[技术] by (71.8m points)

iphone - App "failed to resume in time" and hangs

My app runs fine on my ipad but when I run it on my bosses ipad it hangs and stores the following device log, any ideas?

Incident Identifier: 6C33511B-7C9A-474C-B888-84A4FAFF6F91 CrashReporter Key: 93bbba4f690eb1b7638fa7a09a3ff3aa4e6872f4 Hardware Model: iPad2,1 Process: Designer [5279] Path:
/var/mobile/Applications/7AA5BF4A-007D-47F8-B1C5-30667477AA12/Designer.app/Designer Identifier: Designer Version: ??? (???) Code Type:
ARM (Native) Parent Process: launchd [1]

Date/Time: 2011-10-19 13:29:29.907 +0100 OS Version: iPhone OS 5.0 (9A334) Report Version: 104

Exception Type: 00000020 Exception Codes: 0x8badf00d Highlighted Thread: 0

Application Specific Information: Systems.Designer failed to resume in time

Elapsed total CPU time (seconds): 0.000 (user 0.000, system 0.000), 0% CPU Elapsed application CPU time (seconds): 0.002, 0% CPU

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0
libsystem_c.dylib 0x307d1a3c memset$VARIANT$CortexA9 + 100 1 libsqlite3.dylib 0x36cd3e7e 0x36cbf000 + 85630 2 libsqlite3.dylib 0x36cc73ec 0x36cbf000 + 33772 3
libsqlite3.dylib 0x36cc6c78 0x36cbf000 + 31864 4
libsqlite3.dylib 0x36cc64a8 0x36cbf000 + 29864 5
libsqlite3.dylib 0x36cc5f92 0x36cbf000 + 28562 6
libsqlite3.dylib 0x36cc5ce8 0x36cbf000 + 27880 7
libsqlite3.dylib 0x36cd29ea 0x36cbf000 + 80362 8
libsqlite3.dylib 0x36cc5962 sqlite3_exec + 678 9
libsqlite3.dylib 0x36cd273a 0x36cbf000 + 79674 10 libsqlite3.dylib 0x36cd228e 0x36cbf000 + 78478 11 libsqlite3.dylib 0x36cceebe 0x36cbf000 + 65214 12 libsqlite3.dylib 0x36ccb41a 0x36cbf000 + 50202 13 libsqlite3.dylib 0x36cc6c78 0x36cbf000 + 31864 14 libsqlite3.dylib 0x36cc6464 0x36cbf000 + 29796 15 libsqlite3.dylib 0x36cc5f92 0x36cbf000 + 28562 16 libsqlite3.dylib 0x36cc5ce8 0x36cbf000 + 27880 17 libsqlite3.dylib 0x36cfd094 sqlite3_prepare_v2 + 20 18 AppSupport 0x36efb8a4 CPSqlitePreparedStatement + 40 19 AppSupport 0x36efbbde CPSqliteConnectionStatementForSQLAndIgnoreErrors + 114 20 AppSupport 0x36efc64e CPSqliteConnectionPerformSQL + 6 21 AppSupport
0x36efca44 _createConnectionForWriting + 360 22 AppSupport
0x36efcc06 _connectAndCheckVersion + 18 23 AppSupport
0x36efd0b8 CPSqliteDatabaseConnectionForWriting + 36 24 AppSupport
0x36efd18e CPSqliteDatabaseRegisterFunction + 14 25 AddressBook
0x324db6dc ABCDBContextCreateWithPathAndAddressBook + 208 26 AddressBook 0x324cf6fa ABCCreateAddressBookWithDatabaseDirectoryAndForceInProcessMigrationInProcessLinkingAndResetSortKeys + 226 27 AddressBook 0x324ddf88 ABAddressBookCreate + 8 28 Designer 0x000e222c +[AddressBookModel createTableViewControllerItemFromABRecordID:] (AddressBookModel.m:15) 29 Designer 0x000e1ee0 -[CustomPersonPickerViewController getAllContacts] (CustomPersonPickerViewController.m:56) 30 Designer
0x000e1d9c -[CustomPersonPickerViewController initWithSelectedABRecordID:andSelectAnItemViewDelegate:] (CustomPersonPickerViewController.m:28) 31 Designer
0x000dce56 -[EditEntityViewController editAccountable:] (EditEntityViewController.m:96) 32 CoreFoundation
0x3522442e -[NSObject performSelector:withObject:withObject:] + 46 33 UIKit 0x375d19e4 -[UIApplication sendAction:to:from:forEvent:] + 56 34 UIKit
0x375d19a0 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24 35 UIKit 0x375d197e -[UIControl sendAction:to:forEvent:] + 38 36 UIKit
0x375d16ee -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486 37 UIKit 0x375d131a -[UIControl touchesBegan:withEvent:] + 238 38 UIKit
0x375d047e -[UIWindow _sendTouchesForEvent:] + 174 39 UIKit
0x375cfefa -[UIWindow sendEvent:] + 374 40 UIKit
0x375b64e6 -[UIApplication sendEvent:] + 350 41 UIKit
0x375b5d26 _UIApplicationHandleEvent + 5802 42 GraphicsServices
0x31d0be0c PurpleEventCallback + 876 43 CoreFoundation
0x3529e54c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 32 44 CoreFoundation 0x3529e4ee __CFRunLoopDoSource1 + 134 45 CoreFoundation 0x3529d33c __CFRunLoopRun + 1364 46 CoreFoundation
0x352204d6 CFRunLoopRunSpecific + 294 47 CoreFoundation
0x3522039e CFRunLoopRunInMode + 98 48 GraphicsServices
0x31d0afe6 GSEventRunModal + 150 49 UIKit
0x375e473c UIApplicationMain + 1084 50 Designer
0x000d4854 main (main.m:14) 51 Designer 0x000d480c 0xd3000 + 6156

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x303ff3b4 kevent + 24 1
libdispatch.dylib 0x35b5ef74 _dispatch_mgr_invoke + 708 2 libdispatch.dylib 0x35b5ec92 _dispatch_mgr_thread + 30

Thread 2 name: WebThread Thread 2: 0 libsystem_kernel.dylib
0x3040f0d8 psynch_mutexwait + 24 1 libsystem_c.dylib
0x3075ec44 pthread_mutex_lock + 376 2 WebCore
0x362f536c _ZL17_WebTryThreadLockb + 208 3 WebCore
0x362f5670 ZL14WebRunLoopLockP19_CFRunLoopObservermPv + 24 4
CoreFoundation 0x3529eb44 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
+ 12 5 CoreFoundation 0x3529cd80 __CFRunLoopDoObservers + 252 6 CoreFoundation 0x3529d19a __CFRunLoopRun + 946 7
CoreFoundation 0x352204d6 CFRunLoopRunSpecific + 294 8 CoreFoundation 0x3522039e CFRunLoopRunInMode + 98 9
WebCore 0x36397128 _ZL12RunWebThreadPv + 396 10 libsystem_c.dylib 0x3076bc16 _pthread_start + 314 11 libsystem_c.dylib 0x3076bad0 thread_start + 0

Unknown thread crashed with unknown flavor: 5, state_count: 1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Whenever you see a 0x8badf00d that means you are getting killed by the launch watchdog. Your app is taking too long to return from -applicationDidFinishLaunching.... Normal Core Data related causes to this are:

  1. Trying to import data in the -applicationDidFinishLaunching...
  2. Trying to perform a migration from -applicationDidFinishLaunching...

To solve this you need to change your start up. The creating of the Core Data stack should never be done in the -applicationDidFinishLaunching.... Instead let the -applicationDidFinishLaunching... finish and then stand up the Core Data stack. If a migration is needed (you can check this pretty easily) then present the user with a UI informing them of the delay and then kick it off.

In either case you need to return from the -applicationDidFinishLaunching... as fast as possible, you should only be creating UI elements in this method; you should not be accessing Core Data at this point.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...