Crash in MetalContext with Xamarin - xamarin.ios

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

Related

WebKitLegacy - [_WebSafeForwarder forwardInvocation:] application crash in iOS10.0.1

I am getting the following crash only in iOS10.0.1. Its not giving me enough stack trace information. The only clue I have is , seems to be happening from WebView.Because it says "WebKitLegacy - [_WebSafeForwarder forwardInvocation:] ".
The crash log is given below. I have another crash group related to "updateSubviewsOfScrollContentViews" seems like all are related.
Any suggestions on this very helpful. Like how to debug this issue ? Where might be the problem?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0xcec18beb8
Crashed Thread: 0
Application Specific Information:
objc_msgSend() selector name: addObject:
Thread 0 Crashed:
0 libobjc.A.dylib 0x000000018d9fef30 objc_msgSend + 16
1 UIKit 0x000000019502abd8 updateSubviewsOfScrollContentViews + 184
2 UIKit 0x000000019502acdc updateSubviewsOfScrollContentViews + 444
3 UIKit 0x000000019502acdc updateSubviewsOfScrollContentViews + 444
4 UIKit 0x000000019502acdc updateSubviewsOfScrollContentViews + 444
5 UIKit 0x000000019502acdc updateSubviewsOfScrollContentViews + 444
6 UIKit 0x000000019502aad0 -[UIWebBrowserView _collectAdditionalSubviews] + 380
7 UIKit 0x000000019502a924 -[UIWebDocumentView _updateSubviewCaches] + 52
8 UIKit 0x000000019500d268 -[UIWebDocumentView webViewDidCommitCompositingLayerChanges:] + 44
9 UIKit 0x000000019500cf80 -[UIWebBrowserView webViewDidCommitCompositingLayerChanges:] + 80
10 CoreFoundation 0x000000018efba160 __invoking___ + 140
11 CoreFoundation 0x000000018eeadc3c -[NSInvocation invoke] + 280
12 CoreFoundation 0x000000018eeb26ec -[NSInvocation invokeWithTarget:] + 56
13 WebKitLegacy 0x0000000194ae77f8 -[_WebSafeForwarder forwardInvocation:] + 152
14 libdispatch.dylib 0x000000018de3d200 _dispatch_call_block_and_release + 20
15 libdispatch.dylib 0x000000018de3d1c0 _dispatch_client_callout + 12
16 libdispatch.dylib 0x000000018de41d6c _dispatch_main_queue_callback_4CF + 996
17 CoreFoundation 0x000000018ef61f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
18 CoreFoundation 0x000000018ef5fb18 __CFRunLoopRun + 1656
19 CoreFoundation 0x000000018ee8e048 CFRunLoopRunSpecific + 440
20 GraphicsServices 0x0000000190911198 GSEventRunModal + 176
21 UIKit 0x0000000194e67818 -[UIApplication _run] + 680
22 UIKit 0x0000000194e62550 UIApplicationMain + 204
23 Essentials 0x00000001000f5f08 main (main.m:52)
24 ??? 0x000000018de705b8 0x0 + 0enter code here

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.

Google Maps SDK for iOS crashing on startup using Monotouch bindings

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.

MonoTouch RedLaser SDK Object

