Crash at [ALAssetRepresentation metadata] - ios

My app uses ALAssetsLibrary to get all photos from the user's device and upload them to our cloud server. I notice that from time to time users get a crash at [ALAssetRepresentation metadata] (see crash log below). I cannot get the same problem at my device with any photos. Is it a problem with a system photo library? How can I prevent this crashing?
Thank you
Date/Time: 2014-08-16 10:15:39.865 +0300
OS Version: iOS 7.1.1 (11D201)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
Triggered by Thread: 9
....
Thread 9 Crashed:
0 CoreFoundation 0x2eeda5c2 CFDataGetBytePtr + 6
1 PhotoLibraryServices 0x358d7128 __46-[PLManagedAsset adjustmentsXMPRepresentation]_block_invoke + 224
2 CoreData 0x2ed839ca developerSubmittedBlockToNSManagedObjectContextPerform + 86
3 CoreData 0x2ed83b0e -[NSManagedObjectContext performBlockAndWait:] + 110
4 PhotoLibraryServices 0x358d6fda -[PLManagedAsset adjustmentsXMPRepresentation] + 222
5 AssetsLibrary 0x2e6f9498 __33-[ALAssetRepresentation metadata]_block_invoke + 20
6 AssetsLibrary 0x2e700862 __53-[ALAssetRepresentationPrivate _performBlockAndWait:]_block_invoke + 66
7 CoreData 0x2ed839ca developerSubmittedBlockToNSManagedObjectContextPerform + 86
8 libdispatch.dylib 0x39c2bd3c _dispatch_client_callout + 20
9 libdispatch.dylib 0x39c306be _dispatch_barrier_sync_f_invoke + 22
10 CoreData 0x2ed83b06 -[NSManagedObjectContext performBlockAndWait:] + 102
11 AssetsLibrary 0x2e6fc36a -[ALAssetsLibrary _performBlockAndWait:] + 130
12 AssetsLibrary 0x2e700624 -[ALAssetRepresentationPrivate _performBlockAndWait:] + 172
13 AssetsLibrary 0x2e6f93ec -[ALAssetRepresentation metadata] + 460
....
17 AssetsLibrary 0x2e6fe70c __56-[ALAssetsLibrary assetForURL:resultBlock:failureBlock:]_block_invoke_2 + 248
18 libdispatch.dylib 0x39c2bd50 _dispatch_call_block_and_release + 8
19 libdispatch.dylib 0x39c31684 _dispatch_root_queue_drain + 224
20 libdispatch.dylib 0x39c318d8 _dispatch_worker_thread2 + 52
21 libsystem_pthread.dylib 0x39d5cc14 _pthread_wqthread + 296
22 libsystem_pthread.dylib 0x39d5cad8 start_wqthread + 4

Related

FIRCLSReportManager error on Firebase iOS SDK

I'm getting this error everytime my app starts :
Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation]
PID: 5264, TID: 1948690, Thread name: (none), Queue name: NSOperationQueue 0x107c31d80 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4 app 0x0000000104debcf4 -[FIRCLSReportManager captureInitialNotificationStates] + 144
5 app 0x0000000104deba88 -[FIRCLSReportManager setupStateNotifications] + 44
6 app 0x0000000104de9478 -[FIRCLSReportManager startCrashReporterWithProfilingMark:report:] + 256
7 app 0x0000000104de8210 -[FIRCLSReportManager startWithProfilingMark:] + 1188
8 app 0x0000000104e01be4 -[FIRCrashlytics initWithApp:appInfo:installations:analytics:] + 1448
9 app 0x0000000104e022e8 __38+[FIRCrashlytics componentsToRegister]_block_invoke + 532
10 app 0x0000000104daf8bc -[FIRComponentContainer instantiateInstanceForProtocol:withBlock:] + 132
11 app 0x0000000104dafb60 -[FIRComponentContainer instanceForProtocol:] + 344
12 app 0x0000000104db0234 +[FIRComponentType instanceForProtocol:inContainer:] + 104
13 app 0x0000000104e023d8 +[FIRCrashlytics crashlytics] + 136
14 app 0x0000000104923488 -[CrashReportingManager logWithFormat:arguments:] + 136
15 app 0x00000001049233e8 -[CrashReportingManager logWithFormat:] + 84
16 app 0x00000001049d6e4c __49-[AccountManager clearTempDataStorageCompletion:]_block_invoke + 636
17 Foundation 0x00000001b04a33a0 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1131424
18 Foundation 0x00000001b03ad0c8 7B1733B1-74C9-3A33-8A58-853B0A029826 + 123080
19 Foundation 0x00000001b04a5628 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1140264
20 Foundation 0x00000001b03acd60 7B1733B1-74C9-3A33-8A58-853B0A029826 + 122208
21 Foundation 0x00000001b04a6020 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1142816
22 Foundation 0x00000001b04a5aec 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1141484
23 libdispatch.dylib 0x0000000107a8d268 _dispatch_block_async_invoke2 + 104
24 libdispatch.dylib 0x0000000107a7ebd8 _dispatch_client_callout + 16
25 libdispatch.dylib 0x0000000107a817dc _dispatch_continuation_pop + 524
26 libdispatch.dylib 0x0000000107a80c5c _dispatch_async_redirect_invoke + 624
27 libdispatch.dylib 0x0000000107a90160 _dispatch_root_queue_drain + 376
28 libdispatch.dylib 0x0000000107a90a88 _dispatch_worker_thread2 + 156
29 libsystem_pthread.dylib 0x00000001afdfab48 _pthread_wqthread + 212
30 libsystem_pthread.dylib 0x00000001afdfd760 start_wqthread + 8
It seems Firebase is calling statusBarOrientation on a background thread ?
Is anyone else getting this or knows how to fix this ?
You are trying to access +[FIRCrashlytics crashlytics] on a non-main thread.

