Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 3 b7 JIT compile Error

Discussion in 'Editor & General Support' started by opticfibre, Sep 12, 2010.

  1. opticfibre

    opticfibre

    Joined:
    Apr 6, 2010
    Posts:
    26
    Okay , not sure where this belongs, or if anyone can help but...

    My new "Body Booth" App went on sale last week and is doing well :)
    Since then Unity 3 b7 arrived, and now the same project with no modifications reveals this error in the xcode debug window.

    "Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper dynamic-method) Boo.Lang.Runtime.RuntimeServices:RuntimeServices$op_Addition$System.String$System.String (object,object[])' while running with --aot-only."

    This happened in Unity 3 b5 but the b6 update fixed it.

    So now my app is on sale and selling like hot cakes, but i cant update it anymore :(

    What i want to know is.... What is this JIT error, and will b8 fix it as i really need to submit an app update.

    Thanks for any help
     
  2. karn9872

    karn9872

    Joined:
    Sep 26, 2010
    Posts:
    14
    Ran into this same problem with Unity 3. It was in a piece of code that looked like this:

    Code (csharp):
    1. var h : Boo.Lang.Hash = new Boo.Lang.Hash();
    2. h["text"] = "hi";
    3. h["text"] += " there";
    4.  
    The exception was happening on the last line. This used to work in Unity < 3.0. The solution was to change the 3rd line to:

    Code (csharp):
    1. h["text"] = h["text"].ToString() + " there";
    Maybe there is a better way...
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,602
    don't use hashtables but use generic lists and alike.

    Unityscript is worlds further with U3, but in trade lost some automagic
     
  4. DeLong

    DeLong

    Joined:
    Feb 22, 2009
    Posts:
    33
    I got the same exact error as opticfibre in Unity 3.1.0f3 with iOS basic - I just upgraded 2 days ago. So wondering if a solution was found to this. We are not using hash tables, but we are using a lot of Strings and an XML file in the Resource folder.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,602
    if you don't use hashtables its not the exact same problem.

    But if it is something that would return Object it has the same root.
    anything that returns Object requires that you cast it to the right class through as yourclass

    for example
    Code (csharp):
    1.  
    2. var s = hashTab["mystring"] as string;
     
  6. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    I'm seeing the same problem. Is there an easy way to figure out what line the error occurs on? I've looked at the GDB backtrace and the crash log and they don't tell me what line of my code is causing the error.

    How do you find out the problematic line, except by putting in lots of Debug.Logs?
     
unityunity