Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by gamesmiths · Oct 07, 2014 at 01:36 PM · iosxcodeappcompile

JIT compile error on iOS

Hi,

I have been using Unity pro (trial) and brought some code from a developer and it seemed to work ok when I built it on my iPhone/ipad. As soon as the trial ended and I am back on the basic unity package when I build and try and run the code through Xcode I get this error:

ExecutionEngineException: Attempting to JIT compile method 'System.Linq.Enumerable:Iterate (System.Collections.Generic.IEnumerable`1,int,System.Func`3)' while running with --aot-only.

at System.Linq.Enumerable.Max[MapLevel] (IEnumerable`1 source, System.Func`2 selector) [0x00000] in :0 at LevelsMap.LoadState () [0x00000] in :0 at LevelsMap.Start () [0x00000] in :0

(Filename: Line: -1)

I am quite new to Unity and have done some searching online to find a fix however I don't know enough about coding to fix this, can anyone help me?

Could it be a simple fix?

Thanks Clive

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Graham-Dunnett · Oct 07, 2014 at 08:33 PM

Back in the day Apple did not allow applications to support scripting language - the only scripting that was supported was Javascript inside Mobile Safari. Since Mono implements a scripting language, it's not allowable on the iOS devices. So, to get Mono working, all script is converted into Arm assembler in the build process. This is the so-called ahead of time (AOT) compilation. Your error is a JIT (just in time) meaning Mono is attempting to create script dynamically and convert it into assembler on the device. This is not allowed. I've no idea what code you've purchased, but it sounds like it was never designed to be compiled ahead of time. (Typically this means the script code is using dynamic code generation techniques and doing reflection)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by gamesmiths · Oct 08, 2014 at 05:38 AM

Thanks Graham, do you think this is something you could fix for me if I sent you the code? I know the code works on web and android devices, and it does work on iPad/iphone if I am not plugged into Xcode, but if I am in Xcode and running the code through my iPad it crashes, however a development build does not crash! I am unsure if Apple will let a development build through though! Please let me know if you can help, it would save me a LOT of trouble!!!

Thanks Clive

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Visartech · Oct 15, 2014 at 11:07 AM

Really, some LINQ methods are not supported with Mono compiler on iOS and cause JIT-compile errors. In case if you would like to use LINQ methods on iOS in Unity, I would suggest you to look at LINQ to iOS.

It's a custom implementation of LINQ to Objects extension methods that works without JIT-compile errors on iOS.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Valerius666 · Dec 06, 2016 at 11:27 PM

For me worked to change Scripting Backend type in Player Settings from Mono2x to IL2CPP.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Compiling in Xcode? 0 Answers

Question reguarding testing my IOS build in Xcode 0 Answers

iOS Plugin - Possible to Register 2 subclasses of UnityAppController with IMPL_APP_CONTROLLER_SUBCLASS 0 Answers

bad quality icon on iOS 1 Answer

Unable to deploy to ipod 2nd Gen 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges