Google Maps SDK for iOS crashing on startup using Monotouch bindings - xamarin.ios

I am trying to test out the new Google SDK for iOS using the GoogleMapsSample on GitHub, however, every time I run the app crashes trying to create an instance of GMSMapView. This is happening when trying to run on both the simulator and the device.
I have enabled the SDK from the developer console and updated the GMSServices.ProvideAPIKey call to use my iOS API key, from what I have read that is pretty much all that's required?
I did notice this bug which was logged against the actual SDK which mentions an issue relating to OpenGL so not sure if that's what the issue is here. However, as I can't get access to a log using the simulator I ran it on the device and checked the log out using XCode and the error does seem to relate to this - stack trace:
Incident Identifier: {Incident Id}
CrashReporter Key: {CrashReporter key}
Hardware Model: iPhone5,2
Process: GoogleMapsSample [6085]
Path: /var/mobile/Applications/{AppId}/GoogleMapsSample.app/GoogleMapsSample
Identifier: GoogleMapsSample
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-02-27 18:28:21.300 +0000
OS Version: iOS 6.0.2 (10A551)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000180
Crashed Thread: 6
Last Exception Backtrace:
0 CoreFoundation 0x372913e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x33cc995e objc_exception_throw + 26
2 CoreData 0x32330828 +[NSEntityDescription entityForName:inManagedObjectContext:] + 100
3 GoogleMapsSample 0x0010a3c6 -[GMSTileDataCache fetchTilesImmediateWithPredicate:sortDescriptor:completionHandler:] (GMSTileDataCache.mm:794)
4 GoogleMapsSample 0x00106af0 __47-[GMSTileDataCache startWithCompletionHandler:]_block_invoke_0 (GMSTileDataCache.mm:170)
5 libdispatch.dylib 0x3096478e _dispatch_call_block_and_release + 6
6 libdispatch.dylib 0x30967b36 _dispatch_queue_drain + 138
7 libdispatch.dylib 0x30965678 _dispatch_queue_invoke + 40
8 libdispatch.dylib 0x3096860e _dispatch_root_queue_drain + 206
9 libdispatch.dylib 0x309687d4 _dispatch_worker_thread2 + 88
10 libsystem_c.dylib 0x3337f7ec _pthread_wqthread + 356
11 libsystem_c.dylib 0x3337f680 start_wqthread + 4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 dyld 0x2fe9bcf6 ImageLoaderMachOCompressed::trieWalk(unsigned char const*, unsigned char const*, char const*) + 42
1 dyld 0x2fe9be88 ImageLoaderMachOCompressed::findExportedSymbol(char const*, ImageLoader const**) const + 72
2 dyld 0x2fe96ca4 ImageLoaderMachO::findExportedSymbol(char const*, bool, ImageLoader const**) const + 28
3 dyld 0x2fe93592 ImageLoader::findExportedSymbolInDependentImagesExcept(char const*, ImageLoader const**, ImageLoader const**&, ImageLoader const**, ImageLoader const**) const + 50
4 dyld 0x2fe936f0 ImageLoader::findExportedSymbolInImageOrDependentImages(char const*, ImageLoader::LinkContext const&, ImageLoader const**) const + 64
5 dyld 0x2fe91d12 dlsym + 474
6 libdyld.dylib 0x37ad79c6 dlsym + 54
7 libGFXShared.dylib 0x3362e5c4 gfxInitializeLibrary + 1256
8 GLEngine 0x379bce6a gliInitializeLibrary + 42
9 OpenGLES 0x36a9fa4e eagl_init + 418
10 OpenGLES 0x36a9f6a4 -[EAGLSharegroup initWithAPI:sharedWithCompute:] + 116
11 OpenGLES 0x36a9e45e -[EAGLContext initWithAPI:properties:] + 186
12 OpenGLES 0x36a9e2f2 -[EAGLContext initWithAPI:sharedWithCompute:] + 138
13 GoogleMapsSample 0x00081ada -[GMSIOSGLContext initWithAPI:] (GMSIOSGLContext.mm:14)
14 GoogleMapsSample 0x001275b6 gmscore::renderer::GMSIOSGLContextPool::GMSIOSGLContextPool() (GLContextPool.mm:108)
15 GoogleMapsSample 0x0012733a __GetGLContextPool_block_invoke_0 (GLContextPool.mm:204)
16 libdispatch.dylib 0x309645d8 _dispatch_client_callout + 20
17 libdispatch.dylib 0x30965586 dispatch_once_f + 42
18 GoogleMapsSample 0x001272da gmscore::renderer::GLContextPool::GetGLContextPool() (once.h:68)
19 GoogleMapsSample 0x00142b60 -[GMSEntityRendererView initWithFrame:context:] (GMSEntityRendererView.mm:53)
20 GoogleMapsSample 0x001562be -[GMSGestureHandlerView initWithFrame:context:gestures:] (GMSGestureHandlerView.mm:282)
21 GoogleMapsSample 0x000fc6d6 -[GMSVectorMapView initWithFrame:connection:tileServiceRegistry:tileRequestCoordinator:serverControlledParameters:resourceManager:resources:networkMonitor:context:flags:locationPipeline:] (GMSVectorMapView.mm:245)
22 GoogleMapsSample 0x00097bc6 -[GMSVectorMapViewBridge sharedInit:] (GMSVectorMapViewBridge.mm:108)
23 GoogleMapsSample 0x000977f0 -[GMSVectorMapViewBridge initWithFrame:camera:] (GMSVectorMapViewBridge.mm:84)
24 GoogleMapsSample 0x00080caa +[GMSMapView mapWithFrame:camera:] (GMSMapView.m:36)
25 GoogleMapsSample 0x00183058 wrapper_managed_to_native_ApiDefinition_Messaging_IntPtr_objc_msgSend_RectangleF_GMSCamera_intptr_intptr_System_Drawing_RectangleF_GoogleMaps_GMSCamera + 456
26 GoogleMapsSample 0x004ff57c GoogleMapsSample_MapViewController_LoadView (MapViewController.cs:21)
27 GoogleMapsSample 0x00edae94 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196
28 GoogleMapsSample 0x018ebd84 mono_jit_runtime_invoke (mini.c:5783)
29 GoogleMapsSample 0x0195b644 mono_runtime_invoke (object.c:2790)
30 GoogleMapsSample 0x018d9816 native_to_managed_trampoline_GoogleMapsSample_MapViewController_LoadView (registrar.m:10129)
31 UIKit 0x3805d41c -[UIViewController loadViewIfRequired] + 64
32 UIKit 0x3809dd2c -[UIWindow addRootViewControllerViewIfPossible] + 60
33 UIKit 0x38099ac8 -[UIWindow _setHidden:forced:] + 360
34 UIKit 0x380db19c -[UIWindow makeKeyAndVisible] + 56
35 GoogleMapsSample 0x01549600 wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr + 64
36 GoogleMapsSample 0x004ff22c GoogleMapsSample_AppDelegate_FinishedLaunching_MonoTouch_UIKit_UIApplication_MonoTouch_Foundation_NSDictionary (AppDelegate.cs:35)
37 GoogleMapsSample 0x00edae94 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196
38 GoogleMapsSample 0x018ebd84 mono_jit_runtime_invoke (mini.c:5783)
39 GoogleMapsSample 0x0195b644 mono_runtime_invoke (object.c:2790)
40 GoogleMapsSample 0x018c9608 native_to_managed_trampoline_GoogleMapsSample_AppDelegate_FinishedLaunching (registrar.m:5515)
41 UIKit 0x3809ea74 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 248
42 UIKit 0x3809e5f8 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1164
43 UIKit 0x38096806 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
44 UIKit 0x3803ecea -[UIApplication handleEvent:withNewEvent:] + 1006
45 UIKit 0x3803e778 -[UIApplication sendEvent:] + 68
46 UIKit 0x3803e1ba _UIApplicationHandleEvent + 6194
47 GraphicsServices 0x315235f4 _PurpleEventCallback + 588
48 GraphicsServices 0x31523222 PurpleEventCallback + 30
49 CoreFoundation 0x372663e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
50 CoreFoundation 0x37266386 __CFRunLoopDoSource1 + 134
51 CoreFoundation 0x3726520a __CFRunLoopRun + 1378
52 CoreFoundation 0x371d8238 CFRunLoopRunSpecific + 352
53 CoreFoundation 0x371d80c4 CFRunLoopRunInMode + 100
54 UIKit 0x38095440 -[UIApplication _run] + 664
55 UIKit 0x3809228c UIApplicationMain + 1116
56 GoogleMapsSample 0x01576fa8 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 236
57 GoogleMapsSample 0x004fef5c GoogleMapsSample_Application_Main_string__ (Main.cs:17)
58 GoogleMapsSample 0x00edae94 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196
59 GoogleMapsSample 0x018ebd84 mono_jit_runtime_invoke (mini.c:5783)
60 GoogleMapsSample 0x0195b644 mono_runtime_invoke (object.c:2790)
61 GoogleMapsSample 0x0195e3aa mono_runtime_exec_main (object.c:3972)
62 GoogleMapsSample 0x01961cce mono_runtime_run_main (object.c:3602)
63 GoogleMapsSample 0x01905be6 mono_jit_exec (driver.c:1125)
64 GoogleMapsSample 0x019ae5f4 main (main.m:445)
65 GoogleMapsSample 0x0016d20c start + 36
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x378c25d0 kevent64 + 24
1 libdispatch.dylib 0x30969d22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x30965374 _dispatch_mgr_thread + 32
Thread 2:
0 libsystem_kernel.dylib 0x378d2d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3337fad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3337f7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3337f680 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x378c1e80 semaphore_wait_trap + 8
1 GoogleMapsSample 0x01900992 mono_sem_wait (mono-semaphore.c:115)
2 GoogleMapsSample 0x019a0cea finalizer_thread (gc.c:1078)
3 GoogleMapsSample 0x0198bff6 start_wrapper (threads.c:784)
4 GoogleMapsSample 0x018f3942 thread_start_routine (wthreads.c:287)
5 GoogleMapsSample 0x019392dc GC_start_routine (pthread_support.c:1468)
6 libsystem_c.dylib 0x3338a0de _pthread_start + 306
7 libsystem_c.dylib 0x33389fa4 thread_start + 4
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x378c1e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x378c1fd0 mach_msg + 48
2 CoreFoundation 0x372662b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x3726502c __CFRunLoopRun + 900
4 CoreFoundation 0x371d8238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x371d80c4 CFRunLoopRunInMode + 100
6 WebCore 0x38ef9a58 _ZL12RunWebThreadPv + 440
7 libsystem_c.dylib 0x3338a0de _pthread_start + 306
8 libsystem_c.dylib 0x33389fa4 thread_start + 4
Thread 5:
0 libsystem_kernel.dylib 0x378d2d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3337fad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3337f7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3337f680 start_wqthread + 4
Thread 6 name: Dispatch queue: com.google.maps.TileDataCacheQueue
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x378d2350 __pthread_kill + 8
1 libsystem_c.dylib 0x333a7fb2 pthread_kill + 54
2 libsystem_c.dylib 0x333e4366 abort + 90
3 GoogleMapsSample 0x019330a4 mono_handle_native_sigsegv (mini-exceptions.c:2325)
4 GoogleMapsSample 0x018ea55e mono_sigsegv_signal_handler (mini.c:5878)
5 libsystem_c.dylib 0x333b1d38 _sigtramp + 40
6 GoogleMapsSample 0x01994b34 mono_domain_get (domain.c:1818)
7 GoogleMapsSample 0x0195b644 mono_runtime_invoke (object.c:2790)
8 GoogleMapsSample 0x019c0058 monotouch_throw_monotouch_exception (monotouch-glue.m:1420)
9 GoogleMapsSample 0x019c00e8 monotouch_exception_handler (monotouch-glue.m:1426)
10 CoreFoundation 0x372916cc __handleUncaughtException + 624
11 libobjc.A.dylib 0x33cc9a46 _ZL15_objc_terminatev + 126
12 libc++abi.dylib 0x361ee118 _ZL19safe_handler_callerPFvvE + 76
13 libc++abi.dylib 0x361ee1b0 std::terminate() + 16
14 libc++abi.dylib 0x361ef59a __cxa_throw + 118
15 libobjc.A.dylib 0x33cc999e objc_exception_throw + 90
16 CoreData 0x32330828 +[NSEntityDescription entityForName:inManagedObjectContext:] + 100
17 GoogleMapsSample 0x0010a3c6 -[GMSTileDataCache fetchTilesImmediateWithPredicate:sortDescriptor:completionHandler:] (GMSTileDataCache.mm:794)
18 GoogleMapsSample 0x00106af0 __47-[GMSTileDataCache startWithCompletionHandler:]_block_invoke_0 (GMSTileDataCache.mm:170)
19 libdispatch.dylib 0x30964790 _dispatch_call_block_and_release + 8
20 libdispatch.dylib 0x30967b36 _dispatch_queue_drain + 138
21 libdispatch.dylib 0x30965678 _dispatch_queue_invoke + 40
22 libdispatch.dylib 0x30968610 _dispatch_root_queue_drain + 208
23 libdispatch.dylib 0x309687d4 _dispatch_worker_thread2 + 88
24 libsystem_c.dylib 0x3337f7ee _pthread_wqthread + 358
25 libsystem_c.dylib 0x3337f680 start_wqthread + 4
Thread 6 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x3a484524
r4: 0x00000006 r5: 0x0aa4c000 r6: 0x01a14b1e r7: 0x0aa4af9c
r8: 0x00000000 r9: 0x3a480898 r10: 0x01a14b44 r11: 0x05a9385c
ip: 0x00000148 sp: 0x0aa4af90 lr: 0x333a7fb7 pc: 0x378d2350
cpsr: 0x00000010
Version info:
Mono 2.10.11 (mono-2-10/2baeee2)
GTK 2.24.14
GTK# (2.12.0.0)
Package version: 210110000
Xcode 4.5.1 (1842)
Build 4G1004
Monotouch: 6.2.0.65
Any ideas?

Update #2
Google suggested a workaround and it has been implemented. I have successfully deployed to device :) you can find the working solution on MonoTouch-Bindings Repo
Google will fix this on their upcoming release as stated here.
Happy Coding
Update
There is a bug on Google Maps that makes it impossible to use it in Xamarin.iOS, this bug has been reported to google here
http://code.google.com/p/gmaps-api-issues/issues/detail?id=5018
Please Star it so google notices and fixes it faster ;)
I have updated the bindings to version 1.1.0 of Google Maps you can find them here https://github.com/mono/monotouch-bindings/tree/master/GoogleMaps
Please note I have not updated the sample to reflect the Api changes yet.
Hope this helps
Alex

Xamarin did not update to the newer version since they did the last update on 14 december. I believe that this crash relates to this issue. Maybe the API keys you can generate today are just build for 1.1.0 and newer.

Related

iOS12 play video in webview crash

I received a crash in iOS12.
The way to reproduce:
1.Play a video with UIWebView, then the video will play in fullScreen.
2.After the video start play, tap the left-top reduced Button to stop the video.
3.Replay it and the video will still in fullScreeen.
4.Repeat step2 and step3 several times.
5.Normal speed, at most 10 times, the crash will come.
Some detail info of the crash:
Hardware Model: iPhone10,3
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Date/Time: 2018-10-08 18:59:20.8570 +0800
Launch Time: 2018-10-08 18:58:58.7757 +0800
OS Version: iPhone OS 12.0 (16A366)
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000047c300000111
VM Region Info: 0x47c300000111 is not in any region. Bytes after previous region: 78891569905938
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [658]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 WebCore 0x00000001be5f4270 VideoFullscreenControllerContext::rateChanged+ 4784752 (bool, float) + 308
1 WebCore 0x00000001be5f4164 VideoFullscreenControllerContext::rateChanged+ 4784484 (bool, float) + 40
2 libdispatch.dylib 0x00000001b529b6c8 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x00000001b529c484 _dispatch_client_callout + 16
4 libdispatch.dylib 0x00000001b527bb44 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1012
5 CoreFoundation 0x00000001b57f21bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
6 CoreFoundation 0x00000001b57ed084 __CFRunLoopRun + 1964
7 CoreFoundation 0x00000001b57ec5b8 CFRunLoopRunSpecific + 436
8 GraphicsServices 0x00000001b7a60584 GSEventRunModal + 100
9 UIKitCore 0x00000001e2117558 UIApplicationMain + 212
10 xxxx 0x00000001023d29e4 main + 59876 (main.m:16)
11 libdyld.dylib 0x00000001b52acb94 start + 4
Thread 1 name: JavaScriptCore bmalloc scavenger
Thread 1:
0 libsystem_kernel.dylib 0x00000001b53f8f0c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001b547a4c8 _pthread_cond_wait$VARIANT$armv81 + 620
2 libc++.1.dylib 0x00000001b49c44d0 std::__1::condition_variable::wait+ 34000 (std::__1::unique_lock<std::__1::mutex>&) + 24
3 JavaScriptCore 0x00000001bcb5bd7c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >+ 376188 (std::__1::unique_lock<bmalloc::Mutex>&) + 104
4 JavaScriptCore 0x00000001bcb5fe70 bmalloc::Scavenger::threadRunLoop+ 392816 () + 176
5 JavaScriptCore 0x00000001bcb5f5a4 bmalloc::Scavenger::Scavenger+ 390564 (std::__1::lock_guard<bmalloc::Mutex>&) + 0
6 JavaScriptCore 0x00000001bcb61050 std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer+ 397392 (std::__1::__thread_struct*) + 0
7 libsystem_pthread.dylib 0x00000001b547d2fc _pthread_body + 128
8 libsystem_pthread.dylib 0x00000001b547d25c _pthread_start + 48
9 libsystem_pthread.dylib 0x00000001b5480d08 thread_start + 4
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x00000001b53eded0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b53ed3a8 mach_msg + 72
2 libdispatch.dylib 0x00000001b526d630 _dispatch_mach_send_and_wait_for_reply + 500
3 libdispatch.dylib 0x00000001b526dad0 dispatch_mach_send_with_result_and_wait_for_reply$VARIANT$armv81 + 56
4 libxpc.dylib 0x00000001b54b4eb4 xpc_connection_send_message_with_reply_sync + 204
5 CoreMedia 0x00000001b8f1176c FigXPCRemoteClientSendSyncMessageCreatingReply + 36
6 MediaToolbox 0x00000001ba4e5868 remoteXPCAsset_GetStatusOfValueForProperty + 152
7 AVFoundation 0x00000001bb954930 -[AVFigAssetInspectorLoader _loadStatusForProperty:figAsset:error:] + 84
8 AVFoundation 0x00000001bb954af4 -[AVFigAssetInspectorLoader statusOfValueForKey:error:] + 312
9 WebCore 0x00000001be232e98 WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus+ 847512 () const + 248
10 WebCore 0x00000001be2213a8 WebCore::MediaPlayerPrivateAVFoundation::updateStates+ 775080 () + 764
11 WebCore 0x00000001be23dcec WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange+ 892140 (double) + 24
12 WebCore 0x00000001be2222bc WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification+ 778940 () + 1064
13 JavaScriptCore 0x00000001bcb273e0 WTF::dispatchFunctionsFromMainThread+ 160736 () + 308
14 Foundation 0x00000001b63135a0 __NSThreadPerformPerform + 336
15 CoreFoundation 0x00000001b57f25b8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
16 CoreFoundation 0x00000001b57f2538 __CFRunLoopDoSource0 + 88
17 CoreFoundation 0x00000001b57f1e1c __CFRunLoopDoSources0 + 176
18 CoreFoundation 0x00000001b57ecce8 __CFRunLoopRun + 1040
19 CoreFoundation 0x00000001b57ec5b8 CFRunLoopRunSpecific + 436
20 WebCore 0x00000001be613ba4 RunWebThread+ 4914084 (void*) + 592
21 libsystem_pthread.dylib 0x00000001b547d2fc _pthread_body + 128
22 libsystem_pthread.dylib 0x00000001b547d25c _pthread_start + 48
23 libsystem_pthread.dylib 0x00000001b5480d08 thread_start + 4
Anyone have any idea?
ps.There are a similar question at Multiple UIWebView WebCore Crashes

