Crash on create AVCaptureDeviceInput FromDevice - ios

Hi I am developing a xamarin app with usage of ZXing library for barcode recognition. I use AVCaptureScannerViewController with custom overlay. Everything worked fine until I started getting these errors on AVCaptureScannerView.StartScanning:
Starting to scan...
StartScanning
critical:
Native stacktrace:
critical: 0 0x00000001001569e4 mono_handle_native_sigsegv + 260
critical: 1 libsystem_platform.dylib 0x0000000182fef348 _sigtramp + 52
critical: 2 libsystem_kernel.dylib 0x0000000182f29480 <redacted> + 100
critical: 3 libsystem_kernel.dylib 0x0000000182f294c8 system_set_sfi_window + 0
critical: 4 TCC 0x000000018616a560 <redacted> + 0
critical: 5 TCC 0x000000018616a45c <redacted> + 0
critical: 6 TCC 0x000000018616d52c <redacted> + 288
critical: 7 libxpc.dylib 0x000000018303401c <redacted> + 80
critical: 8 libxpc.dylib 0x0000000183033f8c <redacted> + 40
critical: 9 libdispatch.dylib 0x0000000182de91c0 <redacted> + 16
critical: 10 libdispatch.dylib 0x0000000182df7ab4 <redacted> + 732
critical: 11 libdispatch.dylib 0x0000000182df938c <redacted> + 572
critical: 12 libdispatch.dylib 0x0000000182df90ec <redacted> + 124
critical: 13 libsystem_pthread.dylib 0x0000000182ff12c8 _pthread_wqthread + 1288
critical: 14 libsystem_pthread.dylib 0x0000000182ff0db4 start_wqthread + 4
critical:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
I have found that this happens on AVCaptureDeviceInput.FromDevice(captureDevice). Interesting part that I reverted every changes to previous working state, but the problem is still there.

Related

Crash :com.apple.network.connections EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036

Since the release of iOS16.1.0 and iOS16.1.1, I have received reports from iOS16.1.0 and iOS16.1.1 users about the crash problem. Later, I discovered that this problem occurred only iOS16.1.0 and later. This problem does not occur to all users ,I have tried several methods (such as using different versions of xcode build App), but still not solved...
Here are the crash track caught by firebase:
Crash :com.apple.network.connections EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036
Crashed: com.apple.network.connections
0 libxpc.dylib 0x16020 _xpc_dictionary_insert + 96
1 Network 0x908504 nw_path_snapshot_agents + 292
2 Network 0x907960 nw_path_snapshot_path + 192
3 Network 0x9257b8 nw_path_necp_update_evaluator + 756
4 Network 0x924aa4 nw_path_necp_check_for_updates + 1268
5 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20
6 libdispatch.dylib 0x746c _dispatch_continuation_pop + 504
7 libdispatch.dylib 0x1aa58 _dispatch_source_invoke + 1588
8 libdispatch.dylib 0xd4f8 _dispatch_workloop_invoke + 1780
9 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652
10 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288
11 libsystem_pthread.dylib 0xb98 start_wqthread + 8
com.apple.main-thread
0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388
3 libsystem_kernel.dylib 0x108c mach_msg + 24
4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232
6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612
7 GraphicsServices 0x1368 GSEventRunModal + 164
8 UIKitCore 0x3a23d0 -[UIApplication _run] + 888
9 UIKitCore 0x3a2034 UIApplicationMain + 340
10 xxxxxx 0x44ea24 main + 14 (main.m:14)
11 ??? 0x1d6e8c960 (缺少)
other thread ......

React Native / iOS TestFlight: instant crash on start

Thats my first app I'm trying to deploy. When I test it with TestFlight it crashed immediately. The app works fine for android and iOS on simulator. I also tested the release apk for android successfully.
Does someone understands what the following crash log means?
The App was built with React-Native.
Incident Identifier: 1144C002-DE4C-41AD-A6AF-8F7C8A760A7E
Beta Identifier: 839379BA-3B5B-4047-9CA8-A231CCD36128
Hardware Model: iPhone11,2
Process: bartenderrai [880]
Path: /private/var/containers/Bundle/Application/E1BE6D04-1553-4EB8-A171-67B6D1181D2A/bartenderrai.app/bartenderrai
Identifier: *****
Version: 1.2 (1.0)
AppStoreTools: 10B61
AppVariant: 1:iPhone11,2:12
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: ***** [689]
Date/Time: 2018-11-10 21:09:41.1513 +0100
Launch Time: 2018-11-10 21:09:40.8645 +0100
OS Version: iPhone OS 12.1 (16B92)
Baseband Version: 1.01.30
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 3
Last Exception Backtrace:
0 CoreFoundation 0x22f836f2c __exceptionPreprocess + 232 (NSException.m:172)
1 libobjc.A.dylib 0x22ea34284 objc_exception_throw + 60 (objc-exception.mm:557)
2 bartenderrai 0x102c8d40c RCTFatal + 448 (RCTAssert.m:132)
3 bartenderrai 0x102c8aed4 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 492 (RCTExceptionsManager.m:58)
4 CoreFoundation 0x22f83e8b4 __invoking___ + 148
5 CoreFoundation 0x22f717538 -[NSInvocation invoke] + 308 (NSForwarding.m:3052)
6 CoreFoundation 0x22f71816c -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3123)
7 bartenderrai 0x102ca17d0 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 492 (RCTModuleMethod.mm:544)
8 bartenderrai 0x102ce5c90 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 248 (RCTNativeModule.mm:99)
9 bartenderrai 0x102ce59f0 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:71)
10 libdispatch.dylib 0x22f23bd58 _dispatch_call_block_and_release + 32 (init.c:1372)
11 libdispatch.dylib 0x22f23d2f0 _dispatch_client_callout + 20 (object.m:511)
12 libdispatch.dylib 0x22f2446e0 _dispatch_lane_serial_drain + 552 (inline_internal.h:2441)
13 libdispatch.dylib 0x22f245228 _dispatch_lane_invoke + 368 (inline_internal.h:1808)
14 libdispatch.dylib 0x22f24d508 _dispatch_workloop_worker_thread + 588 (queue.c:5889)
15 libsystem_pthread.dylib 0x22f43cb20 _pthread_wqthread + 316 (pthread.c:2363)
16 libsystem_pthread.dylib 0x22f442dd4 start_wqthread + 4
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x000000022f3b8a68 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000022f3b7f24 mach_msg + 76 (mach_msg.c:103)
2 CoreFoundation 0x000000022f7c506c __CFRunLoopServiceMachPort + 240 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000022f7bfd08 __CFRunLoopRun + 1372 (CFRunLoop.c:2971)
4 CoreFoundation 0x000000022f7bf494 CFRunLoopRunSpecific + 452 (CFRunLoop.c:3247)
5 GraphicsServices 0x0000000231a72be8 GSEventRunModal + 104 (GSEvent.c:2245)
6 UIKitCore 0x000000025d3ce68c UIApplicationMain + 216 (UIApplication.m:4347)
7 bartenderrai 0x0000000102c321c8 main + 88 (main.m:14)
8 libdyld.dylib 0x000000022f275050 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x000000022f442dd0 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x000000022f442dd0 start_wqthread + 0
Thread 3 Crashed:
0 libsystem_kernel.dylib 0x000000022f3c40e4 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000022f43bb50 pthread_kill + 300 (pthread.c:1492)
2 libsystem_c.dylib 0x000000022f31bfcc abort + 144 (abort.c:94)
3 libc++abi.dylib 0x000000022ea1b818 abort_message + 136 (abort_message.cpp:75)
4 libc++abi.dylib 0x000000022ea1b9d8 default_terminate_handler() + 316 (cxa_default_handlers.cpp:68)
5 libobjc.A.dylib 0x000000022ea346c8 _objc_terminate() + 124 (objc-exception.mm:693)
6 libc++abi.dylib 0x000000022ea282d0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:66)
7 libc++abi.dylib 0x000000022ea28344 std::terminate() + 60 (cxa_handlers.cpp:97)
8 libdispatch.dylib 0x000000022f23d304 _dispatch_client_callout + 40 (object.m:514)
9 libdispatch.dylib 0x000000022f2446e0 _dispatch_lane_serial_drain + 552 (inline_internal.h:2441)
10 libdispatch.dylib 0x000000022f245228 _dispatch_lane_invoke + 368 (inline_internal.h:1808)
11 libdispatch.dylib 0x000000022f24d508 _dispatch_workloop_worker_thread + 588 (queue.c:5889)
12 libsystem_pthread.dylib 0x000000022f43cb20 _pthread_wqthread + 316 (pthread.c:2363)
13 libsystem_pthread.dylib 0x000000022f442dd4 start_wqthread + 4
Clean build your project and make sure to select Release in edit scheme menu, if you have not done that then I guess that is the problem
Clean your build folder and restart your Xcode. Also, make sure that you have generated your Provisioning profiles for Distribution and not iOS Development. The development will be for local builds and for Testflight you will need distribution profiles. You can create them here: https://developer.apple.com/account/resources/profiles/list and import them to your project. You can switch from Automatically Sign project to Manual signing and then select your correct provisioning profile.

why is xcode 7 not running an app on ios 9?

Lately installed Xcode 7 beta 4.
My app will not run on an iOS 9.0 device, although it will run on an iOS 9.0 simulator, and an iOS 8.4 device (using Xcode 7b4).
Xcode shows "Running %app_name on %device_name", the icon shows up on the device, but does not run, and that's how it stays.
Debug console shows nothing (checked the preferences, also, when using an iOS 8.4 device it shows output log as expected).
Another app that I created runs fine, it's just this app, on iOS9 device (Sim works smoothly).
No exception is thrown, no compilation error... nothing to go on.
Trying to start the app from the phone itself results in a request to send notifications (ok behaviour) and crashes...
Any ideas ?
EDIT:
In the device console output, I these two messages (not always):
Aug 4 11:39:53 iOS-9-test-device syslog_relay(liblockdown.dylib)[117]
: The connection is now invalid. Aug 4 11:39:53
iOS-9-test-device lockbot[79] : got an unknown event
And this is a crash report from the device itself :
Incident Identifier: C6A70E35-2ACD-4A17-959C-547DE3CC39F0 CrashReporter Key: 5c34ba5da623fd5860d5d4059ad9f46615e4e3f9 Hardware Model: iPhone5,1 Process: MyAppName [6737] Path: /var/mobile/Containers/Bundle/Application/099D6717-A7A5-45A5-96DE-92810AE0476A/MyAppName.app/MyAppName Identifier: com.MyOrgName.MyAppName Version: 7 (2.2.10) Code Type: ARM (Native) Parent Process: launchd [1]
Date/Time: 2015-08-04 11:47:38.38 +0300 Launch Time: 2015-08-04 11:47:23.23 +0300 OS Version: iOS 9.0 (13A4254v) Report Version: 105
Exception Type: 00000020 Exception Codes: 0x000000008badf00d Exception Note: SIMULATED (this is NOT a crash) Highlighted by Thread: 0
Application Specific Information: com.MyOrgName.MyAppName failed to scene-create after 14.65s (launch took 0.35s of total time limit
15.00s)
Elapsed total CPU time (seconds): 3.220 (user 3.220, system 0.000), 11% CPU Elapsed application CPU time (seconds): 0.779, 3% CPU
Filtered syslog: None found
Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x35a09b08 __psynch_mutexwait + 24 1 libsystem_pthread.dylib 0x35a9cad0 _pthread_mutex_lock + 412 2 libc++.1.dylib 0x349bfa60 std::__1::mutex::lock() + 4 3 VectorKit 0x323165be
-[VKTileSetBackedTileSource setStyleManager:] + 222 4 VectorKit 0x320db374 -[VKMapModel createSourceForLayer:tileSet:mode:] + 1260 5 VectorKit 0x320dab7c -[VKMapModel sourceForLayer:mode:] + 228 6 VectorKit 0x320da52a -[VKMapModel configureTileSources] + 402 7 VectorKit 0x32166234 -[VKMapModel forceMapType:animated:] + 5068 8 VectorKit 0x3216a64a -[VKMapModel initShouldRasterize:mapPurpose:tileGroupIdentifier:locale:contentScale:]
+ 3378 9 VectorKit 0x32157a74 -[VKMapCanvas initShouldRasterize:contentScale:target:device:inBackground:locale:] + 680 10 VectorKit 0x320cd1de -[VKMapView initWithGlobe:shouldRasterize:inBackground:] + 846 11 MapKit 0x24e5299a -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:]
+ 346 12 MapKit 0x24e821a0 -[MKMapView _commonInitFromIB:gestureRecognizerHostView:showsAttribution:] + 976 13 MapKit 0x24e82d28 -[MKMapView initWithCoder:] + 124 14 UIKit 0x27cecd14 UINibDecoderDecodeObjectForValue + 776 15 UIKit 0x27cec9fc -[UINibDecoder decodeObjectForKey:] + 292 16 UIKit 0x27bf794a -[UIRuntimeConnection initWithCoder:] + 110 17 UIKit 0x27cecd14 UINibDecoderDecodeObjectForValue + 776 18 UIKit 0x27cecca6 UINibDecoderDecodeObjectForValue + 666 19 UIKit 0x27cec9fc -[UINibDecoder decodeObjectForKey:] + 292 20 UIKit 0x27bf6ede -[UINib instantiateWithOwner:options:] + 1106 21 UIKit 0x27ad2396 -[UIViewController _loadViewFromNibNamed:bundle:] + 318 22 UIKit 0x278bd842 -[UIViewController loadView]
+ 138 23 UIKit 0x27785fb0 -[UIViewController loadViewIfRequired] + 132 24 UIKit 0x27842a92 -[UINavigationController _layoutViewController:] + 34 25 UIKit 0x27842992 -[UINavigationController
_updateScrollViewFromViewController:toViewController:] + 282 26 UIKit 0x27841d9c -[UINavigationController
_startTransition:fromViewController:toViewController:] + 80 27 UIKit 0x278419f2 -[UINavigationController
_startDeferredTransitionIfNeeded:] + 842 28 UIKit 0x2784163c -[UINavigationController __viewWillLayoutSubviews] + 48 29 UIKit 0x278415b2 -[UILayoutContainerView layoutSubviews] + 210 30 UIKit 0x2778246c
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 640 31 QuartzCore 0x27099f64 -[CALayer layoutSublayers] + 124 32 QuartzCore 0x27095714 CA::Layer::layout_if_needed(CA::Transaction*) + 348 33 QuartzCore 0x270955a4 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
+ 12 34 QuartzCore 0x27094b0c CA::Context::commit_transaction(CA::Transaction*) + 364 35 QuartzCore 0x270947ce CA::Transaction::commit() + 586 36 QuartzCore 0x2708e17a CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 134 37 CoreFoundation 0x23638a3a
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 38 CoreFoundation 0x23636d02 __CFRunLoopDoObservers + 278 39 CoreFoundation 0x23587abc CFRunLoopRunSpecific + 544 40 CoreFoundation 0x23587890 CFRunLoopRunInMode + 104 41 UIKit 0x277f2a82 -[UIApplication
_run] + 522 42 UIKit 0x277ed314 UIApplicationMain + 140 43 MyAppName 0x000bb176 main (main.m:16) 44 libdyld.dylib 0x3593a9cc start + 0
Thread 1: 0 libsystem_kernel.dylib 0x35a0a92c
__workq_kernreturn + 8 1 libsystem_pthread.dylib 0x35a9c8c0 _pthread_wqthread + 1032 2 libsystem_pthread.dylib 0x35a9c4a4 start_wqthread + 4
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager Thread 2: 0 libsystem_kernel.dylib 0x35a0b3c0 kevent_qos + 24 1 libdispatch.dylib 0x3591ecfa _dispatch_mgr_invoke + 250 2 libdispatch.dylib 0x3591170a _dispatch_mgr_thread + 34
Thread 3: 0 libsystem_kernel.dylib 0x35a0a92c
__workq_kernreturn + 8 1 libsystem_pthread.dylib 0x35a9c8c0 _pthread_wqthread + 1032 2 libsystem_pthread.dylib 0x35a9c4a4 start_wqthread + 4
Thread 4: 0 libsystem_kernel.dylib 0x35a0a92c
__workq_kernreturn + 8 1 libsystem_pthread.dylib 0x35a9c8c0 _pthread_wqthread + 1032 2 libsystem_pthread.dylib 0x35a9c4a4 start_wqthread + 4
Thread 5 name: com.apple.NSURLConnectionLoader Thread 5: 0 libsystem_kernel.dylib 0x359f60b0 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x359f5eac mach_msg + 36 2 CoreFoundation 0x23638e34 __CFRunLoopServiceMachPort + 132 3 CoreFoundation 0x2363718e __CFRunLoopRun + 1046 4 CoreFoundation 0x23587a9c CFRunLoopRunSpecific + 512 5 CoreFoundation 0x23587890 CFRunLoopRunInMode + 104 6 CFNetwork 0x22f166ea +[NSURLConnection(Loader) _resourceLoadLoop:] + 482 7 Foundation 0x2447eb0e __NSThread__start__ + 1098 8 libsystem_pthread.dylib 0x35a9ea84 _pthread_body + 136 9 libsystem_pthread.dylib 0x35a9e9f6 _pthread_start + 106 10 libsystem_pthread.dylib 0x35a9c4b0 thread_start + 4
Thread 6 name: GAIThread Thread 6: 0 libsystem_kernel.dylib 0x359f60b0 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x359f5eac mach_msg + 36 2 CoreFoundation 0x23638e34 __CFRunLoopServiceMachPort + 132 3 CoreFoundation 0x2363718e __CFRunLoopRun + 1046 4 CoreFoundation 0x23587a9c CFRunLoopRunSpecific + 512 5 CoreFoundation 0x23587890 CFRunLoopRunInMode + 104 6 Foundation 0x243afb44 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 264 7 Foundation 0x243fe8c0 -[NSRunLoop(NSRunLoop) run]
+ 76 8 MyAppName 0x0015ccac +[GAI threadMain:] + 60 9 Foundation 0x2447eb0e __NSThread__start__ + 1098 10 libsystem_pthread.dylib 0x35a9ea84 _pthread_body + 136 11 libsystem_pthread.dylib 0x35a9e9f6 _pthread_start + 106 12 libsystem_pthread.dylib 0x35a9c4b0 thread_start + 4
Thread 7 name: NetworkLoad Thread 7: 0 libsystem_kernel.dylib 0x359f60b0 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x359f5eac mach_msg + 36 2 CoreFoundation 0x23638e34 __CFRunLoopServiceMachPort + 132 3 CoreFoundation 0x2363718e __CFRunLoopRun + 1046 4 CoreFoundation 0x23587a9c CFRunLoopRunSpecific + 512 5 CoreFoundation 0x23587890 CFRunLoopRunInMode + 104 6 GeoServices 0x2c90c76a _runNetworkThread + 462 7 libsystem_pthread.dylib 0x35a9ea84 _pthread_body + 136 8 libsystem_pthread.dylib 0x35a9e9f6 _pthread_start + 106 9 libsystem_pthread.dylib 0x35a9c4b0 thread_start + 4
Thread 8 name: com.apple.CFSocket.private Thread 8: 0 libsystem_kernel.dylib 0x35a09fec __select + 20 1 CoreFoundation 0x2363dd44 __CFSocketManager + 568 2 libsystem_pthread.dylib 0x35a9ea84 _pthread_body + 136 3 libsystem_pthread.dylib 0x35a9e9f6 _pthread_start + 106 4 libsystem_pthread.dylib 0x35a9c4b0 thread_start + 4
No thread state (register information) available
Upgrading to the latest Xcode 7 beta 5 and iOS 9 beta 5 just resolved the issue. Thanks for the help guys.