Coredata _clearRawPropertiesWithHint crash ios9

I have been stuck with this crash for few days and seem to be going nowhere.
Crashed: NSManagedObjectContext 0x14f016920
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000010
Thread : Crashed: NSManagedObjectContext 0x14f016920
0 libobjc.A.dylib 0x000000019953dbd0 objc_msgSend + 16
1 CoreFoundation 0x0000000184969c84 __CFBasicHashDrain + 276
2 CoreFoundation 0x0000000184814da4 CFRelease + 256
3 CoreData 0x0000000184632cf0 -[_NSFaultingMutableSet dealloc] + 68
4 CoreData 0x00000001845f8d3c -[_CDSnapshot dealloc] + 84
5 CoreData 0x00000001846068e0 -[NSManagedObject(_NSInternalMethods) _clearRawPropertiesWithHint:] + 388
6 CoreData 0x00000001846066bc -[NSFaultHandler turnObject:intoFaultWithContext:] + 448
7 CoreData 0x0000000184603e10 -[NSManagedObject dealloc] + 104
8 CoreData 0x0000000184603428 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 1076
9 CoreData 0x0000000184681678 __89-[NSManagedObjectContext(_NSInternalNotificationHandling) _registerAyncReferenceCallback]_block_invoke + 104
10 CoreData 0x000000018467bc20 developerSubmittedBlockToNSManagedObjectContextPerform + 196
11 libdispatch.dylib 0x0000000199d25770 _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000199d3175c _dispatch_queue_drain + 864
13 libdispatch.dylib 0x0000000199d29274 _dispatch_queue_invoke + 464
14 libdispatch.dylib 0x0000000199d25770 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000199d33bb0 _dispatch_root_queue_drain + 2140
16 libdispatch.dylib 0x0000000199d3334c _dispatch_worker_thread3 + 112
17 libsystem_pthread.dylib 0x0000000199f39478 _pthread_wqthread + 1092
Any pointers on how I can debug this crash? The same didn't crash in iOS 8. Could it be a iOS 9 crash and hopefully it will be fixed in the subsequent iOS versions?
Any help would be much appreciated.

bug: ios app on ipad and ios8 & ios9 quits when loading googleMapsM4B (v. 1.10-2.2)

