Bug 4858 - Error MT4105: The registrar cannot marshal the parameter of type `MonoTouch.Foundation.NSAction` in signature for method `BrainloopMobile.MainController.DismissViewController`. (MT4105)
Summary: Error MT4105: The registrar cannot marshal the parameter of type `MonoTouch.F...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-03 09:32 UTC by René Ruppert
Modified: 2012-05-04 17:10 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 FIXED

Description René Ruppert 2012-05-03 09:32:53 UTC
Trying MT 5.3.3 and I get

Error MT4105: The registrar cannot marshal the parameter of type `MonoTouch.Foundation.NSAction` in signature for method `BrainloopMobile.MainController.DismissViewController`. (MT4105) (BrainloopMobile)

when building my app.

Adding --noregistrar as additional MTOUCH arguments fixes it.
Comment 1 René Ruppert 2012-05-03 09:35:05 UTC
Update: the build works, but running it on the device (!) fails at startup:


> 
May  3 15:34:00 unknown kernel[0] <Debug>: launchd[9422] Builtin profile: container (sandbox)
May  3 15:34:00 unknown kernel[0] <Debug>: launchd[9422] Container: /private/var/mobile/Applications/B8B7FCB2-609F-425B-B6E8-4792FF60FA74 [69] (sandbox)
> 
May  3 15:34:02 unknown BrainloopBrowser[9422] <Warning>: Could not load 'monotouch' for registration. This could be due to an outdated assembly kept by the simulator, location: /private/var/mobile/Applications/B8B7FCB2-609F-425B-B6E8-4792FF60FA74/_BrainloopMobile.app/monotouch.dll
> 
May  3 15:34:03 unknown BrainloopBrowser[9422] <Warning>: 15:34:03.343 [DEBG]: Monotouch Version: 5.3.3
May  3 15:34:03 unknown BrainloopBrowser[9422] <Warning>: 15:34:03.350 [TRAC]: AppDelegateBase::FinishedLaunching()
May  3 15:34:03 unknown BrainloopBrowser[9422] <Warning>: UNHANDLED EXCEPTION CAUGHT
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for BrainloopMobile.UIHelpers ---> System.InvalidCastException: Cannot cast from source type to destination type.
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at MonoTouch.UIKit.UIColor.FromRGBA (Single red, Single green, Single blue, Single alpha) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIColor.g.cs:127 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at MonoTouch.UIKit.UIColor.FromRGB (Byte red, Byte green, Byte blue) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIColor.cs:25 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at MonoTouch.UIKit.UIColor.FromRGB (Int32 red, Int32 green, Int32 blue) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIColor.cs:30 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at BrainloopMobile.UIHelpers..cctor () [0x00000] in <filename unknown>:0 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   --- End of inner exception stack trace ---
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at BrainloopMobile.AppDelegateBase.FinishedLaunching (MonoTouch.UIKit.UIApplication application, MonoTouch.Foundation.NSDictionary launchOptions) [0x000bc] in /Users/rene/Documents/Develop/Projects/BrainloopMobile/210/BrainloopMobile/BrainloopMobile/AppDelegateBase.cs:662 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at BrainloopMobile.AppDelegateIPad.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00000] in /Users/rene/Documents/Develop/Projects/BrainloopMobile/210/BrainloopMobile/BrainloopMobile/AppDelegateIPad.cs:24 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at MonoTouch.UIKit.UIApplication.SendEvent (MonoTouch.UIKit.UIEvent uievent) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.g.cs:175 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at BrainloopMobile.UIApplicationMain.SendEvent (MonoTouch.UIKit.UIEvent oEvent) [0x00000] in /Users/rene/Documents/Develop/Projects/BrainloopMobile/210/BrainloopMobile/BrainloopMobile/UIApplicationMain.cs:23 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>:   at BrainloopMobile.Application.Main (System.String[] args) [0x00000] in /Users/rene/Documents/Develop/Projects/BrainloopMobile/210/BrainloopMobile/BrainloopMobile/Main.cs:15 
May  3 15:34:03 unknown BrainloopBrowser[9422] <Critical>: Terminating runtime due to unhandled exception
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: Stacktrace:
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: Native stacktrace:
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	0   BrainloopBrowser                    0x00df59f1 mono_handle_native_sigsegv + 244
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	1   BrainloopBrowser                    0x00e0cb59 sigabrt_signal_handler + 112
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	2   libsystem_c.dylib                   0x33dee7ed _sigtramp + 48
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	3   libsystem_c.dylib                   0x33de420f pthread_kill + 54
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	4   libsystem_c.dylib                   0x33ddd29f abort + 94
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	5   BrainloopBrowser                    0x00e975cb monoeg_assertion_message + 58
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	6   BrainloopBrowser                    0x00de609d mono_thread_abort + 112
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	7   BrainloopBrowser                    0x00df576f mono_handle_exception_internal + 2138
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	8   BrainloopBrowser                    0x00df583d mono_handle_exception + 12
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	9   BrainloopBrowser                    0x00e0be15 mono_arm_throw_exception + 116
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	10  BrainloopBrowser                    0x0061437c throw_exception + 48
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	11  BrainloopBrowser                    0x00e57999 mono_runtime_class_init_full + 260
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	12  BrainloopBrowser                    0x00e57fa7 mono_runtime_class_init + 10
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	13  BrainloopBrowser                    0x00de702f mono_resolve_patch_target + 610
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	14  BrainloopBrowser                    0x00df1b1d load_method + 964
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	15  BrainloopBrowser                    0x00df24c9 mono_aot_get_method + 1136
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	16  BrainloopBrowser                    0x00de761b mono_jit_compile_method_with_opt + 214
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	17  BrainloopBrowser                    0x00de7a09 mono_jit_compile_method + 28
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	18  BrainloopBrowser                    0x00defea5 mono_aot_plt_resolve + 248
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	19  BrainloopBrowser                    0x00df632f mono_aot_plt_trampoline + 38
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	20  BrainloopBrowser                    0x00613d88 generic_trampoline_aot_plt + 136
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	21  BrainloopBrowser                    0x00ba8080 BrainloopMobile_AppDelegateIPad_FinishedLaunching_MonoTouch_UIKit_UIApplication_MonoTouch_Foundation_NSDictionary + 144
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	22  BrainloopBrowser                    0x005d82bc wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	23  BrainloopBrowser                    0x00de7e5f mono_jit_runtime_invoke + 1054
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	24  BrainloopBrowser                    0x00e525a7 mono_runtime_invoke + 90
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	25  BrainloopBrowser                    0x00ea6560 monotouch_trampoline + 3556
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	26  UIKit                               0x372a2e53 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1182
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	27  UIKit                               0x3729c985 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 408
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	28  UIKit                               0x3726ac6b -[UIApplication handleEvent:withNewEvent:] + 1010
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	29  UIKit                               0x3726a70f -[UIApplication sendEvent:] + 54
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	30  BrainloopBrowser                    0x003574cc wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_void_objc_msgSendSuper_IntPtr_intptr_intptr_intptr + 76
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	31  BrainloopBrowser                    0x00be75a0 BrainloopMobile_UIApplicationMain_SendEvent_MonoTouch_UIKit_UIEvent + 144
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	32  BrainloopBrowser                    0x005d82bc wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	33  BrainloopBrowser                    0x00de7e5f mono_jit_runtime_invoke + 1054
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	34  BrainloopBrowser                    0x00e525a7 mono_runtime_invoke + 90
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	35  BrainloopBrowser                    0x00ea6560 monotouch_trampoline + 3556
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	36  UIKit                               0x3726a0e3 _UIApplicationHandleEvent + 5826
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	37  GraphicsServices                    0x3102a22b PurpleEventCallback + 882
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	38  CoreFoundation                      0x36fc5523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	39  CoreFoundation                      0x36fc54c5 __CFRunLoopDoSource1 + 140
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	40  CoreFoundation                      0x36fc4313 __CFRunLoopRun + 1370
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	41  CoreFoundation                      0x36f474a5 CFRunLoopRunSpecific + 300
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	42  CoreFoundation                      0x36f4736d CFRunLoopRunInMode + 104
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	43  UIKit                               0x3729ba13 -[UIApplication _run] + 550
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	44  UIKit                               0x37298e7d UIApplicationMain + 1080
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	45  BrainloopBrowser                    0x0035ddc4 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	46  BrainloopBrowser                    0x00ba7b28 BrainloopMobile_Application_Main_string__ + 160
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	47  BrainloopBrowser                    0x005d82bc wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	48  BrainloopBrowser                    0x00de7e5f mono_jit_runtime_invoke + 1054
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	49  BrainloopBrowser                    0x00e525a7 mono_runtime_invoke + 90
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	50  BrainloopBrowser                    0x00e55173 mono_runtime_exec_main + 306
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	51  BrainloopBrowser                    0x00e553c7 mono_runtime_run_main + 482
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	52  BrainloopBrowser                    0x00deb2c7 mono_jit_exec + 94
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	53  BrainloopBrowser                    0x00e9bacc main + 2540
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: 	54  BrainloopBrowser                    0x00002318 start + 40
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: =================================================================
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: Got a SIGABRT while executing native code. This usually indicates
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: a fatal error in the mono runtime or one of the native libraries 
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: used by your application.
May  3 15:34:03 unknown UIKitApplication:com.brainloop.brainloopbrowser[0x4490][9422] <Notice>: =================================================================
May  3 15:34:04 unknown ReportCrash[9423] <Notice>: Formulating crash report for process BrainloopBrowser[9422]
May  3 15:34:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.brainloop.brainloopbrowser[0x4490]) Job appears to have crashed: Abort trap: 6
May  3 15:34:04 unknown SpringBoard[1408] <Warning>: Application 'Brainloop' exited abnormally with signal 6: Abort trap: 6
May  3 15:34:04 unknown ReportCrash[9423] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/BrainloopBrowser_2012-05-03-153403_iPad-von-Rene.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-05-03 17:17:41 UTC
Can you add the signature of the BrainloopMobile.MainController.DismissViewController method?
Comment 3 René Ruppert 2012-05-04 02:54:58 UTC
public override void DismissViewController (bool animated, NSAction completionHandler)
		{
			base.DismissViewController (animated, completionHandler);
			
			if ( this.ModalViewController is SetParticipantStatusController )
			{
			}
		}
Comment 4 Rolf Bjarne Kvinge [MSFT] 2012-05-04 17:10:31 UTC
This is fixed now (monotouch master 9a5e4f755). The next beta release with this fix will be 5.3.4, but I can get you a build with this fix as soon as our build bots creates one (if you're interested of course).