Search Unity

URGENT: IL2CPP Error with no Hint (Unity 4.6.6)

Discussion in 'iOS and tvOS' started by PlayMagicLtd, Jul 2, 2015.

  1. PlayMagicLtd

    PlayMagicLtd

    Joined:
    Aug 23, 2012
    Posts:
    48
    We are developing a game using Unity 4.6.6 and the UFPS assets, the game builds fine to non-iOS platforms. It builds fine to iOS using the Mono (2.x) scripting backend, but there is a hard crash / infinite loop of null references if the scripting backend is set to "IL2CPP" (which is required for App Store submission). The line that fails may reside in the game code, in the UFPS asset or another asset, but the IL2CPP error gives no hint of where to look for it.

    We tried to upgrade Unity to both p3 and p4 patch version and this has not fixed the issue. We also tried to track the error with the help of the UFPS (FANTASTIC!) support team and after long debugging we both agree this is definitely a Unity bug.

    The log error is this:

    NullReferenceException

    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.

    (Filename: currently not available on il2cpp Line: -1)

    Please help us with this !
     
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Try 4.6.7 :) Lots of IL2CPP fixes
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @Twelve Games

    If you want to gather more details about the error, you can attach Xcode to the running app and debug the native code generated by IL2CPP. This should allow you to see the actual cause of the exception. Take a look at this blog post for more details:

    http://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/
     
  4. PlayMagicLtd

    PlayMagicLtd

    Joined:
    Aug 23, 2012
    Posts:
    48
    Hello Josh! Thanks for the Reply, we will try it immediately.