[Mono-bugs] [Bug 690669] New: JIT error when binding a static event of a generic class

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Apr 28 15:30:05 EDT 2011



           Summary: JIT error when binding a static event of a generic
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: iPhone
        OS/Version: Apple iOS 4.3
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: philippe at activa.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0)
Gecko/20100101 Firefox/4.0

Given the following class definitions:

public class BaseClass<T> where T:BaseClass<T>
  public delegate void Handler();
  public static event Handler MyEvent;

public class MyClass : BaseClass<MyClass>

Calling the following line of code anywhere in a MonoTouch application crashes
the app:

MyClass.MyEvent += delegate {};

This results in the following exception:

Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile
method '(wrapper synchronized)
(StaticEventBug.BaseClass`1/Handler<StaticEventBug.MyClass>)' while running
with --aot-only

Reproducible: Always

Steps to Reproduce:
1. Add the given classes to any MonoTouch project
2. Add the line "MyClass.MyEvent += delegate {};" somewhere in the code
3. Run the app, making sure the line above is executed
Actual Results:  
exception thrown

Expected Results:  
no exception

Using the latest version of MonoTouch 3.x

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list