Crash in MetalContext with Xamarin

We have a crash in MetalContext with over 3000 crashes in a single day on iOS 10 devices only. We are unable to track down the root of the error and google reveals nobody else have the same issue. Is there anyone who has any clues to where we can begin to look?
CRASH_INFO_ENTRY_0
Assertion failed: (_mcimpl->device == [_mcimpl->queue device]), function MetalContext, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/QuartzCore/QuartzCore-449.40.9/LayerKit/ogl/ogl-metal.mm, line 1005.
tid_403
0 libsystem_kernel.dylib 0x18d19e8e8 __ulock_wait + 8
1 libdispatch.dylib 0x18d06c0d8 _dispatch_ulock_wait + 48
2 libdispatch.dylib 0x18d06c200 _dispatch_thread_event_wait_slow + 36
3 libdispatch.dylib 0x18d069df8 _dispatch_barrier_sync_f_slow + 236
4 QuartzCore 0x1913e7090 CABackingStoreGetFrontTexture(CABackingStore*) + 92
5 QuartzCore 0x1913e7118 CABackingStorePrepareFrontTexture + 64
6 QuartzCore 0x1914db0a4 CA::Layer::prepare_commit(CA::Transaction*) + 320
7 QuartzCore 0x1914577f8 CA::Context::commit_transaction(CA::Transaction*) + 264
8 QuartzCore 0x19147ec58 CA::Transaction::commit() + 512
9 QuartzCore 0x19147f678 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
10 CoreFoundation 0x18e17b7dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
11 CoreFoundation 0x18e17940c __CFRunLoopDoObservers + 372
12 CoreFoundation 0x18e17989c __CFRunLoopRun + 1024
13 CoreFoundation 0x18e0a8048 CFRunLoopRunSpecific + 444
14 GraphicsServices 0x18fb2e198 GSEventRunModal + 180
15 UIKit 0x1940942fc -[UIApplication _run] + 684
16 UIKit 0x19408f034 UIApplicationMain + 208
17 NDC2010 0x100a321d4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (<unknown>:1)
18 NDC2010 0x1009ae138 Xamarin_iOS_UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
19 NDC2010 0x100526288 NDC2010_NDC2010_NDC2010Application_Main_string__ + 28620
20 NDC2010 0x100921ba4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 4204776
21 Mono 0x1019aa4e8 mono_jit_runtime_invoke + 1772
22 Mono 0x101a1ad64 do_runtime_invoke + 112
23 Mono 0x101a1d348 mono_runtime_exec_main + 832
24 Mono 0x101a1cf64 mono_runtime_run_main + 764
25 Mono 0x10198eb04 mono_jit_exec + 236
26 NDC2010 0x10051ed3c xamarin_main (monotouch-main.m:487)
27 NDC2010 0x101291970 main (main.arm64.m:133)
28 libdispatch.dylib 0x18d08c5b8 (Missing)
My app kept crashing with the same log, what fixed for me was a quick reset of device, i traced it to webView usage. I cant reset device every time so further testing revealed that i was using xcode 7.3 to build for ios10 that was the problem, after updating to xcode 8 and rebuilding the app i no longer get this crash. Hope this helps

