[Mono-bugs] [Bug 643377] New: EqualityComparer<T> Attempts to JIT compile when deployed to the device

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 3 04:21:46 EDT 2010



           Summary: EqualityComparer<T> Attempts to JIT compile when
                    deployed to the device
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: johan.otto at justenough.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: Yes

In the simulator I have code that constructs a
Dictionary<BusinessObjectKey,BusinessObject>. It works fine here. As soon as I
deploy to the device, the application crashes. I cannot debug my application on
the device because of another bug I reported.

 I dumped a stack trace with a exception -> innerexception trace on the device.
This indicates that the EqualityComparer<T> base class constructor is
attempting to do a JIT compile when it's AOT only. The Key type of my
dictionary is a BusinessObjectKey struct decorated with an arsenal of preserve
attributes, and it is used directly in my code. The fails trying to construct
an EqualityComparer<BusinessObjectKey>.

I worked around the problem by creating a BusinessObjectKeyEqualityComparer:
IEqualityComparer<BusinessObjectKey> class instead. It works fine, problem
is... code is littered with dictionaries..

This issue is somehow related to the linker eliminating generic class
constructors I think. I cannot disable the linker because of the bug I reported
on Friday so I'm a bit stumped at the moment.

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