Bug 40155 - Project compiles but won't run on device
Summary: Project compiles but won't run on device
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-04-06 13:04 UTC by david
Modified: 2016-04-08 01:37 UTC (History)
3 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 ANSWERED

Description david 2016-04-06 13:04:19 UTC
App compiles well with Alpha 6 of Xamarin Studio (on Mac).

However it fails to launch the debugger on my iPhone 5S (iOS 9.3.1), and when I start the app by tapping on it, it crashes. It runs fine on the simulator.

Stack trace:

2016-04-06 22:55:06.730 MyApp.iOS[470:165925] critical: Stacktrace:

2016-04-06 22:55:06.731 MyApp.iOS[470:165925] critical:   at <unknown> <0xffffffff>
2016-04-06 22:55:06.735 MyApp.iOS[470:165925] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
2016-04-06 22:55:06.738 MyApp.iOS[470:165925] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/2097/b5396c29/source/maccore/src/UIKit/UIApplication.cs:74
2016-04-06 22:55:06.739 MyApp.iOS[470:165925] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x0001c] in /Users/builder/data/lanes/2097/b5396c29/source/maccore/src/UIKit/UIApplication.cs:57
2016-04-06 22:55:06.739 MyApp.iOS[470:165925] critical:   at MyApp.iOS.Application.Main (string[]) [0x00013] in /Users/davidd/Documents/Projects/Programmation/OpenSource/MyApp/iOS/Main.cs:17
2016-04-06 22:55:06.741 MyApp.iOS[470:165925] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
2016-04-06 22:55:06.741 MyApp.iOS[470:165925] critical: 
Native stacktrace:

2016-04-06 22:55:07.290 MyApp.iOS[470:165925] critical: 	0   MyApp.iOS                          0x03020dc5 mono_handle_native_sigsegv + 240
2016-04-06 22:55:07.291 MyApp.iOS[470:165925] critical: 	1   MyApp.iOS                          0x03027a4d mono_sigsegv_signal_handler + 212
2016-04-06 22:55:07.291 MyApp.iOS[470:165925] critical: 	2   libsystem_platform.dylib            0x2555d85f _sigtramp + 42
2016-04-06 22:55:07.291 MyApp.iOS[470:165925] critical: 	3   MyApp.iOS                          0x0023aabc System_Collections_Generic_InternalStringComparer_GetHashCode_string + 56
2016-04-06 22:55:07.291 MyApp.iOS[470:165925] critical: 	4   MyApp.iOS                          0x0062c4e8 System_Collections_Generic_Dictionary_2_TKey_REF_TValue_INT_FindEntry_TKey_REF + 112
2016-04-06 22:55:07.291 MyApp.iOS[470:165925] critical: 	5   MyApp.iOS                          0x0062d5b0 System_Collections_Generic_Dictionary_2_TKey_REF_TValue_INT_TryGetValue_TKey_REF_TValue_INT_ + 68
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	6   MyApp.iOS                          0x01ae0afc Registrar_Registrar_ToSignature_System_Type_Registrar_Registrar_ObjCMember_bool__bool + 832
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	7   MyApp.iOS                          0x01ae0040 Registrar_Registrar_ComputeSignature_System_Type_System_Reflection_MethodBase_Registrar_Registrar_ObjCMember_bool + 396
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	8   MyApp.iOS                          0x01ae3cf0 Registrar_Registrar_ObjCMethod_ComputeSignature + 104
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	9   MyApp.iOS                          0x01ae3c20 Registrar_Registrar_ObjCMethod_ValidateSignature_System_Collections_Generic_List_1_System_Exception_ + 104
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	10  MyApp.iOS                          0x01ae229c Registrar_Registrar_ObjCType_Add_Registrar_Registrar_ObjCMethod_System_Collections_Generic_List_1_System_Exception_ + 160
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	11  MyApp.iOS                          0x01adf544 Registrar_Registrar_RegisterTypeUnsafe_System_Type_System_Collections_Generic_List_1_System_Exception_ + 11540
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	12  MyApp.iOS                          0x01adcc18 Registrar_Registrar_RegisterTypeUnsafe_System_Type_System_Collections_Generic_List_1_System_Exception_ + 1000
2016-04-06 22:55:07.292 MyApp.iOS[470:165925] critical: 	13  MyApp.iOS                          0x01adad60 Registrar_Registrar_RegisterType_System_Type + 164
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	14  MyApp.iOS                          0x01ad1890 Registrar_DynamicRegistrar_Lookup_intptr_bool + 172
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	15  MyApp.iOS                          0x019c4abc ObjCRuntime_Class_Lookup_intptr_bool + 84
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	16  MyApp.iOS                          0x019c4a5c ObjCRuntime_Class_Lookup_intptr + 32
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	17  MyApp.iOS                          0x018c50c4 ObjCRuntime_Runtime_GetNSObject_intptr_System_Type_ObjCRuntime_Runtime_MissingCtorResolution_bool_bool_ + 192
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	18  MyApp.iOS                          0x018c2f14 ObjCRuntime_Runtime_GetNSObjectWithType_intptr_intptr_bool_ + 124
2016-04-06 22:55:07.293 MyApp.iOS[470:165925] critical: 	19  MyApp.iOS                          0x018c0cc4 ObjCRuntime_Runtime_get_nsobject_with_type_intptr_intptr_bool_ + 44
2016-04-06 22:55:07.294 MyApp.iOS[470:165925] critical: 	20  MyApp.iOS                          0x022d3d34 wrapper_native_to_managed_ObjCRuntime_Runtime_get_nsobject_with_type_intptr_intptr_int_ + 124
2016-04-06 22:55:07.294 MyApp.iOS[470:165925] critical: 	21  MyApp.iOS                          0x030f9808 xamarin_get_nsobject_with_type + 76
2016-04-06 22:55:07.294 MyApp.iOS[470:165925] critical: 	22  MyApp.iOS                          0x030f9bdc xamarin_get_nsobject_with_type_for_ptr_created + 256
2016-04-06 22:55:07.294 MyApp.iOS[470:165925] critical: 	23  MyApp.iOS                          0x02fc2085 _ZL31native_to_managed_trampoline_20P11objc_objectP13objc_selectorPP11_MonoMethodS0_S0_PKcS7_S7_S7_ + 204
2016-04-06 22:55:07.294 MyApp.iOS[470:165925] critical: 	24  MyApp.iOS                          0x02fc1fb1 -[Xamarin_Forms_Platform_iOS_FormsApplicationDelegate application:willFinishLaunchingWithOptions:] + 100
2016-04-06 22:55:07.295 MyApp.iOS[470:165925] critical: 	25  UIKit                               0x29e7385d <redacted> + 232
2016-04-06 22:55:07.295 MyApp.iOS[470:165925] critical: 	26  UIKit                               0x2a09d0bf <redacted> + 3086
2016-04-06 22:55:07.295 MyApp.iOS[470:165925] critical: 	27  UIKit                               0x2a0a1079 <redacted> + 1588
2016-04-06 22:55:07.295 MyApp.iOS[470:165925] critical: 	28  UIKit                               0x2a0b5649 <redacted> + 36
2016-04-06 22:55:07.296 MyApp.iOS[470:165925] critical: 	29  UIKit                               0x2a09e59f <redacted> + 134
2016-04-06 22:55:07.296 MyApp.iOS[470:165925] critical: 	30  FrontBoardServices                  0x26efbbf7 <redacted> + 18
2016-04-06 22:55:07.296 MyApp.iOS[470:165925] critical: 	31  FrontBoardServices                  0x26efbaa7 <redacted> + 226
2016-04-06 22:55:07.296 MyApp.iOS[470:165925] critical: 	32  FrontBoardServices                  0x26efbda5 <redacted> + 44
2016-04-06 22:55:07.296 MyApp.iOS[470:165925] critical: 	33  CoreFoundation                      0x257efa67 <redacted> + 14
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	34  CoreFoundation                      0x257ef657 <redacted> + 454
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	35  CoreFoundation                      0x257ed9bf <redacted> + 806
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	36  CoreFoundation                      0x2573c289 CFRunLoopRunSpecific + 516
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	37  CoreFoundation                      0x2573c07d CFRunLoopRunInMode + 108
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	38  UIKit                               0x29e6cdc7 <redacted> + 526
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	39  UIKit                               0x29e672c5 UIApplicationMain + 144
2016-04-06 22:55:07.297 MyApp.iOS[470:165925] critical: 	40  MyApp.iOS                          0x022d1abc wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
2016-04-06 22:55:07.298 MyApp.iOS[470:165925] critical: 	41  MyApp.iOS                          0x01ba742c UIKit_UIApplication_Main_string___intptr_intptr + 52
2016-04-06 22:55:07.298 MyApp.iOS[470:165925] critical: 	42  MyApp.iOS                          0x01ba72d0 UIKit_UIApplication_Main_string___string_string + 204
2016-04-06 22:55:07.298 MyApp.iOS[470:165925] critical: 	43  MyApp.iOS                          0x0018fa38 MyApp_iOS_Application_Main_string__ + 264
2016-04-06 22:55:07.298 MyApp.iOS[470:165925] critical: 	44  MyApp.iOS                          0x006854f8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 256
2016-04-06 22:55:07.298 MyApp.iOS[470:165925] critical: 	45  MyApp.iOS                          0x0302a093 mono_jit_runtime_invoke + 1150
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	46  MyApp.iOS                          0x0307a551 mono_runtime_invoke + 88
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	47  MyApp.iOS                          0x0307dc13 mono_runtime_exec_main + 282
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	48  MyApp.iOS                          0x0307da5d mono_runtime_run_main + 460
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	49  MyApp.iOS                          0x03017465 mono_jit_exec + 48
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	50  MyApp.iOS                          0x03113a54 xamarin_main + 2072
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	51  MyApp.iOS                          0x02ff7fd9 main + 112
2016-04-06 22:55:07.299 MyApp.iOS[470:165925] critical: 	52  libdyld.dylib                       0x253e8873 <redacted> + 2
2016-04-06 22:55:07.300 MyApp.iOS[470:165925] critical: 
=================================================================
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.
=================================================================
Comment 1 Sebastien Pouliot 2016-04-06 17:32:15 UTC
> ObjCRuntime_Runtime_GetNSObject_intptr_System_Type_ObjCRuntime_Runtime_MissingCtorResolution_bool_bool_

That makes it sounds like something is missing (used thru reflection ?) so you might want to see if you can duplicate this by

a. enabling the linker on the simulator (default is "Don't link"); and

b. disabling the linker on the device (default is "Link SDK").

That along with the symbolicated crash report (from Xcode) might provide enough information to find what's going on.

If not then we'll need a self-contained* test case that shows the issue.

* This seems to happens quite close to the start so it should be reproducible with a small subset of the application.
Comment 2 david 2016-04-07 23:40:15 UTC
OK, some progress. 

I took some time yesterday to install Xcode 7.3 (the problem occurred with 7.2.1) and after that the Xamarin Studio 6 was able to create an app that would run on my device.

There are other problems with Xamarin Studio now, but at least I can run the app on my phone.

Closing.
Comment 3 Sebastien Pouliot 2016-04-08 01:37:02 UTC
It's possible that some stale build artefact was not recompiled correctly after the update. Do you recall if you tried a Clean after the error ?

If it's something you can duplicate again please let us know. Using Xcode 7.2.x should still be possible (even if Apple submission requires using the latest stable, it's generally a _soft_ requirement).

Thanks for the update!