Issue has been reported only for iPads. The stacktrace shows:
Hardware Model: iPad4,1
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
OS Version: iOS 9.0 (13A344)
Report Version: 105
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Exception Note: SIMULATED (this is NOT a crash)
Highlighted by Thread: 3
Application Specific Information:
com.Tappsi.tappsiuser failed to scene-create after 19.55s (launch took 0.45s of total time limit 20.00s)
Elapsed total CPU time (seconds): 22.530 (user 22.530, system 0.000), 56% CPU
Elapsed application CPU time (seconds): 18.920, 47% CPU
Filtered syslog:
None found
Thread 3 name: Dispatch queue: com.apple.CoreLocation.ConnectionClient.0x14f16ec10.events
Thread 3:
0 libsystem_kernel.dylib 0x000000019aab8c84 semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x000000019a996630 _dispatch_semaphore_wait_slow + 160
2 CoreLocation 0x0000000186046dc8 0x186044000 + 11720
3 CoreLocation 0x000000018604b83c 0x186044000 + 30780
4 CoreLocation 0x0000000186085f38 0x186044000 + 270136
5 CoreLocation 0x0000000186083b8c 0x186044000 + 261004
6 CoreLocation 0x0000000186083ac0 0x186044000 + 260800
7 CoreLocation 0x0000000186084d0c 0x186044000 + 265484
8 libxpc.dylib 0x000000019abcd30c _xpc_connection_call_event_handler + 68
9 libxpc.dylib 0x000000019abcb0b4 _xpc_connection_mach_event + 2132
10 libdispatch.dylib 0x000000019a98586c _dispatch_client_callout4 + 16
11 libdispatch.dylib 0x000000019a989b58 _dispatch_mach_msg_invoke + 656
12 libdispatch.dylib 0x000000019a991930 _dispatch_queue_drain + 1332
13 libdispatch.dylib 0x000000019a988c6c _dispatch_mach_invoke + 600
14 libdispatch.dylib 0x000000019a991930 _dispatch_queue_drain + 1332
15 libdispatch.dylib 0x000000019a989274 _dispatch_queue_invoke + 464
16 libdispatch.dylib 0x000000019a991930 _dispatch_queue_drain + 1332
17 libdispatch.dylib 0x000000019a989274 _dispatch_queue_invoke + 464
18 libdispatch.dylib 0x000000019a985770 _dispatch_client_callout + 16
19 libdispatch.dylib 0x000000019a993bb0 _dispatch_root_queue_drain + 2140
20 libdispatch.dylib 0x000000019a99334c _dispatch_worker_thread3 + 112
21 libsystem_pthread.dylib 0x000000019ab99478 _pthread_wqthread + 1092
22 libsystem_pthread.dylib 0x000000019ab99028 start_wqthread + 4
Thread 10 name: com.google.Maps.LabelingBehavior
Thread 10:
0 libsystem_kernel.dylib 0x000000019aab8c30 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000019aab8aac mach_msg + 72
2 CoreFoundation 0x0000000185878168 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000185875e6c __CFRunLoopRun + 1032
4 CoreFoundation 0x00000001857a4dc0 CFRunLoopRunSpecific + 384
5 Foundation 0x00000001867187ec -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
6 Tappsi 0x0000000100577af8 -[GMSx_GTMSimpleWorkerThread main] + 604
7 Foundation 0x00000001867ff138 __NSThread__start__ + 1000
8 libsystem_pthread.dylib 0x000000019ab9bb3c _pthread_body + 156
9 libsystem_pthread.dylib 0x000000019ab9baa0 _pthread_body + 0
10 libsystem_pthread.dylib 0x000000019ab99030 thread_start + 4
And seems to be a problem similar to:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=6484
Although it happens always when loading the viewController that implements GMSMapViewDelegate. Hangs between the ViewWillAppear method and the ViewDidAppear method.
Why does it work on iPhone but not on iPad?

Core Location crashes in iOS extension

