Closed mightyleader closed 9 years ago
@mightyleader could you share the entire stack trace that led to that exception? Even better, do you have a project on hand that consistently causes the issue that we could take a look at? Thanks!
Hi, I've attached the crash log output. I've not been able to find reproducible steps for it, as it turns up in our crash reporting intermittently (aside from knowing it's to do with Realm). It's in our app Gift Finder which is on the app store here: https://itunes.apple.com/gb/app/id571641021?mt=8
Incident Identifier: D38D8CFC-6585-4A67-8943-E3DA523FCD0B CrashReporter Key: EB6EB968-FFA7-4698-84B3-6012C705D47F Hardware Model: iPhone6,2 Process: noths [1616] Path: /private/var/mobile/Containers/Bundle/Application/C2614845-FAC4-4FAB-B036-A1D33108660C/noths.app/noths Identifier: com.notonthehighstreet.giftfinder Version: 2.1.3 Code Type: ARM-64 Parent Process: launchd [1]
Date/Time: 2015-04-13T18:29:03Z OS Version: iPhone OS 8.3 (12F70) Report Version: 104
Exception Type: SIGABRT Exception Codes: #0 at 0x198353270 Crashed Thread: 11
Application Specific Information: *\ Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber UTF8String]: unrecognized selector sent to instance 0xb000000000000053'
Last Exception Backtrace: 0 CoreFoundation 0x00000001863e82d8 exceptionPreprocess + 132 1 libobjc.A.dylib 0x0000000197bbc0e4 objc_exception_throw + 56 2 CoreFoundation 0x00000001863ef3a4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 216 3 CoreFoundation 0x00000001863ec154 __forwarding + 924 4 CoreFoundation 0x00000001862eeccc _CF_forwarding_prep0 + 88 5 noths 0x000000010012c5a8 RLMSetValue(RLMObjectBase, unsigned long, NSString_) (RLMUtil.hpp:114) 6 noths 0x000000010012b8b8 RLMDynamicSet (RLMAccessor.mm:654) 7 noths 0x000000010013f074 RLMAddObjectToRealm (RLMObjectStore.mm:392) 8 noths 0x0000000100161ed4 -RLMRealm addObject: 9 noths 0x0000000100101124 -NOTCalendarPersistentStore persistEvents: 10 libdispatch.dylib 0x000000019820d994 _dispatch_call_block_and_release + 20 11 libdispatch.dylib 0x000000019820d954 _dispatch_client_callout + 12 12 libdispatch.dylib 0x00000001982180a4 _dispatch_queue_drain + 1444 13 libdispatch.dylib 0x0000000198210a5c _dispatch_queue_invoke + 128 14 libdispatch.dylib 0x000000019821a318 _dispatch_root_queue_drain + 716 15 libdispatch.dylib 0x000000019821bc4c _dispatch_worker_thread3 + 104 16 libsystem_pthread.dylib 0x00000001983ed22c _pthread_wqthread + 812 17 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 0: 0 libsystem_kernel.dylib 0x0000000198338e48 semaphore_wait_trap + 8 1 libxpc.dylib 0x000000019841633c xpc_connection_send_message_with_reply_sync + 184 2 Security 0x000000018ab90340 securityd_message_with_reply_sync + 88 3 Security 0x000000018ab90584 securityd_send_sync_and_do + 76 4 Security 0x000000018aba1c38 SecItemCopyMatching_block_invoke + 216 5 Security 0x000000018aba0b48 SecOSStatusWith + 28 6 Security 0x000000018aba1afc SecItemCopyMatching + 240 7 noths 0x00000001002f2950 -FBKeychainStore dataForKey: 8 noths 0x00000001002f25d4 -FBKeychainStore dictionaryForKey: 9 noths 0x0000000100317e0c -FBSessionTokenCachingStrategy fetchTokenInformation 10 noths 0x0000000100317f50 -FBSessionTokenCachingStrategy fetchFBAccessTokenData 11 noths 0x00000001003243a4 -FBSession initWithAppID:permissions:defaultAudience:urlSchemeSuffix:tokenCacheStrategy: 12 noths 0x0000000100325664 +FBSession activeSession 13 noths 0x000000010033793c -FBAppEvents sessionToSendRequestTo: 14 noths 0x000000010033686c -FBAppEvents instanceLogEvent:valueToSum:parameters:isImplicitlyLogged:session: 15 noths 0x00000001002fc218 -FBTimeSpentData instanceRestore: 16 noths 0x0000000100025bd0 60-[NOTAppDelegate application:didFinishLaunchingWithOptions:]_block_invoke (NOTAppDelegate.m:42) 17 noths 0x000000010003eff4 -NOTRootViewController initialSetup 18 noths 0x000000010003efb0 -NOTRootViewController viewDidLoad 19 UIKit 0x000000018ae28c84 -[UIViewController loadViewIfRequired] + 688 20 UIKit 0x000000018ae28994 -[UIViewController view] + 28 21 UIKit 0x000000018ae2f1d0 -[UIWindow addRootViewControllerViewIfPossible] + 68 22 UIKit 0x000000018ae2c880 -[UIWindow _setHidden:forced:] + 256 23 UIKit 0x000000018ae9e8ec -[UIWindow makeKeyAndVisible] + 52 24 noths 0x0000000100025ac4 -NOTAppDelegate application:didFinishLaunchingWithOptions: 25 UIKit 0x000000018ae9b190 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400 26 UIKit 0x000000018b0b2854 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2372 27 UIKit 0x000000018b0b5208 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1500 28 UIKit 0x000000018b0b3778 -[UIApplication workspaceDidEndTransaction:] + 180 29 FrontBoardServices 0x000000018ebf93c8 31-[FBSSerialQueue performAsync:]_block_invoke_2 + 28 30 CoreFoundation 0x00000001863a027c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 16 31 CoreFoundation 0x000000018639f384 CFRunLoopDoBlocks + 308 32 CoreFoundation 0x000000018639d9a8 CFRunLoopRun + 1752 33 CoreFoundation 0x00000001862c92d4 CFRunLoopRunSpecific + 392 34 UIKit 0x000000018ae9443c -[UIApplication _run] + 548 35 UIKit 0x000000018ae8efac UIApplicationMain + 1484 36 noths 0x00000001000cd790 main (main.m:16) 37 libdyld.dylib 0x000000019823aa08 start + 0
Thread 1: 0 libsystem_kernel.dylib 0x0000000198338c24 kevent64 + 8 1 libdispatch.dylib 0x000000019820f99c _dispatch_mgr_thread + 48
Thread 2: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 3: 0 libsystem_kernel.dylib 0x0000000198338e48 semaphore_wait_trap + 8 1 FrontBoardServices 0x000000018ebf9388 __31-[FBSSerialQueue performAsync:]_block_invoke + 152 2 libdispatch.dylib 0x000000019820d994 _dispatch_call_block_and_release + 20 3 libdispatch.dylib 0x000000019820d954 _dispatch_client_callout + 12 4 libdispatch.dylib 0x00000001982180a4 _dispatch_queue_drain + 1444 5 libdispatch.dylib 0x0000000198210a5c _dispatch_queue_invoke + 128 6 libdispatch.dylib 0x000000019821a318 _dispatch_root_queue_drain + 716 7 libdispatch.dylib 0x000000019821bc4c _dispatch_worker_thread3 + 104 8 libsystem_pthread.dylib 0x00000001983ed22c _pthread_wqthread + 812 9 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 4: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 5: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 6: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 7: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 8: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 9: 0 libsystem_kernel.dylib 0x0000000198352844 guarded_open_dprotected_np + 8 1 libsqlite3.dylib 0x0000000197fb60d4 sqlite3_intarray_bind + 316864 2 libsqlite3.dylib 0x0000000197fb5f3c sqlite3_intarray_bind + 316456 3 libsqlite3.dylib 0x0000000197ef00bc sqlite3_snprintf + 7852 4 libsqlite3.dylib 0x0000000197f42044 sqlite3_free_table + 29744 5 libsqlite3.dylib 0x0000000197f3ae00 sqlite3_free_table + 492 6 libsqlite3.dylib 0x0000000197f0ac00 sqlite3_finalize + 8116 7 libsqlite3.dylib 0x0000000197f24dc0 sqlite3_step + 7268 8 libsqlite3.dylib 0x0000000197f23368 sqlite3_step + 524 9 CoreData 0x00000001860887e8 _execute + 120 10 CoreData 0x0000000186088420 -[NSSQLiteConnection execute] + 2108 11 CoreData 0x000000018616e29c -[NSSQLConnection prepareAndExecuteSQLStatement:] + 56 12 CoreData 0x000000018618f698 -[NSSQLiteConnection _configureAutoVacuum] + 332 13 CoreData 0x000000018616ef5c -[NSSQLConnection createSchema] + 160 14 CoreData 0x0000000186084a64 -[NSSQLiteConnection connect] + 2144 15 CoreData 0x0000000186083a24 -[NSSQLCore _loadAndSetMetadata] + 144 16 CoreData 0x0000000186083808 -[NSSQLCore loadMetadata:] + 96 17 CoreData 0x0000000186157534 __91-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]_block_invoke + 1132 18 CoreData 0x0000000186164028 gutsOfBlockToNSPersistentStoreCoordinatorPerform + 180 19 libdispatch.dylib 0x000000019820d954 _dispatch_client_callout + 12 20 libdispatch.dylib 0x00000001982171e4 _dispatch_barrier_sync_f_invoke + 72 21 CoreData 0x0000000186155e98 _perform + 176 22 CoreData 0x00000001860796e8 -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:] + 220 23 noths 0x000000010024b440 -[GAIDataStore coordinatorWithModel:URL:] + 172 24 noths 0x000000010024b738 -[GAIDataStore contextWithModel:URL:] + 64 25 noths 0x000000010024db80 -[GAIDataStore setUpCoreData] + 312 26 Foundation 0x00000001872e9f9c NSThreadPerformPerform + 368 27 CoreFoundation 0x00000001863a0240 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 20 28 CoreFoundation 0x000000018639f4e4 CFRunLoopDoSources0 + 260 29 CoreFoundation 0x000000018639d594 CFRunLoopRun + 708 30 CoreFoundation 0x00000001862c92d4 CFRunLoopRunSpecific + 392 31 Foundation 0x00000001872014c8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 312 32 Foundation 0x000000018725b810 -[NSRunLoop(NSRunLoop) run] + 92 33 noths 0x0000000100248ba8 +[GAI threadMain:] + 68 34 Foundation 0x00000001872e9db8 NSThread__main + 1068 35 libsystem_pthread.dylib 0x00000001983efdc8 _pthread_body + 160 36 libsystem_pthread.dylib 0x00000001983efd24 _pthread_start + 156 37 libsystem_pthread.dylib 0x00000001983ecef8 thread_start + 0
Thread 10: 0 libsystem_kernel.dylib 0x0000000198353c78 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 11 Crashed: 0 libsystem_kernel.dylib 0x0000000198353270 *pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001983f1170 pthread_kill + 108 2 libsystem_c.dylib 0x00000001982cab18 abort + 108 3 noths 0x0000000100388d6c uncaught_exception_handler + 32 4 CoreFoundation 0x00000001863e8698 handleUncaughtException + 688 5 libobjc.A.dylib 0x0000000197bbc3b4 _objc_terminate() + 112 6 libc++abi.dylib 0x00000001973b9bb4 std::terminate(void ()()) + 12 7 libc++abi.dylib 0x00000001973b9478 cxa_throw + 132 8 libobjc.A.dylib 0x0000000197bbc204 objc_exceptionthrow + 344 9 CoreFoundation 0x00000001863ef3a4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 216 10 CoreFoundation 0x00000001863ec154 forwarding_** + 924 11 CoreFoundation 0x00000001862eeccc _CF_forwarding_prep0 + 88 12 noths 0x000000010012c5a8 RLMSetValue(RLMObjectBase, unsigned long, NSString_) (RLMUtil.hpp:114) 13 noths 0x000000010012b8b8 RLMDynamicSet (RLMAccessor.mm:654) 14 noths 0x000000010013f074 RLMAddObjectToRealm (RLMObjectStore.mm:392) 15 noths 0x0000000100161ed4 -RLMRealm addObject: 16 noths 0x0000000100101124 -NOTCalendarPersistentStore persistEvents: 17 libdispatch.dylib 0x000000019820d994 _dispatch_call_block_and_release + 20 18 libdispatch.dylib 0x000000019820d954 _dispatch_client_callout + 12 19 libdispatch.dylib 0x00000001982180a4 _dispatch_queue_drain + 1444 20 libdispatch.dylib 0x0000000198210a5c _dispatch_queue_invoke + 128 21 libdispatch.dylib 0x000000019821a318 _dispatch_root_queue_drain + 716 22 libdispatch.dylib 0x000000019821bc4c _dispatch_worker_thread3 + 104 23 libsystem_pthread.dylib 0x00000001983ed22c _pthread_wqthread + 812 24 libsystem_pthread.dylib 0x00000001983ecef0 start_wqthread + 0
Thread 12: 0 libsystem_kernel.dylib 0x0000000198338e0c mach_msg_trap + 8 1 CoreFoundation 0x000000018639f724 CFRunLoopServiceMachPort + 196 2 CoreFoundation 0x000000018639d678 __CFRunLoopRun + 936 3 CoreFoundation 0x00000001862c92d4 CFRunLoopRunSpecific + 392 4 CFNetwork 0x0000000185daa894 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436 5 Foundation 0x00000001872e9db8 NSThreadmain + 1068 6 libsystem_pthread.dylib 0x00000001983efdc8 _pthread_body + 160 7 libsystem_pthread.dylib 0x00000001983efd24 _pthread_start + 156 8 libsystem_pthread.dylib 0x00000001983ecef8 thread_start + 0
Thread 11 crashed with ARM-64 Thread State: pc: 0x0000000198353270 fp: 0x0000000102ce6620 sp: 0x0000000102ce6600 x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0xffffffffffffffff x4: 0x0000000000000010 x5: 0x0000000000000020 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x000000000c000000 x9: 0x0000000004000000 x10: 0x0000000000000000 x11: 0x0000000000000018 x12: 0x0000000000000001 x13: 0x0000000000062aa8 x14: 0x0000000000000015 x15: 0x0000000000000000 x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x0000000102ce8000 x21: 0x0000000198861720 x22: 0x000000014651ebf0 x23: 0x0000000198859f50 x24: 0x000000019c2010a8 x25: 0x00000001700db7b0 x26: 0x000000018b6227c3 x27: 0x000000018660283f x28: 0x0000000102ce66a4 lr: 0x00000001983f1170 cpsr: 0x0000000000000000
Link Register Analysis: Symbol: pthread_kill + 108 Description: We have determined that the link register (lr) is very likely to contain the return address of frame #0's calling function, and have inserted it into the crashing thread's backtrace as frame #1 to aid in analysis. This determination was made by applying a heuristic to determine whether the crashing function was likely to have created a new stack frame at the time of the crash. Type: 1
Binary Images:
0x100020000 - 0x100497fff noths arm64 <9f48de3c282631d3a262255b6bd21e67> /private/var/mobile/Containers/Bundle/Application/C2614845-FAC4-4FAB-B036-A1D33108660C/noths.app/noths
0x184b94000 - 0x184d28fff AVFoundation arm64
@mightyleader it looks like you're setting a string property on your realm model to an NSNumber object, which is causing it to call an unknown selector on the NSNumber (UTF8String
).
Maybe you're deserializing JSON containing a number which you're expecting to be a string into an NSDictionary?
@mightyleader were you ever able to confirm that you were indeed passing an NSNumber to an NSString property? We'll reopen if that's not the case.
Hey, We're pretty sure our own guard code round JSON would have caught it, and we'd have seen more instances of it if it was in our code base so it's still a mystery.
Rob
On 1 May 2015, at 21:07, JP Simard notifications@github.com wrote:
@mightyleader were you ever able to confirm that you were indeed passing an NSNumber to an NSString property? We'll reopen if that's not the case.
― Reply to this email directly or view it on GitHub.
We are getting a persistent but intermittent crash caused by the selector
UTF8String
to an NSNumber. Here's the report....RLMSetValue(RLMObjectBase*, unsigned long, NSString*)
, line 114*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber UTF8String]: unrecognized selector sent to instance 0xb000000000000053'
This is with the current shipping version 0.91, but has been happening on previous versions also.
Thanks!