Bug 33348 - CFXNotificationPost crash
Summary: CFXNotificationPost crash
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-24 21:54 UTC by Duncan Murray
Modified: 2016-06-09 01:14 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Duncan Murray 2015-08-24 21:54:33 UTC
We are getting a random and infrequent crash which seems to happen very early in our Apps lifecycle or not at all.
An exception is being thrown when calling out to an observer that is being notified of a change in device orientation.
Our app is restricted to Landscape Left/Right and didn't seem to be in a situation where device orientation would change.

From googling it appears that this is likely to be caused by an observer being deleted but not unregistered. 
As we do not explicitly setup any observers on this event we are at a loss to know what to try next.
We are using Xamarin Forms and have only observed the crash in Release.

We would like to know if this may be related to a known issue. This is the last remaining crash in an otherwise stable App ready for Beta release.


This is the stack trace provided by Crittercism.

BimMobileAppiOS 0x01074d8c Xamarin_Forms_Platform_iOS_Platform__c__DisplayClass1a___ctorb__9_Foundation_NSNotification + 108
1	
BimMobileAppiOS 0x00238438 Foundation_InternalNSNotificationHandler_Post_Foundation_NSNotification + 50
2	
BimMobileAppiOS 0x00545dac wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
3	
BimMobileAppiOS 0x0117b8f7 mono_jit_runtime_invoke (mini.c:6672)
4	
BimMobileAppiOS 0x011c8249 mono_runtime_invoke (object.c:2862)
5	
BimMobileAppiOS 0x010b8039 native_to_managed_trampoline_11 (registrar.m:337)
6	
BimMobileAppiOS 0x010bc781 -[Foundation_InternalNSNotificationHandler post:] (registrar.m:2622)
7	
CoreFoundation 0x25b4b0c5 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 10
8	
CoreFoundation 0x25aa4cbd _CFXNotificationPost + 1798
9	
Foundation 0x268073a1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 74
10	
UIKit 0x291f446d -[UIDevice setOrientation:animated:] + 314
11	
UIKit 0x291f4223 -[UIApplication handleEvent:withNewEvent:] + 1588
12	
UIKit 0x291f3b29 -[UIApplication sendEvent:] + 70
13	
UIKit 0x29259875 _UIApplicationHandleEvent + 630
14	
GraphicsServices 0x2d43c773 _PurpleEventCallback + 524
15	
GraphicsServices 0x2d43c3bf PurpleEventCallback + 32
16	
CoreFoundation 0x25b58a4b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
17	
CoreFoundation 0x25b589e7 __CFRunLoopDoSource1 + 344
18	
CoreFoundation 0x25b57009 __CFRunLoopRun + 1606
19	
CoreFoundation 0x25aa29a1 CFRunLoopRunSpecific + 474
20	
CoreFoundation 0x25aa27b3 CFRunLoopRunInMode + 104
21	
Foundation 0x2680cdc1 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 262
22	
Foundation 0x26829bff -[NSRunLoop(NSRunLoop) runUntilDate:] + 84
23	
BimMobileAppiOS 0x002e1a5c wrapper_managed_to_native_ObjCRuntime_Messaging_void_objc_msgSend_IntPtr_intptr_intptr_intptr + 106
24	
BimMobileAppiOS 0x00239cf4 Foundation_NSRunLoop_RunUntil_Foundation_NSDate + 110
25	
BimMobileAppiOS 0x010b55dc CrittercismIOS_Crittercism_LogUnhandledException_System_Exception + 162
26	
BimMobileAppiOS 0x010b5af4 CrittercismIOS_Crittercism__Initm__0_object_System_UnhandledExceptionEventArgs + 90
27	
BimMobileAppiOS 0x00545dac wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
28	
BimMobileAppiOS 0x0117b8f7 mono_jit_runtime_invoke (mini.c:6672)
29	
BimMobileAppiOS 0x011c8249 mono_runtime_invoke (object.c:2862)
30	
BimMobileAppiOS 0x011cb3b3 mono_runtime_delegate_invoke (object.c:3573)
31	
BimMobileAppiOS 0x011cbea5 call_unhandled_exception_delegate (object.c:3938)
32	
BimMobileAppiOS 0x011cbc0d mono_unhandled_exception (object.c:4025)
33	
BimMobileAppiOS 0x0116f02b mono_handle_exception_internal (mini-exceptions.c:1677)
34	
BimMobileAppiOS 0x0116e55b mono_handle_exception (mini-exceptions.c:1961)
35	
BimMobileAppiOS 0x01168909 handle_signal_exception (exceptions-arm.c:517)
36	
BimMobileAppiOS 0x01074d88 Xamarin_Forms_Platform_iOS_Platform__c__DisplayClass1a___ctorb__9_Foundation_NSNotification + 102
37	
BimMobileAppiOS 0x00238438 Foundation_InternalNSNotificationHandler_Post_Foundation_NSNotification + 50
38	
BimMobileAppiOS 0x00545dac wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
39	
BimMobileAppiOS 0x0117b8f7 mono_jit_runtime_invoke (mini.c:6672)
40	
BimMobileAppiOS 0x011c8249 mono_runtime_invoke (object.c:2862)
41	
BimMobileAppiOS 0x010b8039 native_to_managed_trampoline_11 (registrar.m:337)
42	
BimMobileAppiOS 0x010bc781 -[Foundation_InternalNSNotificationHandler post:] (registrar.m:2622)
43	
CoreFoundation 0x25b4b0c5 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 10
44	
CoreFoundation 0x25aa4cbd _CFXNotificationPost + 1798
45	
Foundation 0x268073a1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 74
46	
UIKit 0x291f446d -[UIDevice setOrientation:animated:] + 314
47	
UIKit 0x291f4223 -[UIApplication handleEvent:withNewEvent:] + 1588
48	
UIKit 0x291f3b29 -[UIApplication sendEvent:] + 70
49	
UIKit 0x29259875 _UIApplicationHandleEvent + 630
50	
GraphicsServices 0x2d43c773 _PurpleEventCallback + 524
51	
GraphicsServices 0x2d43c3bf PurpleEventCallback + 32
52	
CoreFoundation 0x25b58a4b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
53	
CoreFoundation 0x25b589e7 __CFRunLoopDoSource1 + 344
54	
CoreFoundation 0x25b57009 __CFRunLoopRun + 1606
55	
CoreFoundation 0x25aa29a1 CFRunLoopRunSpecific + 474
56	
CoreFoundation 0x25aa27b3 CFRunLoopRunInMode + 104
57	
GraphicsServices 0x2d43b1a9 GSEventRunModal + 134
58	
UIKit 0x29253635 UIApplicationMain + 1438
59	
BimMobileAppiOS 0x002ecbb8 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 270
60	
BimMobileAppiOS 0x00267f64 UIKit_UIApplication_Main_string___intptr_intptr + 50
61	
BimMobileAppiOS 0x00267f24 UIKit_UIApplication_Main_string___string_string + 202
62	
BimMobileAppiOS 0x0020c500 BimMobileApp_Ios_Application_Main_string__ + 46
63	
BimMobileAppiOS 0x00545dac wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
64	
BimMobileAppiOS 0x0117b8f7 mono_jit_runtime_invoke (mini.c:6672)
65	
BimMobileAppiOS 0x011c8249 mono_runtime_invoke (object.c:2862)
66	
BimMobileAppiOS 0x011cb983 mono_runtime_exec_main (object.c:4119)
67	
BimMobileAppiOS 0x011cb7c5 mono_runtime_run_main (object.c:3745)
68	
BimMobileAppiOS 0x01165c69 mono_jit_exec (driver.g.c:1011)
69	
BimMobileAppiOS 0x0122aee4 xamarin_main (monotouch-main.m:399)
70	
BimMobileAppiOS 0x010c92c5 main (main.armv7.m:98)
71	
libdyld.dylib 0x34898aaf start + 0
Comment 1 Sebastien Pouliot 2015-08-26 20:33:43 UTC
This is not a known issue in XI.

Can you get us a symbolication crash report (from Xcode) ? that would provide more useful details about the crash.

Or better if you can supply a test case so we can directly see the issue.

Also are you really using XI 8.4 (it's kind of old now) ? If not can you post the correct version information [1] ?


[1] T he easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
Comment 2 Duncan Murray 2015-08-26 20:41:13 UTC
We have only seen the crash when running on an App installed through TestFlight and the report captured with Crittercism. If there is any extra information we can extract from the report let me know.

That was the incorrect version number, the full details are as follows:

=== Xamarin Studio ===

Version 5.9.5 (build 10)
Installation UUID: 161b30b3-1942-41df-9665-aa59b281bd3b
Runtime:
	Mono 4.0.3 ((detached/d6946b4)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400030020

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.iOS ===

Version: 8.10.4.46 (Enterprise Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

=== Xamarin.Android ===

Version: 5.1.5.3 (Enterprise Edition)
Android SDK: /Users/dmurray/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:55:24-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a

=== Operating System ===

Mac OS X 10.10.5
Darwin Duncans-Mac-mini.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 3 Sebastien Pouliot 2016-06-09 01:14:36 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!