Bug 8869 - Attempting to JIT compile method '(wrapper managed-to-native) System.Runtime.InteropServices.Marshal:WriteInt32 (intptr,int,int)'
Summary: Attempting to JIT compile method '(wrapper managed-to-native) System.Runtime....
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.99.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-10 10:18 UTC by Marek Safar
Modified: 2012-12-10 19:04 UTC (History)
2 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 Marek Safar 2012-12-10 10:18:41 UTC
Unhandled managed exception: Attempting to JIT compile method '(wrapper managed-to-native) System.Runtime.InteropServices.Marshal:WriteInt32 (intptr,int,int)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
 (System.ExecutionEngineException)
  at System.Runtime.InteropServices.Marshal.WriteInt32 (IntPtr ptr, Int32 val) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:996 
  at MonoTouch.AudioToolbox.AudioBuffers.SetData (Int32 index, IntPtr data, Int32 dataByteSize) [0x00040] in /Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioBuffers.cs:139 
  at AUSoundTriggeredPlayingSoundMemoryBased.ExtAudioBufferPlayer.prepareExtAudioFile () [0x000a4] in /Users/marek/git/monotouch-samples/AUSoundTriggeredPlayingSoundMemoryBased/ExtAudioBufferPlayer.cs:144 
  at AUSoundTriggeredPlayingSoundMemoryBased.ExtAudioBufferPlayer..ctor (MonoTouch.CoreFoundation.CFUrl url) [0x0000d] in /Users/marek/git/monotouch-samples/AUSoundTriggeredPlayingSoundMemoryBased/ExtAudioBufferPlayer.cs:55 
  at AUSoundTriggeredPlayingSoundMemoryBased.MainView.ViewDidLoad () [0x00011] in /Users/marek/git/monotouch-samples/AUSoundTriggeredPlayingSoundMemoryBased/MainView.xib.cs:47 
  at MonoTouch.UIKit.UIViewController.get_View () [0x00030] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:979 
  at AUSoundTriggeredPlayingSoundMemoryBased.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x0000b] in /Users/marek/git/monotouch-samples/AUSoundTriggeredPlayingSoundMemoryBased/Main.cs:27 
  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 
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:43 
  at AUSoundTriggeredPlayingSoundMemoryBased.Application.Main (System.String[] args) [0x00000] in /Users/marek/git/monotouch-samples/AUSoundTriggeredPlayingSoundMemoryBased/Main.cs:13 
Stacktrace:


Native stacktrace:

	0   AUSoundTriggeredPlayingSoundMemoryBased 0x00379355 mono_handle_native_sigsegv + 244
	1   AUSoundTriggeredPlayingSoundMemoryBased 0x003a674d sigabrt_signal_handler + 112
	2   libsystem_c.dylib                   0x36016e93 _sigtramp + 42
	3   libsystem_c.dylib                   0x3600d123 pthread_kill + 58
	4   libsystem_c.dylib                   0x36049973 abort + 94
	5   AUSoundTriggeredPlayingSoundMemoryBased 0x003efbb0 monotouch_throw_monotouch_exception + 0
	6   AUSoundTriggeredPlayingSoundMemoryBased 0x00377031 mono_invoke_unhandled_exception_hook + 92
	7   AUSoundTriggeredPlayingSoundMemoryBased 0x003402ab mono_thread_abort + 46
	8   AUSoundTriggeredPlayingSoundMemoryBased 0x003790d3 mono_handle_exception_internal + 2138
	9   AUSoundTriggeredPlayingSoundMemoryBased 0x003791a1 mono_handle_exception + 12
	10  AUSoundTriggeredPlayingSoundMemoryBased 0x003a5a09 mono_arm_throw_exception + 132
	11  AUSoundTriggeredPlayingSoundMemoryBased 0x0027e080 throw_exception + 68
	12  AUSoundTriggeredPlayingSoundMemoryBased 0x00341c91 mono_jit_compile_method + 40
	13  AUSoundTriggeredPlayingSoundMemoryBased 0x0039c505 mono_compile_method + 40
	14  AUSoundTriggeredPlayingSoundMemoryBased 0x00341921 mono_jit_compile_method_with_opt + 380
	15  AUSoundTriggeredPlayingSoundMemoryBased 0x00341c85 mono_jit_compile_method + 28
	16  AUSoundTriggeredPlayingSoundMemoryBased 0x0035c2f1 mono_aot_plt_resolve + 248
	17  AUSoundTriggeredPlayingSoundMemoryBased 0x0037bf3f mono_aot_plt_trampoline + 38
	18  AUSoundTriggeredPlayingSoundMemoryBased 0x0027daa8 generic_trampoline_aot_plt + 128
	19  AUSoundTriggeredPlayingSoundMemoryBased 0x000cd258 MonoTouch_AudioToolbox_AudioBuffers_SetData_int_intptr_int + 148
	20  AUSoundTriggeredPlayingSoundMemoryBased 0x00066dc0 AUSoundTriggeredPlayingSoundMemoryBased_ExtAudioBufferPlayer_prepareExtAudioFile + 1076
	21  AUSoundTriggeredPlayingSoundMemoryBased 0x0006570c AUSoundTriggeredPlayingSoundMemoryBased_ExtAudioBufferPlayer__ctor_MonoTouch_CoreFoundation_CFUrl + 224
	22  AUSoundTriggeredPlayingSoundMemoryBased 0x00064eb8 AUSoundTriggeredPlayingSoundMemoryBased_MainView_ViewDidLoad + 276
	23  AUSoundTriggeredPlayingSoundMemoryBased 0x0024ffe4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	24  AUSoundTriggeredPlayingSoundMemoryBased 0x003420db mono_jit_runtime_invoke + 1054
	25  AUSoundTriggeredPlayingSoundMemoryBased 0x0039d29b mono_runtime_invoke + 90
	26  AUSoundTriggeredPlayingSoundMemoryBased 0x0033e17b native_to_managed_trampoline_AUSoundTriggeredPlayingSoundMemoryBased_MainView_ViewDidLoad + 178
	27  UIKit                               0x3722c58d <redacted> + 364
	28  AUSoundTriggeredPlayingSoundMemoryBased 0x000f2d58 wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_IntPtr_objc_msgSendSuper_intptr_intptr + 68
	29  AUSoundTriggeredPlayingSoundMemoryBased 0x00063934 AUSoundTriggeredPlayingSoundMemoryBased_AppDelegate_FinishedLaunching_MonoTouch_UIKit_UIApplication_MonoTouch_Foundation_NSDictionary + 244
	30  AUSoundTriggeredPlayingSoundMemoryBased 0x0024ffe4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	31  AUSoundTriggeredPlayingSoundMemoryBased 0x003420db mono_jit_runtime_invoke + 1054
	32  AUSoundTriggeredPlayingSoundMemoryBased 0x0039d29b mono_runtime_invoke + 90
	33  AUSoundTriggeredPlayingSoundMemoryBased 0x0033d469 native_to_managed_trampoline_AUSoundTriggeredPlayingSoundMemoryBased_AppDelegate_FinishedLaunching + 256
	34  UIKit                               0x3726dad1 <redacted> + 252
	35  UIKit                               0x3726d65b <redacted> + 1190
	36  UIKit                               0x37265843 <redacted> + 698
	37  UIKit                               0x3720dc39 <redacted> + 1004
	38  UIKit                               0x3720d6cd <redacted> + 72
	39  UIKit                               0x3720d11b <redacted> + 6154
	40  GraphicsServices                    0x328335a3 <redacted> + 590
	41  CoreFoundation                      0x36ae8683 <redacted> + 14
	42  CoreFoundation                      0x36ae7ee9 <redacted> + 212
	43  CoreFoundation                      0x36ae6cb7 <redacted> + 646
	44  CoreFoundation                      0x36a59ebd CFRunLoopRunSpecific + 356
	45  CoreFoundation                      0x36a59d49 CFRunLoopRunInMode + 104
	46  UIKit                               0x3726447d <redacted> + 668
	47  UIKit                               0x372612f9 UIApplicationMain + 1120
	48  AUSoundTriggeredPlayingSoundMemoryBased 0x000f3c0c wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
	49  AUSoundTriggeredPlayingSoundMemoryBased 0x000de164 MonoTouch_UIKit_UIApplication_Main_string__ + 36
	50  AUSoundTriggeredPlayingSoundMemoryBased 0x00063728 AUSoundTriggeredPlayingSoundMemoryBased_Application_Main_string__ + 128
	51  AUSoundTriggeredPlayingSoundMemoryBased 0x0024ffe4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	52  AUSoundTriggeredPlayingSoundMemoryBased 0x003420db mono_jit_runtime_invoke + 1054
	53  AUSoundTriggeredPlayingSoundMemoryBased 0x0039d29b mono_runtime_invoke + 90
	54  AUSoundTriggeredPlayingSoundMemoryBased 0x0039fd7f mono_runtime_exec_main + 306
	55  AUSoundTriggeredPlayingSoundMemoryBased 0x003a3003 mono_runtime_run_main + 482
	56  AUSoundTriggeredPlayingSoundMemoryBased 0x003542fb mono_jit_exec + 94
	57  AUSoundTriggeredPlayingSoundMemoryBased 0x003de34c main + 2232
	58  AUSoundTriggeredPlayingSoundMemoryBased 0x00002028 start + 40

=================================================================
Got a SIGABRT 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 Marek Safar 2012-12-10 10:38:10 UTC
If you need to reproduce it compile MT master and checkout https://github.com/xamarin/monotouch-samples/tree/master/AUSoundTriggeredPlayingSoundMemoryBased
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-12-10 19:04:08 UTC
Fixed.

maccore: a3d08e679d9814c43e5f91a9ca837c6153597af5

monotouch master: 3229551c0da040af0b74fe475c38a59042f5e98f
monotouch ios6: a4e42cb814d1c42f26ebb69a100a566d893c6b18