[MonoTouch] Exception: JIT Compile

Tossing, Chris ctossing at touchcominc.com
Fri Dec 9 13:27:02 EST 2011


Robert,

If I'm reading his code right, he is actually using a Dictionary<string, object> - the TKey value type issue wouldn't apply, if that is the case.

Thank you,

Chris

-----Original Message-----
From: monotouch-bounces at lists.ximian.com [mailto:monotouch-bounces at lists.ximian.com] On Behalf Of Robert Jordan
Sent: Friday, December 09, 2011 1:20 PM
To: monotouch at lists.ximian.com
Subject: Re: [MonoTouch] Exception: JIT Compile

On 09.12.2011 16:27, Mittchel debaass wrote:
> Hello everyone,
>
> Recently I converted Twitterizer to MonoTouch and tested it on the
> emulator. This worked fine, though when I am testing it on the device it
> goes terribly wrong.
> I am getting two JIT Compile errors in 2 different method, the code can be
> found here: http://pastebin.com/05hcLBRH
>
> What's going wrong? why does it work in the emulator and fails it badly on
> the device?

It due to this limitation:

http://docs.xamarin.com/ios/about/limitations#Value_types_as_Dictionary_Keys

Even you don't use dictionaries directly, Linq might still need an
IEqualityComparer<TKey> for a value type TKey.

Try to rewrite Linq query, especially the orderby clause:

var paramsSorted = from p in parameters
                                orderby p.Key, p.Value
                                select p;

Robert

_______________________________________________
MonoTouch mailing list
MonoTouch at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

The details of this company are as follows:
Touchcom Inc, Registered Office: 21 North Avenue, Burlington, MA 01803.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.


More information about the MonoTouch mailing list