Bug 56271 - Attempting to JIT compile error
Summary: Attempting to JIT compile error
Status: RESOLVED DUPLICATE of bug 56962
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 10.8 (d15-1)
Hardware: PC Mac OS
: Normal normal
Target Milestone: 15.3
Assignee: Zoltan Varga
Depends on:
Reported: 2017-05-12 09:09 UTC by Atin Agarwal
Modified: 2017-06-01 14:57 UTC (History)
7 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 Atin Agarwal 2017-05-12 09:09:32 UTC
Description of Problem:

i have a xamarin iOS project where i am using 3rd party libraries to access TSL 1128 rfid bluetooth reader. it has been working fine since we wrote this project (for over 1 year) however since yesterday when i am trying to debug the project on the device it gives me attempting to jit compile method when initialising the constructor of the object.
TSLAsciiCommander commander = new TSLAsciiCommander();

it works fine on simulator and the same code has been working all along. could u please guide me how to overcome this issue.

Comment 1 Kirill Osenkov 2017-05-12 17:00:19 UTC
Atin, can you please provide more information about the error you're seeing? Can you paste the full text? Thanks!
Comment 2 Sebastien Pouliot 2017-05-17 13:02:23 UTC
> it works fine on simulator 

This is because the simulator uses the JIT. Builds for devices uses the AOT compiler.

This might be hard to diagnose without a test case. Even so we will need your full build logs, the symbolicated crash report and all version informations.

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build

The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).

Comment 3 Mugs 2017-05-30 14:51:30 UTC
I am facing the same issue.
If I use Don`t Link at link behavior it works, but the ipa file gets too big for publishing.

I have a Xamarin.Forms project, a Xamarin.iOs project, and a binding project. The error I get is when I try to access a class, that I have mapped on my binding project, on my Xamarin.iOS project. 

Its very simple to reproduce, create a binding library on xcode, create a Xamarin forms project with iOS, create a binding project on that solution, do the ApiDefinition, ex: 

   // Here is where you'd define your API definition for the native Objective-C library.
    // For example, to bind the following Objective-C class:
    //     @interface Widget : NSObject {
    //     }
    // The C# binding would look like this:
    //     [BaseType (typeof (NSObject))]
    //     interface Widget {
    //     }

and try to use that class or interface on your iOS project.
When using Link Sdk only it will throw a runtime error about JIT compile and AOT.
When using Don`t link it will work.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2017-06-01 14:57:48 UTC
This is most likely a duplicate of bug #56962.

*** This bug has been marked as a duplicate of bug 56962 ***