Bug 32895 - Assertion at marshal.c:3803, condition `method' not met
Summary: Assertion at marshal.c:3803, condition `method' not met
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 2.0.0
Hardware: PC Mac OS
: --- blocker
Target Milestone: ---
Assignee: Chris Hamons
Depends on:
Reported: 2015-08-08 22:29 UTC by Frank A. Krueger
Modified: 2015-10-22 07:33 UTC (History)
3 users (show)

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:

Description Frank A. Krueger 2015-08-08 22:29:26 UTC
Here is another regression. This code worked perfectly fine, now causes this error.

Code is here: https://github.com/praeclarum/NGraphics/tree/master/NGraphics.Editor

Works fine in Debug build, fails, in release.

WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
2015-08-08 19:25:07.204 NGraphics.Editor[76571:2492041] error: * Assertion at ../../../../../mono/mono/metadata/marshal.c:3803, condition `method' not met

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesDataInternal (System.Reflection.ICustomAttributeProvider) <IL 0x0000d, 0xffffffff>
  at System.MonoCustomAttrs.GetCustomAttributesData (System.Reflection.ICustomAttributeProvider) <IL 0x00012, 0x00023>
  at System.Reflection.CustomAttributeData.GetCustomAttributes (System.Reflection.Assembly) <IL 0x00001, 0x00014>
  at Mono.CSharp.ImportedAssemblyDefinition.ReadAttributes () <IL 0x00001, 0x0004c>
  at Mono.CSharp.MetadataImporter.GetAssemblyDefinition (System.Reflection.Assembly) <IL 0x00028, 0x000b5>
  at Mono.CSharp.ReflectionImporter.ImportAssembly (System.Reflection.Assembly,Mono.CSharp.RootNamespace) <IL 0x00002, 0x0003a>
  at Mono.CSharp.Evaluator.ReferenceAssembly (System.Reflection.Assembly) <IL 0x00022, 0x00077>
  at NGraphics.Editor.CompileRequest.CompileCode () <IL 0x00035, 0x00110>
  at NGraphics.Editor.CompileRequest.<Compile>m__1 () <IL 0x00001, 0x00014>
  at System.Threading.Tasks.Task`1.InnerInvoke () <IL 0x00014, 0x00068>
  at System.Threading.Tasks.Task.Execute () <IL 0x00017, 0x00056>
  at System.Threading.Tasks.Task.ExecutionContextCallback (object) <IL 0x00008, 0x0005b>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <IL 0x00029, 0x0006d>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <IL 0x00003, 0x0001e>
  at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) <IL 0x0005f, 0x0016d>
  at System.Threading.Tasks.Task.ExecuteEntry (bool) <IL 0x00075, 0x000dd>
  at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <IL 0x00002, 0x00016>
  at System.Threading.ThreadPool.<UnsafeQueueCustomWorkItem>m__0 (object) <IL 0x00006, 0x000b1>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00062, 0xffffffff>

Native stacktrace:

	0   NGraphics.Editor                    0x00000001000ea97a mono_handle_native_sigsegv + 282
	1   libsystem_platform.dylib            0x00007fff8b42bf1a _sigtramp + 26
	2   ???                                 0x00000000000000e3 0x0 + 227
	3   libsystem_c.dylib                   0x00007fff90878b53 abort + 129
	4   NGraphics.Editor                    0x0000000100003326 log_callback + 70
	5   NGraphics.Editor                    0x0000000100253c50 monoeg_assertion_message + 192
	6   NGraphics.Editor                    0x000000010016b02b mono_marshal_get_runtime_invoke + 2667
	7   NGraphics.Editor                    0x0000000100100484 mono_jit_runtime_invoke + 196
	8   NGraphics.Editor                    0x000000010019f25e mono_runtime_invoke + 110
	9   NGraphics.Editor                    0x00000001001bf031 mono_reflection_get_custom_attrs_data + 273
	10  ???                                 0x000000010a16aad9 0x0 + 4464224985
	11  ???                                 0x000000010a16a4a6 0x0 + 4464223398
	12  ???                                 0x000000010a16a2c8 0x0 + 4464222920
	13  ???                                 0x000000010a169c21 0x0 + 4464221217
	14  ???                                 0x000000010a169af5 0x0 + 4464220917
	15  ???                                 0x000000010a1697fc 0x0 + 4464220156
	16  ???                                 0x000000010a16962f 0x0 + 4464219695
	17  ???                                 0x000000010a1690ce 0x0 + 4464218318
	18  NGraphics.Editor                    0x0000000100100a49 mono_jit_runtime_invoke + 1673
	19  NGraphics.Editor                    0x000000010019f25e mono_runtime_invoke + 110
	20  NGraphics.Editor                    0x0000000100207822 async_invoke_thread + 1922
	21  NGraphics.Editor                    0x000000010021025b start_wrapper + 491
	22  NGraphics.Editor                    0x000000010024792e inner_start_thread + 222
	23  libsystem_pthread.dylib             0x00007fff915a5268 _pthread_body + 131
	24  libsystem_pthread.dylib             0x00007fff915a51e5 _pthread_body + 0
	25  libsystem_pthread.dylib             0x00007fff915a341d thread_start + 13


		  ApplicationAssembly: bin/Release/NGraphics.Editor.exe
		  ApplicationName: NGraphics.Editor
		  Architecture: x86_64
		  Debug: False
		  ExtraArguments: <null>
		  FrameworkRoot: /Library/Frameworks/Xamarin.Mac.framework/Versions/Current
		  I18n: <null>
		  LinkMode: SdkOnly
		  OutputPath: bin/Release/
		  TargetFrameworkIdentifier: Xamarin.Mac
		  TargetFrameworkVersion: v2.0
		  UseRefCounting: True
		  UseSGen: False
		  UseXamMacFullFramework: False


=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: fce13fdd-e8e3-48ef-99f1-4acbb06f0240
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Xamarin.Android ===

Version: (Enterprise Edition)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.Mac ===

Version: (Enterprise Edition)

=== Xamarin.iOS ===

Version: (Enterprise Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.4
Darwin muon.local 14.4.0 Darwin Kernel Version 14.4.0
    Thu May 28 11:35:04 PDT 2015
    root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
Comment 2 Frank A. Krueger 2015-08-18 12:29:54 UTC
The code is here:

> Code is here: https://github.com/praeclarum/NGraphics/tree/master/NGraphics.Editor

It's unified.

I don't want to download that version as I don't know how to restore to stable.

It's easily reproducible. Just download the code and run it.
Comment 3 Chris Hamons 2015-09-29 17:36:10 UTC
I'm no longer seeing this with the builds in the Alpha channel. We've iterated on the mono builds a few times, that might have fixed it.

Please try with latest Alpha and reopen with instructions if you still run into issues.

Glad to know we have another example to test XM against! I'm actually going to add this to our regression test suite for XM (since the license is one we can use)

Thanks again!
Comment 4 Chris Hamons 2015-09-29 17:40:24 UTC
And apologies on the unacceptable long delay in responding to the bug. We're working on bringing that more into line (a paternity leave wrapping up didn't help).
Comment 5 Chris Hamons 2015-09-29 17:43:40 UTC
OK, I just realized that it launches, but for some reason the graphic on the right doesn't appear in release (in debug). Does not appear to be related to this bug (no output/crash) but just FYI.
Comment 6 softlion 2015-10-22 07:33:10 UTC
Get this assertion when using 2015.1 CTP, stable xamarin, and on ios simulator, in code calling an abstract method (implemented on a derived class).