Xamarin iOS app SIGSEGV

I am getting occasional SIGSEGV errors like below in my app (c# Xamarin iOS app with latest version of Xamarin Studio=5.8.3, Xamarin.iOS=8.9.1.3
It looks like in crashed in UIKit and from my own app "ObymobiMobileAppiOS" it's just in "main".
What kind of problem it is?
How can I get more info or debug it?
I can reproduce it by using the app for about 5 mins.
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
at UIKit.UIApplication.Main (string[],string,string) [0x0001c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:45
at Obymobi.Mobile.App.iOS.Application.Main (string[]) [0x000b9] in /Users/billbatchelor/Documents/Mobile Development/AllInOne/Obymobi.Xamarin/Obymobi.Mobile.App.iOS/Main.cs:52
at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
0 ObymobiMobileAppiOS 0x00000001024ef9ac mono_handle_native_sigsegv + 264
1 ObymobiMobileAppiOS 0x00000001024f97cc mono_sigsegv_signal_handler + 316
2 libsystem_platform.dylib 0x000000019890895c _sigtramp + 68
3 UIKit 0x000000018b535540 <redacted> + 216
4 UIKit 0x000000018b535030 <redacted> + 452
5 UIKit 0x000000018b534e38 <redacted> + 216
6 UIKit 0x000000018b534d4c <redacted> + 468
7 UIKit 0x000000018b48fd8c <redacted> + 264
8 UIKit 0x000000018b32ca2c <redacted> + 700
9 UIKit 0x000000018b325f68 <redacted> + 684
10 UIKit 0x000000018b2f918c <redacted> + 264
11 UIKit 0x000000018b59a324 <redacted> + 15424
12 UIKit 0x000000018b2f76a0 <redacted> + 1716
13 CoreFoundation 0x0000000186870240 <redacted> + 24
14 CoreFoundation 0x000000018686f4e4 <redacted> + 264
15 CoreFoundation 0x000000018686d594 <redacted> + 712
16 CoreFoundation 0x00000001867992d4 CFRunLoopRunSpecific + 396
17 GraphicsServices 0x000000018ffaf6fc GSEventRunModal + 168
18 UIKit 0x000000018b35efac UIApplicationMain + 1488
19 ObymobiMobileAppiOS 0x0000000100b61f28 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 344
20 ObymobiMobileAppiOS 0x00000001005387c0 UIKit_UIApplication_Main_string___intptr_intptr + 48
21 ObymobiMobileAppiOS 0x000000010053865c UIKit_UIApplication_Main_string___string_string + 188
22 ObymobiMobileAppiOS 0x000000010009c654 Obymobi_Mobile_App_iOS_Application_Main_string__ + 1508
23 ObymobiMobileAppiOS 0x0000000101007130 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 160
24 ObymobiMobileAppiOS 0x00000001024fb88c mono_jit_runtime_invoke + 1260
25 ObymobiMobileAppiOS 0x00000001025511e0 mono_runtime_invoke + 128
26 ObymobiMobileAppiOS 0x00000001025553c4 mono_runtime_exec_main + 404
27 ObymobiMobileAppiOS 0x00000001025c6a50 xamarin_main + 1812
28 ObymobiMobileAppiOS 0x00000001024b9688 main + 96
29 libdyld.dylib 0x000000019875aa08 <redacted> + 4
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries used by your application.
Update
Here is another example of SIGSEGVs I get (this was on simulator) which doesn't have "redacted":-
Any more ideas how to find the problem? Or is it a possible bug in Xamarin?
Native stacktrace:
0 ObymobiMobileAppiOS 0x0011d4f7 mono_handle_native_sigsegv + 311
1 ObymobiMobileAppiOS 0x0014c505 mono_sigsegv_signal_handler + 213
2 libsystem_platform.dylib 0x08c8003b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 VectorKit 0x10663fe9 -[VKTileProvider tileSource:didFetchTile:forKey:] + 105
5 VectorKit 0x1067140e -[VKTileSource fetchedTile:forKey:] + 62
6 VectorKit 0x106c2617 -[VKTileSetBackedTileSource fetchedTile:forKey:] + 247
7 VectorKit 0x106705b5 -[VKTileSource _fetchedTile:] + 309
8 VectorKit 0x10671985 __49-[VKTileSource decodeData:downloadKey:sourceKey:]_block_invoke_2 + 181
9 libdispatch.dylib 0x08930d8a _dispatch_call_block_and_release + 15
10 libdispatch.dylib 0x0894decf _dispatch_client_callout + 14
11 libdispatch.dylib 0x0893602e _dispatch_queue_drain + 411
12 libdispatch.dylib 0x08935d33 _dispatch_queue_invoke + 197
13 libdispatch.dylib 0x0893820b _dispatch_root_queue_drain + 428
14 libdispatch.dylib 0x089393e7 _dispatch_worker_thread3 + 108
15 libsystem_pthread.dylib 0x08c8d1da _pthread_wqthread + 724
16 libsystem_pthread.dylib 0x08c8ae2e start_wqthread + 30
I came across the same problem. In my case I found some solutions:
If project referenced to wrapper above native library. Check that wrapper and your project have the same architecture - Classic API or Unified API.
1.1 Try to rebuild native project.
1.2 Remove project wrapper from solution and add reference only to output library.
Sometimes, native object are destroyed earlier than .NET. In this case, .NET object have exceptions inside and this error cannot catch with try-catch.
Need to dispose objects correctly.
Try to look crash report inside xcode to get more detailed information.
I faced this problem while using UIDocumentInteractionController. I was using instance of this class as a local parameter and garbage collector was flushing that instance even before the function execution completes. Taking that instance to Global scope solved my problem.
Are the version of Xamarin equal on OS X and Windows? I had similar error. When I updated Xamarin, everything was fine.

Resolving iOS app crash in distribution build

I have submitted an app to the app store, and after the review, the app has been rejected. This is the explanation sent by Apple:
Specifically, after downloading the latest version submitted for review, Version 2.1, we found that when the user taps on the map icon, the app still crashes.
This occurred when your app was used:
- Offline
- On Wi-Fi
- On cellular network
I am not able to detect the issue then during development and testing the app on the emulator and on a real device, the app doesn't crash.
This is the first part of the crash report:
{"app_name":"mujergrancanaria","app_version":"2.0","bundleID":"com.solinpromex.casadelajuventud","adam_id":946142349,"os_version":"iPhone OS 8.1 (12B410)","slice_uuid":"601d3ebb-53d8-39ff-8766-badaadb4f776","share_with_app_devs":false,"build_version":"2.1","is_first_party":false,"bug_type":"109","name":"mujergrancanaria"}
Incident Identifier: 02C4277A-3657-4CFF-9A5D-8A3B34E1ACE4
CrashReporter Key: 34094a2f9cf3e1e29a81d365a85a102af46a1edc
Hardware Model: xxx
Process: mujergrancanaria [4557]
Path: /private/var/mobile/Containers/Bundle/Application/67EFD456-E179-4049-B1A6-FBBF6D6144E4/mujergrancanaria.app/mujergrancanaria
Identifier: com.solinpromex.casadelajuventud
Version: 2.1 (2.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-01-09 14:46:52.869 -0800
Launch Time: 2015-01-09 14:46:38.934 -0800
OS Version: iOS 8.1 (12B410)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
(0x186b85e48 0x1977d40e4 0x186b8cf14 0x186b89cc4 0x186a8ec1c 0x10025f1bc 0x10025dc38 0x10025d03c 0x10025ced4 0x1000eb240 0x18b334e84 0x18b334b94 0x18b4d7ad4 0x18b3e9310 0x18b3e90dc 0x18b3e905c 0x18b331a2c 0x18ac89994 0x18ac84564 0x18ac84408 0x18ac83c08 0x18ac8398c 0x18b333948 0x186b3e0e8 0x186b3d38c 0x186b3b43c 0x186a691f4 0x18fbe35a4 0x18b39a784 0x1000d2a40 0x197e42a08)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000197f5b270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000197ff9224 pthread_kill + 108
2 libsystem_c.dylib 0x0000000197ed2b14 abort + 108
3 libc++abi.dylib 0x0000000196fa5414 abort_message + 112
4 libc++abi.dylib 0x0000000196fc4b88 default_terminate_handler() + 300
5 libobjc.A.dylib 0x00000001977d43bc _objc_terminate() + 124
6 libc++abi.dylib 0x0000000196fc1bb0 std::__terminate(void (*)()) + 12
7 libc++abi.dylib 0x0000000196fc1474 __cxa_throw + 132
8 libobjc.A.dylib 0x00000001977d4200 objc_exception_throw + 344
9 CoreFoundation 0x0000000186b8cf10 -[NSObject(NSObject) doesNotRecognizeSelector:] + 216
10 CoreFoundation 0x0000000186b89cc0 ___forwarding___ + 924
11 CoreFoundation 0x0000000186a8ec18 _CF_forwarding_prep_0 + 88
12 mujergrancanaria 0x000000010025f1b8 0x1000ac000 + 1782200
13 mujergrancanaria 0x000000010025dc34 0x1000ac000 + 1776692
14 mujergrancanaria 0x000000010025d038 0x1000ac000 + 1773624
15 mujergrancanaria 0x000000010025ced0 0x1000ac000 + 1773264
16 mujergrancanaria 0x00000001000eb23c 0x1000ac000 + 258620
17 UIKit 0x000000018b334e80 -[UIViewController loadViewIfRequired] + 688
18 UIKit 0x000000018b334b90 -[UIViewController view] + 28
19 UIKit 0x000000018b4d7ad0 -[UINavigationController _startCustomTransition:] + 708
20 UIKit 0x000000018b3e930c -[UINavigationController _startDeferredTransitionIfNeeded:] + 464
21 UIKit 0x000000018b3e90d8 -[UINavigationController __viewWillLayoutSubviews] + 52
22 UIKit 0x000000018b3e9058 -[UILayoutContainerView layoutSubviews] + 196
23 UIKit 0x000000018b331a28 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 568
24 QuartzCore 0x000000018ac89990 -[CALayer layoutSublayers] + 164
25 QuartzCore 0x000000018ac84560 CA::Layer::layout_if_needed(CA::Transaction*) + 316
26 QuartzCore 0x000000018ac84404 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
27 QuartzCore 0x000000018ac83c04 CA::Context::commit_transaction(CA::Transaction*) + 272
28 QuartzCore 0x000000018ac83988 CA::Transaction::commit() + 432
29 UIKit 0x000000018b333944 _UIApplicationHandleEventQueue + 1696
30 CoreFoundation 0x0000000186b3e0e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
31 CoreFoundation 0x0000000186b3d388 __CFRunLoopDoSources0 + 260
32 CoreFoundation 0x0000000186b3b438 __CFRunLoopRun + 708
33 CoreFoundation 0x0000000186a691f0 CFRunLoopRunSpecific + 392
34 GraphicsServices 0x000000018fbe35a0 GSEventRunModal + 164
35 UIKit 0x000000018b39a780 UIApplicationMain + 1484
36 mujergrancanaria 0x00000001000d2a3c 0x1000ac000 + 158268
37 libdyld.dylib 0x0000000197e42a04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x0000000197f40c94 kevent64 + 8
1 libdispatch.dylib 0x0000000197e2897c _dispatch_mgr_invoke + 272
2 libdispatch.dylib 0x0000000197e1b3b0 _dispatch_mgr_thread + 48
Thread 2:
0 libsystem_kernel.dylib 0x0000000197f5bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197ff5390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000197ff4fa4 start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x0000000197f5bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197ff5390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000197ff4fa4 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x0000000197f5bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197ff5390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000197ff4fa4 start_wqthread + 0
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x0000000197f40e7c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000197f40cf4 mach_msg + 68
2 CoreFoundation 0x0000000186b3d5c8 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000186b3b51c __CFRunLoopRun + 936
4 CoreFoundation 0x0000000186a691f0 CFRunLoopRunSpecific + 392
5 CFNetwork 0x000000018656d6a0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436
6 Foundation 0x0000000187a55c08 __NSThread__main__ + 1068
7 libsystem_pthread.dylib 0x0000000197ff7e7c _pthread_body + 160
8 libsystem_pthread.dylib 0x0000000197ff7dd8 _pthread_start + 156
9 libsystem_pthread.dylib 0x0000000197ff4fac thread_start + 0
Thread 6:
0 libsystem_kernel.dylib 0x0000000197f5bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197ff5390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000197ff4fa4 start_wqthread + 0
Thread 7 name: com.apple.CFSocket.private
Thread 7:
0 libsystem_kernel.dylib 0x0000000197f5b498 __select + 8
1 CoreFoundation 0x0000000186b42fc0 __CFSocketManager + 656
2 libsystem_pthread.dylib 0x0000000197ff7e7c _pthread_body + 160
3 libsystem_pthread.dylib 0x0000000197ff7dd8 _pthread_start + 156
4 libsystem_pthread.dylib 0x0000000197ff4fac thread_start + 0
Thread 8:
0 libsystem_kernel.dylib 0x0000000197f5bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197ff5390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000197ff4fa4 start_wqthread + 0
I am unable to find where to begin to find out the crash source. Please, any clue is welcome.
You are going to want to symbolicate your crash log. In your code this is where the crash is happening
12 mujergrancanaria 0x000000010025f1b8 0x1000ac000 + 1782200
There are a number of posts about how to symbolicate this so that you can know which file and line that crash is happening on. Generally all you need to do is open Xcode, then open Devices (from the menu), then select a real device, click on view device logs, and then drag your log into the list. Xcode will automatically find the binary and dsym file from when you created the archive (assuming this is the same machine you build the archive on). If that doesn't work look at this Symbolicating iPhone App Crash Reports
Ok so, it's map related and review team are in Palo Alto California I think (correct me if I'm wrong).
So I would definitly start by testing with location set in simulator in Palo Alto.
Next, the log.
A big part is redacted
12 mujergrancanaria 0x000000010025f1b8 0x1000ac000 + 1782200
13 mujergrancanaria 0x000000010025dc34 0x1000ac000 + 1776692
14 mujergrancanaria 0x000000010025d038 0x1000ac000 + 1773624
15 mujergrancanaria 0x000000010025ced0 0x1000ac000 + 1773264
16 mujergrancanaria 0x00000001000eb23c 0x1000ac000 + 258620
Meaning you need to put it in Xcode or another tool where you can use the DSym (symbole file created during archiving of the app) to exploit it.
Without it what I can tell you is that this line in the stack :
-[NSObject(NSObject) doesNotRecognizeSelector:]
Means your are calling a non existing method on an object.
The app crash reason was a missing flag in the Other Linker Flags section. The app includes the Google Maps SDK for iOS, and the flag -ObjC is needed. I had it only at the Debug Build section. Adding the flag -ObjC also in the Release Build section solves the problem, and the app doesn't crash any more when launching the Distribution file...

Resources