I'm getting many crash reports from my iOS today extension in Crashlytics which I can't make any sense of. The extension retrieves the user's current location and saves it inside the app. The crashes look like this:
Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x174132fc0.events
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000f2cdbeb8
0 libobjc.A.dylib 0x0000000194d7fbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001834823f8 CFDictionaryApplyFunction + 236
2 CoreLocation 0x0000000183d1c09c (null) + 54344
3 CoreLocation 0x0000000183d1adf0 (null) + 49564
4 libxpc.dylib 0x00000001955c4ccc _xpc_connection_call_event_handler + 68
5 libxpc.dylib 0x00000001955c8a18 do_mach_notify_port_destroyed + 124
6 libxpc.dylib 0x00000001955c8970 _Xmach_notify_port_destroyed + 96
Here is another one:
Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x1743221c0.events
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000008
0 CoreFoundation 0x0000000186678640 CFBasicHashGetBucket + 28
1 CoreFoundation 0x00000001866785c4 CFBasicHashApply + 100
2 CoreFoundation 0x00000001866785c4 CFBasicHashApply + 100
3 CoreFoundation 0x00000001866823d8 CFDictionaryApplyFunction + 204
4 CoreLocation 0x0000000186f1c09c (null) + 54344
5 CoreLocation 0x0000000186f1adf0 (null) + 49564
6 libxpc.dylib 0x0000000198814ccc _xpc_connection_call_event_handler + 68
7 libxpc.dylib 0x0000000198818a18 do_mach_notify_port_destroyed + 124
8 libxpc.dylib 0x0000000198818970 _Xmach_notify_port_destroyed + 96
9 libxpc.dylib 0x00000001988188e4 notify_server + 100
10 libxpc.dylib 0x0000000198812a98 _xpc_connection_mach_event + 1848
11 libdispatch.dylib 0x000000019860da28 _dispatch_client_callout4 + 16
12 libdispatch.dylib 0x0000000198611140 _dispatch_mach_msg_invoke + 492
13 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
14 libdispatch.dylib 0x0000000198610668 _dispatch_mach_invoke + 136
15 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
16 libdispatch.dylib 0x0000000198610a5c _dispatch_queue_invoke + 132
17 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
18 libdispatch.dylib 0x0000000198610a5c _dispatch_queue_invoke + 132
19 libdispatch.dylib 0x000000019861a318 _dispatch_root_queue_drain + 720
20 libdispatch.dylib 0x000000019861bc4c _dispatch_worker_thread3 + 108
21 libsystem_pthread.dylib 0x00000001987ed22c _pthread_wqthread + 816
As you can see none of my own classes is visible in the stack trace.
How can I debug this? Do these crashes appear to the user?
Thanks for your help!

iOS crash in CoreLocation

I'm seeing this crash my iOS app after it's been running for 10 minutes:
Date/Time: 2012-02-22 15:26:41.415 -0800
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x49980286
Crashed Thread: 6
The offending thread:
Thread 6 name: Dispatch queue: com.apple.locationd.registration.xpcq
Thread 6 Crashed:
0 libstdc++.6.dylib 0x33ed32f8 std::string::compare(std::string const&) const + 8
1 CoreLocation 0x3095ad54 std::_Rb_tree<std::string, std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)>, std::_Select1st<std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)> >, std::less<std::string>, std::allocator<std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)> > >::find(std::string const&) + 32
2 CoreLocation 0x30959964 CLConnection::handleMessage(CLConnectionMessage*) + 16
3 CoreLocation 0x3095a78c __setEventHandler_block_invoke_0 + 360
4 libxpc.dylib 0x37a428c2 __XPC_CONNECTION_EVENT_HANDLER_CALLOUT__ + 30
5 libxpc.dylib 0x37a3bd5c _xpc_connection_recv_message + 500
6 libxpc.dylib 0x37a3bb18 _xpc_connection_wakeup_recv + 160
7 libxpc.dylib 0x37a3b9b8 _xpc_connection_wakeup2 + 1264
8 libxpc.dylib 0x37a3b3f6 _xpc_connection_wakeup + 62
9 libdispatch.dylib 0x36d7821e _dispatch_source_invoke + 510
10 libdispatch.dylib 0x36d75b70 _dispatch_queue_invoke$VARIANT$up + 40
11 libdispatch.dylib 0x36d75caa _dispatch_queue_drain + 202
12 libdispatch.dylib 0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
13 libdispatch.dylib 0x36d75caa _dispatch_queue_drain + 202
14 libdispatch.dylib 0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
15 libdispatch.dylib 0x36d75caa _dispatch_queue_drain + 202
16 libdispatch.dylib 0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
17 libdispatch.dylib 0x36d7676c _dispatch_worker_thread2 + 208
18 libsystem_c.dylib 0x32ee21c8 _pthread_wqthread + 288
19 libsystem_c.dylib 0x32ee209c start_wqthread + 0
The console doesn't give me any messages except to say that I have a crash. Any thoughts?
So after lots of digging I was able to repro the issue and find what was causing it. This seems to occur if you call -[CLLocationManager startUpdatingLocation] and -[CLLocationManager stopUpdatingLocation] in a tight loop.
I was having this trouble as well, but only on iOS 5.x (testing in Simulator, don't have the device.) It seemed to occur when I had more than one location manager instance, and both had the delegate set.

Resources