[Mono-dev] AOT compiler crash

Jeroen Frijters jeroen at sumatra.nl
Sat Jan 21 08:20:06 UTC 2012


Michael Bayne wrote:
> which is what contains the failing assert:
> 
> 	g_assert (method && method->klass->parent ==
> mono_defaults.multicastdelegate_class &&
> 		  !strcmp (method->name, "BeginInvoke"));

This assert is wrong. The BeginInvoke and EndInvoke methods are optional in a delegate (and IKVM.OpenJDK.Core.dll defines a couple of delegates that don't have them).

Here's the relevant bit from the ECMA CLI specification:

"In addition to an instance constructor and an Invoke method, delegates can optionally have two additional 
methods: BeginInvoke and EndInvoke. These are used for asynchronous calls."

As a workaround, you can add the BeginInvoke and EndInvoke methods or remove the delegates (and then fixup the few locations in IKVM.Runtime that use them). They are in /ikvm/classpath/ikvm/runtime/Delegates.java

If you end up adding the BeginInvoke/EndInvoke methods, please send me the patch and I'll incorporate it.

Regards,
Jeroen



More information about the Mono-devel-list mailing list