What does this stack trace indicate? Crash caused by Xamarin.Media.MediaPicker.TakePhotoAsync on iOS8

What does this stack trace indicate? Crash caused by Xamarin.Media.MediaPicker.TakePhotoAsync on iOS8 on iPad2
I've logged a bug at...
https://bugzilla.xamarin.com/show_bug.cgi?id=22853
But I'd like to make sure that it is not something I'm doing. It works fine on iOS7.
OS Version: iOS 8.0 (12A365)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000002c
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3ab05dfc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3ab85d0e pthread_kill + 58
2 libsystem_c.dylib 0x3aaa5934 abort + 72
3 TouchContainer 0x00bd5b3a mono_handle_native_sigsegv (mini-exceptions.c:2360)
4 TouchContainer 0x00bdef72 mono_sigsegv_signal_handler (mini.c:6868)
5 libsystem_platform.dylib 0x3ab800a0 _sigtramp + 40
6 UIKit 0x30212304 _UIViewTopDownSubtreeTraversal + 260
7 UIKit 0x30212304 _UIViewTopDownSubtreeTraversal + 260
8 UIKit 0x305ab842 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 118
9 UIKit 0x300429c0 -[UIView(AdditionalLayoutSupport) _setNeedsUpdateConstraintsNeedingLayout:] + 68
10 UIKit 0x305aa4e2 -[UIView(AdditionalLayoutSupport) _setSubviewWantsAutolayoutTripWantsAutolayout:] + 206
11 UIKit 0x2ff88588 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1352
12 UIKit 0x2ff88032 -[UIView(Hierarchy) addSubview:] + 26
13 UIKit 0x3024b2a2 __56-[UIPresentationController _transplantView:toSuperview:]_block_invoke + 242
14 UIKit 0x3024af8c -[UIPresentationController _performBlockWithoutTriggeringResponderEvents:] + 96
15 UIKit 0x3024b1a6 -[UIPresentationController _transplantView:toSuperview:] + 78
16 UIKit 0x3024e474 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 768
17 UIKit 0x3024d358 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 148
18 UIKit 0x2fffb916 _applyBlockToCFArrayCopiedToStack + 306
19 UIKit 0x2ff777da _afterCACommitHandler + 454
20 CoreFoundation 0x2caca842 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
21 CoreFoundation 0x2cac7f24 __CFRunLoopDoObservers + 272
22 CoreFoundation 0x2cac8326 __CFRunLoopRun + 910
23 CoreFoundation 0x2ca15dac CFRunLoopRunSpecific + 472
24 CoreFoundation 0x2ca15bbe CFRunLoopRunInMode + 102
25 GraphicsServices 0x33d4904c GSEventRunModal + 132
26 UIKit 0x2ffe0efc UIApplicationMain + 1436
27 TouchContainer 0x001d81ec wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 268
28 TouchContainer 0x0018533c MonoTouch_UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:122)
29 TouchContainer 0x001852fc MonoTouch_UIKit_UIApplication_Main_string___string_string (UIApplication.cs:88)
30 TouchContainer 0x000ad800 Touch_Container_Application_Main_string__ (MainClass.cs:84)
31 TouchContainer 0x0036e9b4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196
32 TouchContainer 0x00be115c mono_jit_runtime_invoke (mini.c:6730)
33 TouchContainer 0x00c2059a mono_runtime_invoke (object.c:2831)
34 TouchContainer 0x00c242a2 mono_runtime_exec_main (object.c:4088)
35 TouchContainer 0x00c240ea mono_runtime_run_main (object.c:3714)
36 TouchContainer 0x00bcea74 mono_jit_exec (driver.g.c:1009)
37 TouchContainer 0x00c59894 monotouch_main (monotouch-main.m:469)
38 TouchContainer 0x00bb0da0 main (main.armv7.m:65)
39 TouchContainer 0x000a9024 start + 36
It seems that what I was doing wrong was calling TakePhotoAsync from the Clicked event of an ActionSheet. The action sheet was still presented when the photo picker was presented. Pre iOS8 there must have been defensive code to silently work in this apparently illegal situation. The solution was to run the TakePhotoAsync in a BeginInvokeOnMainThread call. This queues the call on the main thread and allows the ActionSheet some space to finish closing.

ECSlidingViewController bound using Xamarin causes crash

I am using a binding project to wrap ECSlidingViewController for use with MonoTouch/Xamarin. I have this setup. However when I attempt to open the menu (by triggering a segue on button click) the app crashes with no error report, nor anything in the application output. All I have to go on is the following crash report I retrieved from the console. Can anyone shed any light on the problem?
The only code being executed is:
// in ViewDidLoad()
menuButton.TouchUpInside += (object sender, EventArgs e) => ToggleMenu();
private void ToggleMenu()
{
PerformSegue("ReturnToMenu", this);
}
The mammoth crash report. I've removed the irrelevant sections and the 20-odd other threads it ilsted.
Process: TrendsyiOS [20438] Path:
/Users/USER/Library/Application Support/iPhone
Simulator/*/TrendsyiOS.app/TrendsyiOS Identifier: TrendsyiOS
Version: 0 Code Type: X86 (Native) Parent Process:
launchd_sim [20410] Responsible: launchd_sim [20410] User ID:
501
Date/Time: 2014-03-07 18:38:48.964 +0000 OS Version: Mac OS
X 10.9.2 (13C64) Report Version: 11 Anonymous UUID:
16AD87BD-E1A0-85E1-ABA2-1B42ED40C5AA
Sleep/Wake UUID: BD75E8D8-A7D6-4ADA-8D92-7D304EF39EAC
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes:
0x0000000000000002, 0x0000000000000000
Application Specific Information: iPhone Simulator 463.9.4.2, iPhone
OS 7.0.3 (iPhone Retina (4-inch)/11B508)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0
CoreFoundation 0x0511db71 CFRetain + 113 1 ???
0x1426c448 0 + 338084936 2 ???
0x1426c168 0 + 338084200 3 ???
0x1426c3a6 0 + 338084774 4 TrendsyiOS
0x00223a74 mono_jit_runtime_invoke + 820 (mini.c:6622) 5 TrendsyiOS
0x002be66f mono_runtime_invoke + 127 (object.c:2827) 6 TrendsyiOS
0x00361b3a get_delegate_for_block_parameter + 138
(monotouch-glue.m:292) 7 TrendsyiOS 0x00368ee7
monotouch_trampoline + 1847
(.monotouch-trampoline-setup-callstack.inc:70) 8 TrendsyiOS
0x0013ace7 -[ECSlidingViewController anchorTopViewToRightAnimated:] +
49 (ECSlidingViewController.m:413) 9 TrendsyiOS
0x00138f66 -[ECSlidingSegue perform] + 264 (ECSlidingSegue.m:51) 10
UIKit 0x03a57203
-[UIStoryboardUnwindSegueTemplate _perform:] + 554 11 UIKit 0x034ce280 -[UIViewController performSegueWithIdentifier:sender:] +
72 12 ??? 0x132d61c4 0 + 321741252 13 ???
0x132d60ec 0 + 321741036 14 ???
0x132a8e79 0 + 321556089 15 ???
0x132b9fe8 0 + 321626088 16 ???
0x12da1c87 0 + 316284039 17 ???
0x10067b6d 0 + 268860269 18 TrendsyiOS
0x00223a74 mono_jit_runtime_invoke + 820 (mini.c:6622) 19 TrendsyiOS
0x002be66f mono_runtime_invoke + 127 (object.c:2827) 20 TrendsyiOS
0x0036980a monotouch_trampoline + 4186
(.monotouch-trampoline-invoke.inc:1) 21 libobjc.A.dylib
0x04f6e874 -[NSObject performSelector:withObject:withObject:] + 77 22
UIKit 0x033ba0c2 -[UIApplication
sendAction:to:from:forEvent:] + 108 23 UIKit
0x033ba04e -[UIApplication sendAction:toTarget:fromSender:forEvent:]
+ 61 24 UIKit 0x034b20c1 -[UIControl sendAction:to:forEvent:] + 66 25 UIKit
0x034b2484 -[UIControl _sendActionsForEvents:withEvent:] + 577 26
UIKit 0x034b1733 -[UIControl
touchesEnded:withEvent:] + 641 27 UIKit
0x033f751d -[UIWindow _sendTouchesForEvent:] + 852 28 UIKit
0x033f8184 -[UIWindow sendEvent:] + 1232 29 UIKit
0x033cbe86 -[UIApplication sendEvent:] + 242 30 UIKit
0x033b618f _UIApplicationHandleEventQueue + 11421 31 CoreFoundation
0x0512b83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
+ 15 32 CoreFoundation 0x0512b1cb __CFRunLoopDoSources0 + 235 33 CoreFoundation 0x0514829e __CFRunLoopRun + 910 34 CoreFoundation
0x05147ac3 CFRunLoopRunSpecific + 467 35 CoreFoundation
0x051478db CFRunLoopRunInMode + 123 36 GraphicsServices
0x066b59e2 GSEventRunModal + 192 37 GraphicsServices
0x066b5809 GSEventRun + 104 38 UIKit
0x033b8d3b UIApplicationMain + 1225 39 ???
0x110efaa8 0 + 286194344 40 ???
0x110edc1c 0 + 286186524 41 ???
0x110ed7f8 0 + 286185464 42 ???
0x110ed937 0 + 286185783 43 TrendsyiOS
0x00223a74 mono_jit_runtime_invoke + 820 (mini.c:6622) 44 TrendsyiOS
0x002be66f mono_runtime_invoke + 127 (object.c:2827) 45 TrendsyiOS
0x002c3eb7 mono_runtime_exec_main + 391 (object.c:4050) 46
TrendsyiOS 0x002c3c84 mono_runtime_run_main + 628
(object.c:3678) 47 TrendsyiOS 0x0018d94d
mono_jit_exec + 93 (driver.g.c:1009) 48 TrendsyiOS
0x0035bdd4 main + 2788 (main.m:489) 49 libdyld.dylib
0x056e3701 start + 1
Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0
libsystem_kernel.dylib 0x0590b992 kevent64 + 10 1
libdispatch.dylib 0x05442f3e _dispatch_mgr_invoke + 238 2
libdispatch.dylib 0x05442c7a _dispatch_mgr_thread + 60
Thread 2: 0 libsystem_kernel.dylib 0x0590aa26 __recvfrom +
10 1 libsystem_sim_c.dylib 0x0550ca9d recv + 54 2
TrendsyiOS 0x0035dfcd recv_uninterrupted + 77
(debug.m:321) 3 TrendsyiOS 0x0035e1fb
monotouch_process_connection + 187 (debug.m:738) 4 TrendsyiOS
0x0035ddd7 monotouch_connect_wifi + 2983 (debug.m:515) 5 TrendsyiOS
0x0035ce9c monotouch_configure_debugging + 2124 (debug.m:269) 6
TrendsyiOS 0x0035a8da -[CocoaThreadInitializer
entryPoint:] + 122 (shared.m:127) 7 Foundation
0x01cbd597 -[NSThread main] + 76 8 Foundation
0x01cbd4f6 __NSThread__main__ + 1275 9 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 10 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 11 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 3: 0 libsystem_kernel.dylib 0x05905fb6
semaphore_wait_trap + 10 1 TrendsyiOS 0x00335c6a
mono_sem_wait + 26 (mono-semaphore.c:121) 2 TrendsyiOS
0x002668c7 finalizer_thread + 103 (gc.c:1078) 3 TrendsyiOS
0x002f60a8 start_wrapper + 376 (threads.c:609) 4 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 5 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 6
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 7 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 8 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 4: 0 libsystem_kernel.dylib 0x0590aa26 __recvfrom +
10 1 libsystem_sim_c.dylib 0x0550ca9d recv + 54 2
TrendsyiOS 0x0035dfcd recv_uninterrupted + 77
(debug.m:321) 3 TrendsyiOS 0x0035e0c4 sdb_recv +
52 (debug.m:337) 4 TrendsyiOS 0x001786eb
debugger_thread + 22427 (debugger-agent.c:1475) 5 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 6 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 7
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 8 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 9 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 10 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 5: 0 libsystem_kernel.dylib 0x0590ab76
__semwait_signal + 10 1 libsystem_sim_c.dylib 0x0550c98b nanosleep + 219 2 libsystem_sim_c.dylib 0x0550c836 usleep +
60 3 TrendsyiOS 0x003628ad monotouch_pump_gc +
61 (monotouch-glue.m:595) 4 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 5 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 6 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 6:: com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib
0x05905f7a mach_msg_trap + 10 1 libsystem_kernel.dylib
0x0590516c mach_msg + 68 2 CoreFoundation
0x05142e49 __CFRunLoopServiceMachPort + 169 3 CoreFoundation
0x051483b1 __CFRunLoopRun + 1185 4 CoreFoundation
0x05147ac3 CFRunLoopRunSpecific + 467 5 CoreFoundation
0x051478db CFRunLoopRunInMode + 123 6 Foundation
0x01c619de +[NSURLConnection(Loader) _resourceLoadLoop:] + 381 7
Foundation 0x01cbd597 -[NSThread main] + 76 8
Foundation 0x01cbd4f6 __NSThread__main__ + 1275 9
libsystem_pthread.dylib 0x058c45fb _pthread_body + 144 10
libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 11
libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 7:: com.apple.CFSocket.private 0 libsystem_kernel.dylib
0x0590aace __select + 10 1 CoreFoundation
0x051863eb __CFSocketManager + 875 2 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 3 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 4 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 8: 0 libsystem_kernel.dylib 0x0590b046
__workq_kernreturn + 10 1 libsystem_pthread.dylib 0x058c5dcf _pthread_wqthread + 372 2 libsystem_pthread.dylib 0x058c9cce start_wqthread + 30
Thread 9:: WebThread 0 libsystem_kernel.dylib 0x05905f7a
mach_msg_trap + 10 1 libsystem_kernel.dylib 0x0590516c
mach_msg + 68 2 CoreFoundation 0x05142e49
__CFRunLoopServiceMachPort + 169 3 CoreFoundation 0x051483b1 __CFRunLoopRun + 1185 4 CoreFoundation
0x05147ac3 CFRunLoopRunSpecific + 467 5 CoreFoundation
0x051478db CFRunLoopRunInMode + 123 6 WebCore
0x0a532f00 RunWebThread(void*) + 608 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 10: 0 libsystem_kernel.dylib 0x05905f7a mach_msg_trap
+ 10 1 libsystem_kernel.dylib 0x0590516c mach_msg + 68 2 CoreFoundation 0x05142e49 __CFRunLoopServiceMachPort +
169 3 CoreFoundation 0x051483b1 __CFRunLoopRun +
1185 4 CoreFoundation 0x05147ac3
CFRunLoopRunSpecific + 467 5 CoreFoundation
0x051478db CFRunLoopRunInMode + 123 6 libAVFAudio.dylib
0x05f8d403 GenericRunLoopThread::Entry(void*) + 189 7
libAVFAudio.dylib 0x05f81882 CAPThread::Entry(CAPThread*)
+ 114 8 libsystem_pthread.dylib 0x058c45fb _pthread_body + 144 9 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130
10 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 11: 0 libsystem_kernel.dylib 0x0590ab76
__semwait_signal + 10 1 libsystem_sim_c.dylib 0x0550c98b nanosleep + 219 2 TrendsyiOS 0x0032ab4a SleepEx
+ 234 (wthreads.c:842) 3 TrendsyiOS 0x002f4e64 monitor_thread + 164 (threadpool.c:779) 4 TrendsyiOS
0x002f60a8 start_wrapper + 376 (threads.c:609) 5 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 6 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 7
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 8 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 9 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 10 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 12: 0 libsystem_kernel.dylib 0x05905fce
semaphore_timedwait_trap + 10 1 TrendsyiOS
0x00335c12 mono_sem_timedwait + 210 (mono-semaphore.c:82) 2
TrendsyiOS 0x002f2c58 async_invoke_thread + 1656
(threadpool.c:1565) 3 TrendsyiOS 0x002f60a8
start_wrapper + 376 (threads.c:609) 4 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 5 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 6
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 7 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 8 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 13: 0 libsystem_kernel.dylib 0x0590aace __select + 10
1 TrendsyiOS 0x003348e1 mono_poll + 401
(mono-poll.c:76) 2 TrendsyiOS 0x002f5313
tp_poll_wait + 291 (tpool-poll.c:186) 3 TrendsyiOS
0x002f60a8 start_wrapper + 376 (threads.c:609) 4 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 5 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 6
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 7 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 8 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 14: 0 libsystem_kernel.dylib 0x05905fce
semaphore_timedwait_trap + 10 1 TrendsyiOS
0x00335c12 mono_sem_timedwait + 210 (mono-semaphore.c:82) 2
TrendsyiOS 0x002f2c58 async_invoke_thread + 1656
(threadpool.c:1565) 3 TrendsyiOS 0x002f60a8
start_wrapper + 376 (threads.c:609) 4 TrendsyiOS
0x0032a2c7 thread_start_routine + 151 (wthreads.c:294) 5 TrendsyiOS
0x00336321 inner_start_thread + 65 (mono-threads-posix.c:49) 6
TrendsyiOS 0x00357b0d GC_start_routine + 93
(pthread_support.c:1502) 7 libsystem_pthread.dylib 0x058c45fb
_pthread_body + 144 8 libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 15:: JavaScriptCore::BlockFree 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x043f5811 JSC::BlockAllocator::blockFreeingThreadMain() + 305 4
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 5 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 6 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 7 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 8 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 16:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 17:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 18:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 19:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 20:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 21:: JavaScriptCore::Marking 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x045238f3 JSC::GCThread::waitForNextPhase() + 147 4 JavaScriptCore
0x04523988 JSC::GCThread::gcThreadStartFunc(void*) + 72 5
JavaScriptCore 0x0473df2c WTF::threadEntryPoint(void*)
+ 76 6 JavaScriptCore 0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 7 libsystem_pthread.dylib
0x058c45fb _pthread_body + 144 8 libsystem_pthread.dylib
0x058c4485 _pthread_start + 130 9 libsystem_pthread.dylib
0x058c9cf2 thread_start + 34
Thread 22:: WebCore: CFNetwork Loader 0 libsystem_kernel.dylib
0x05905f7a mach_msg_trap + 10 1 libsystem_kernel.dylib
0x0590516c mach_msg + 68 2 CoreFoundation
0x05142e49 __CFRunLoopServiceMachPort + 169 3 CoreFoundation
0x051483b1 __CFRunLoopRun + 1185 4 CoreFoundation
0x05147ac3 CFRunLoopRunSpecific + 467 5 CoreFoundation
0x051478db CFRunLoopRunInMode + 123 6 WebCore
0x0a075a78 WebCore::runLoaderThread(void*) + 360 7 JavaScriptCore
0x0473df2c WTF::threadEntryPoint(void*) + 76 8 JavaScriptCore
0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 9
libsystem_pthread.dylib 0x058c45fb _pthread_body + 144 10
libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 11
libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 23: 0 libsystem_kernel.dylib 0x0590b046
__workq_kernreturn + 10 1 libsystem_pthread.dylib 0x058c5dcf _pthread_wqthread + 372 2 libsystem_pthread.dylib 0x058c9cce start_wqthread + 30
Thread 24:: WebCore: LocalStorage 0 libsystem_kernel.dylib
0x0590a7ca __psynch_cvwait + 10 1 libsystem_pthread.dylib
0x058c6d1d _pthread_cond_wait + 728 2 libsystem_pthread.dylib
0x058c8bd9 pthread_cond_wait$UNIX2003 + 71 3 JavaScriptCore
0x0473f483 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 67
4 WebCore 0x0a34d508
WTF::PassOwnPtr<WTF::Function<void ()> >
WTF::MessageQueue<WTF::Function<void ()>
>::waitForMessageFilteredWithTimeout<bool (WTF::Function<void ()>*)>(WTF::MessageQueueWaitResult&, bool (&)(WTF::Function<void
()>*), double) + 120 5 WebCore 0x0a34cb06
WebCore::StorageThread::threadEntryPoint() + 214 6 JavaScriptCore
0x0473df2c WTF::threadEntryPoint(void*) + 76 7 JavaScriptCore
0x0473e425 WTF::wtfThreadEntryPoint(void*) + 21 8
libsystem_pthread.dylib 0x058c45fb _pthread_body + 144 9
libsystem_pthread.dylib 0x058c4485 _pthread_start + 130 10
libsystem_pthread.dylib 0x058c9cf2 thread_start + 34
Thread 25: 0 libsystem_kernel.dylib 0x0590b046
__workq_kernreturn + 10 1 libsystem_pthread.dylib 0x058c5dcf _pthread_wqthread + 372 2 libsystem_pthread.dylib 0x058c9cce start_wqthread + 30
Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000
ebx: 0x00000000 ecx: 0x0511db00 edx: 0x00000000 edi: 0x0511db0e
esi: 0x00000000 ebp: 0xbff18ca8 esp: 0xbff18c90 ss: 0x00000023
efl: 0x00000246 eip: 0x0511db71 cs: 0x0000001b ds: 0x00000023
es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0x7bc9e000
Logical CPU: 2 Error Code: 0x00000000 Trap Number: 3
** LOTS OF CRAP**
External Modification Summary: Calls made by other processes
targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0 Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0 Calls made by all processes on this machine:
task_for_pid: 95275
thread_create: 2
thread_set_state: 655
VM Region Summary: ReadOnly portion of Libraries: Total=219.1M
resident=94.0M(43%) swapped_out_or_unallocated=125.1M(57%) Writable
regions: Total=182.3M written=27.3M(15%) resident=56.4M(31%)
swapped_out=0K(0%) unallocated=125.8M(69%) REGION TYPE
VIRTUAL
=========== ======= CG image 12K CG raster data 1336K CoreAnimation
11.3M CoreServices 424K CoreUI image data 320K Image IO 4440K JS JIT generated code
32.0M JS VM register file 4096K JS garbage collector 2880K Kernel Alloc Once 4K MALLOC
87.6M MALLOC (admin) 48K SQLite page cache 896K Stack 76.5M VM_ALLOCATE
8268K VM_ALLOCATE (reserved) 96K reserved VM
address space (unallocated) WebCore purgeable data 468K
WebKit Malloc 6408K
__DATA 14.6M
__LINKEDIT 51.7M
__PAGEZERO 4K
__TEXT 167.5M
__UNICODE 544K mapped file 337.8M shared memory 4K
=========== ======= TOTAL 808.5M TOTAL, minus reserved VM space 808.4M
This is mostly a guess, but it looks like it's hitting a bug inside Xamarin.iOS where we don't generate the proper binding code for Objective-C blocks when those blocks can be null (this has already been filed as a bug here).
If you had a complete test project I can run I'd be able to confirm this quickly.

help with the following crashDump

If this is not the right forum to ask such question, please point me to the right one.
The app I am working on uses the location of the user and alert the user when certain condition is met. The alert is in form of vibration and a playback of a small file. During testing on the device, the phone vibrates and the audio clip plays for 2 seconds (the clip is about 9 secs long) and the app crashes. The crashes are consistent on the device. On the simulator, occasionally, I see the crashes but not consistent.
The trigger to set off the alert is in the delegate method of CLLocation class
- (void)locationManager:manager didUpdateToLocation:fromLocation:
Here's the code fragment (ivLocMgr is an instance variable)
if ((!ivAlertAlreadyShown) && (<test for trigger condition)) {
ivAlertAlreadyShown = YES;
[self obviousNotification];
[ivLocMgr stopUpdatingLocation];
[ivLocMgr release], ivLocMgr = nil;
}
Can the [ivLocMgr stopUpdatingLocation]; be the root cause?
Any and all help is greatly appreciated.
-S-
Incident Identifier: 8875BB08-4DAD-4FC7-8DC6-AA5D52D6FC78
CrashReporter Key: f995a257bad99baa2fcf0f7d5b0ab3e77dce3a91
Hardware Model: iPhone2,1
Process: SAlert [360]
Path: /var/mobile/Applications/D3B5BAED-036C-4CFE-A735-A61D6ECCDAF6/SAlert.app/SpAlert
Identifier: SAlert
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-08-30 07:35:41.206 -0700
OS Version: iPhone OS 4.2.1 (8C148a)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x46924508
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3199f464 objc_msgSend + 16
1 CoreLocation 0x30e1f430 -[CLLocationManager onClientEventLocation:] + 560
2 CoreLocation 0x30e1d68e -[CLLocationManager onClientEvent:supportInfo:] + 98
3 CoreLocation 0x30e1d804 OnClientEvent + 16
4 CoreLocation 0x30e19522 CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 42
5 CoreLocation 0x30e1b3cc CLClientHandleDaemonDataLocation(__CLClient*, CLClientLocation const*, __CFDictionary const*) + 196
6 CoreLocation 0x30e1b512 CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 286
7 CoreFoundation 0x314913fe __CFMessagePortPerform + 242
8 CoreFoundation 0x314656f8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
9 CoreFoundation 0x314656bc __CFRunLoopDoSource1 + 160
10 CoreFoundation 0x31457f76 __CFRunLoopRun + 514
11 CoreFoundation 0x31457c80 CFRunLoopRunSpecific + 224
12 CoreFoundation 0x31457b88 CFRunLoopRunInMode + 52
13 GraphicsServices 0x35d664a4 GSEventRunModal + 108
14 GraphicsServices 0x35d66550 GSEventRun + 56
15 UIKit 0x338d5322 -[UIApplication _run] + 406
16 UIKit 0x338d2e8c UIApplicationMain + 664
17 StopAlert 0x00002f76 0x1000 + 8054
18 StopAlert 0x00002f40 0x1000 + 8000
Thread 1:
0 libSystem.B.dylib 0x31192974 kevent + 24
1 libSystem.B.dylib 0x3123c704 _dispatch_mgr_invoke + 88
2 libSystem.B.dylib 0x3123c174 _dispatch_queue_invoke + 96
3 libSystem.B.dylib 0x3123bb98 _dispatch_worker_thread2 + 120
4 libSystem.B.dylib 0x311e024a _pthread_wqthread + 258
5 libSystem.B.dylib 0x311d8970 start_wqthread + 0
Thread 2:
0 libSystem.B.dylib 0x31166268 mach_msg_trap + 20
1 libSystem.B.dylib 0x31168354 mach_msg + 44
2 CoreFoundation 0x31458648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x31457ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x31457c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x31457b88 CFRunLoopRunInMode + 52
6 WebCore 0x33d9f124 RunWebThread(void*) + 332
7 libSystem.B.dylib 0x311df886 _pthread_start + 242
8 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 3:
0 libSystem.B.dylib 0x31166268 mach_msg_trap + 20
1 libSystem.B.dylib 0x31168354 mach_msg + 44
2 CoreFoundation 0x31458648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x31457ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x31457c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x31457b88 CFRunLoopRunInMode + 52
6 Foundation 0x31cf15f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7 Foundation 0x31ccf192 -[NSThread main] + 38
8 Foundation 0x31cc8242 __NSThread__main__ + 966
9 libSystem.B.dylib 0x311df886 _pthread_start + 242
10 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 4:
0 libSystem.B.dylib 0x3118a68c select$DARWIN_EXTSN + 20
1 CoreFoundation 0x3148f662 __CFSocketManager + 582
2 libSystem.B.dylib 0x311df886 _pthread_start + 242
3 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 5:
0 libSystem.B.dylib 0x31166268 mach_msg_trap + 20
1 libSystem.B.dylib 0x31168354 mach_msg + 44
2 CoreFoundation 0x31458648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x31457ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x31457c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x31457b88 CFRunLoopRunInMode + 52
6 MapKit 0x347a2906 TileCachePrivate::runCacheThread() + 274
7 MapKit 0x347a27ea _runCacheThread(void*) + 2
8 libSystem.B.dylib 0x311df886 _pthread_start + 242
9 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 6:
0 libSystem.B.dylib 0x311de9f0 __semwait_signal + 24
1 libSystem.B.dylib 0x311937ec _pthread_cond_wait + 748
2 libSystem.B.dylib 0x311933d2 pthread_cond_wait + 26
3 QuartzCore 0x30a925dc CA::DispatchGroup::thread(void*) + 84
4 QuartzCore 0x30a5f01a thread_fun + 10
5 libSystem.B.dylib 0x311df886 _pthread_start + 242
6 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 7:
0 libSystem.B.dylib 0x31166268 mach_msg_trap + 20
1 libSystem.B.dylib 0x31168354 mach_msg + 44
2 libSystem.B.dylib 0x3118af5a thread_policy + 118
3 libSystem.B.dylib 0x3118aed2 pthread_setschedparam_internal + 62
4 libSystem.B.dylib 0x3118ae0e pthread_setschedparam + 70
5 TextInput 0x31e8128a KB::kb_set_thread_priority(int) + 18
6 TextInput 0x31e71f74 KB::BackgroundLoad(void*) + 84
7 libSystem.B.dylib 0x311df886 _pthread_start + 242
8 libSystem.B.dylib 0x311d4a88 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x0403000f r1: 0x33baf8ef r2: 0x30e4bff6 r3: 0x00000001
r4: 0x46924500 r5: 0x30e1d7f5 r6: 0x00a01c64 r7: 0x2fdfec44
r8: 0x00000000 r9: 0x040fc098 r10: 0x00000000 r11: 0x00000000
ip: 0x3e16c584 sp: 0x2fdfeaa0 lr: 0x30e1f437 pc: 0x3199f464
cpsr: 0x200f0030
Found the answer on Apple Developers' Forum:
I needed to set the coreLocation instance's delegate to nil, when the alarm was triggered.
There isn't enough code there to properly determine the cause of the abort. The error you are getting is telling you that you are trying to access a variable that has already been released. I would start there and make sure you haven't released your location manager or some other variable there.

Resources