I am trying to use the RedLaser SDK 3.30 with MonoTouch. Here is the code I am using:
https://github.com/mono/monotouch-bindings/tree/master/RedLaser
When I click the thunderbolt button to scan a barcode, my app crashes on my iPod touch. I am using ARM7. Here is my crash log:
wait_fences: failed to receive reply: 10004003
0 RedLaserSample 0x01669015 mono_handle_native_sigsegv + 244
1 RedLaserSample 0x01681cf1 sigabrt_signal_handler + 112
2 libsystem_c.dylib 0x309cf7ed _sigtramp + 48
3 libsystem_c.dylib 0x309c520f pthread_kill + 54
4 libsystem_c.dylib 0x309be29f abort + 94
5 libc++abi.dylib 0x367cef6b abort_message + 46
6 libc++abi.dylib 0x367cc34d _ZL17default_terminatev + 24
7 libobjc.A.dylib 0x3414036f _objc_terminate + 170
8 libc++abi.dylib 0x367cc3c5 _ZL19safe_handler_callerPFvvE + 76
9 libc++abi.dylib 0x367cc451 _ZdlPv + 0
10 libc++abi.dylib 0x367cd79f __cxa_throw + 122
11 RedLaserSample 0x00040565 _ZN5zxing6qrcode19FinderPatternFinder18selectBestPatternsEv + 172
12 RedLaserSample 0x000416a5 _ZN5zxing6qrcode19FinderPatternFinder4findERKNS_11DecodeHintsE + 512
13 RedLaserSample 0x0003a8b3 _ZN5zxing6qrcode8Detector6detectERKNS_11DecodeHintsE + 366
14 RedLaserSample 0x00046c53 _ZN5zxing6qrcode12QRCodeReader6decodeENS_3RefINS_12BinaryBitmapEEENS_11DecodeHintsE + 130
15 RedLaserSample 0x0004edcb _ZN5zxing6Reader6decodeENS_3RefINS_12BinaryBitmapEEE + 458
16 RedLaserSample 0x00055be9 -[FormatReader decode:] + 116
17 RedLaserSample 0x00013749 -[ZXingDecoder findCodesInBitmap:bytesPerRow:width:height:] + 656
18 RedLaserSample 0x0005b6df -[BarcodePhotoEngine zxingFindBarcodesInPixmap:] + 222
19 RedLaserSample 0x00053551 __38-[BarcodeEngine findBarcodesInPixMap:]_block_invoke_066 + 76
20 libdispatch.dylib 0x35737c59 _dispatch_call_block_and_release + 12
21 libdispatch.dylib 0x35742cab _dispatch_queue_drain + 274
22 libdispatch.dylib 0x35742b19 _dispatch_queue_invoke$VARIANT$up + 36
23 libdispatch.dylib 0x3574378b _dispatch_worker_thread2 + 214
24 libsystem_c.dylib 0x30980dfb _pthread_wqthread + 294
25 libsystem_c.dylib 0x30980cd0 start_wqthread + 8
In the current SDK, version 3.3, there is an issue with QR Codes. When the app starts, click the QR code button and it says no. It scans normal now.

wsdl2objc is not working with iphone SDK 4.2

We had a project using wsdl2objc to generate webclient for iphone application. The app was working fine with SDK 3.2, till lately we tried to test it with the new Xcode (SDK 4.2) and it throws strange EXC_BAD_ACCESS directly after sending an asynchronous request and surely never getting a response. Here is the stack trace:
0 libsystem_c.dylib 0x3452a200 OSAtomicAdd32 + 0
1 Foundation 0x30c317a4 -[NSOperation release] + 24
2 CoreFoundation 0x343df19a CFRelease + 62
3 CoreFoundation 0x343e1eb4 _CFAutoreleasePoolPop + 140
4 Foundation 0x30c211c4 -[NSAutoreleasePool release] + 92
5 UIKit 0x34b70f08 _UIApplicationHandleEvent + 5784
6 GraphicsServices 0x31884e70 PurpleEventCallback + 660
7 CoreFoundation 0x34451a90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
8 CoreFoundation 0x34453838 __CFRunLoopDoSource1 + 160
9 CoreFoundation 0x34454606 __CFRunLoopRun + 514
10 CoreFoundation 0x343e4ebc CFRunLoopRunSpecific + 224
11 CoreFoundation 0x343e4dc4 CFRunLoopRunInMode + 52
12 GraphicsServices 0x31884418 GSEventRunModal + 108
13 GraphicsServices 0x318844c4 GSEventRun + 56
14 UIKit 0x34b9bd62 -[UIApplication _run] + 398
15 UIKit 0x34b99800 UIApplicationMain + 664
16 FFMobile 0x00002ed4 0x1000 + 7892
17 FFMobile 0x00002e88 0x1000 + 7816
I know it has to be something about releasing NSOperation. But I could not go any further. Does anybody know if the NSOperation is changed since SDK 4.0? Did anybody successfully test wsdl2objc with SDK 4.0?
EDIT: The WSDL that I use is here.

Resources