Search Unity

Crash EXC_BAD_ACCESS with IL2CPP build, but normal with Mono build

Discussion in 'iOS and tvOS' started by kenli, Aug 11, 2015.

  1. kenli

    kenli

    Joined:
    May 20, 2013
    Posts:
    6
    Hi Unity iOS developer,

    I have a crash issue with IL2CPP build (Universal), but normally when i'm build with Mono build (armv7 only).
    Attached error crash log from Xcode.
    Crash on start, after splash screen appear.

    Unity version:
    4.6.7p3

    Xcode version:
    6.3.2

    iOS version have been tested:
    iOS 7.1.1
    iOS 8.x.x

    Here is a little log from thread 0:

    Thread 0 Crashed:
    0 libsystem_c.dylib 0x3b805a14 strlen + 28
    1 Foundation 0x31003300 +[NSString stringWithUTF8String:] + 76
    2 tts 0x00eeae02 _chartBoostInit (ChartBoostBinding.m:31)
    3 tts 0x0023097a CBExternal__chartBoostInit_m6768 (Bulk_Assembly-CSharp_6.cpp:22756)
    4 tts 0x00231038 CBExternal_init_m6797 (Bulk_Assembly-CSharp_6.cpp:23585)
    5 tts 0x0023695c Chartboost_Awake_m6970 (Bulk_Assembly-CSharp_6.cpp:29802)
    6 tts 0x00eb2f94 RuntimeInvoker_Void_t7589(MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp:832)
    7 tts 0x016007ea il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppObject**) (Runtime.cpp:327)
    8 tts 0x01125e26 ScriptingInvocation::Invoke(ScriptingException**, bool) (ScriptingInvocation.cpp:132)
    9 tts 0x0112622a ScriptingInvocationNoArgs::InvokeChecked() (ScriptingInvocationNoArgs.cpp:136)
    10 tts 0x0111d6cc MonoBehaviour::CallMethodInactive(ScriptingMethodIl2Cpp) (MonoBehaviour.cpp:370)
    11 tts 0x0111f6e2 MonoBehaviour::CallAwake() (MonoBehaviour.cpp:1422)
    12 tts 0x0111f86c MonoBehaviour::AddToManager() (MonoBehaviour.cpp:1516)
    13 tts 0x0111f6a8 MonoBehaviour::AwakeFromLoad(AwakeFromLoadMode) (MonoBehaviour.cpp:1411)
    14 tts 0x011415da AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode, void (*)(Object&, TypeTree const&)) (AwakeFromLoadQueue.cpp:322)
    15 tts 0x01141514 AwakeFromLoadQueue: PersistentManagerAwakeFromLoad(AwakeFromLoadMode, void (*)(Object&, TypeTree const&)) (AwakeFromLoadQueue.cpp:158)
    16 tts 0x010fa490 CompletePreloadMainData(AwakeFromLoadQueue&) (SaveAndLoadHelper.cpp:700)
    17 tts 0x010ed582 PreloadLevelOperation::IntegrateMainThread() (PreloadManager.cpp:801)
    18 tts 0x010ec470 PreloadManager::UpdatePreloadingSingleStep(bool) (PreloadManager.cpp:488)
    19 tts 0x010ece44 PreloadManager::WaitForAllAsyncOperationsToComplete() (PreloadManager.cpp:555)
    20 tts 0x010e99e4 PlayerStartFirstLevel() (Player.cpp:1081)
    21 tts 0x010e9b8a PlayerLoadFirstLevel() (Player.cpp:1116)
    22 tts 0x00f0a1a8 UnityLoadApplication (LibEntryPoint.mm:243)
    23 tts 0x0001a286 -[UnityAppController startUnity:] (UnityAppController.mm:99)
    24 Foundation 0x310c615e __NSFireDelayedPerform + 410
    25 CoreFoundation 0x306b21b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
    26 CoreFoundation 0x306b1dca __CFRunLoopDoTimer + 778
    27 CoreFoundation 0x306b0166 __CFRunLoopRun + 1206
    28 CoreFoundation 0x3061af0a CFRunLoopRunSpecific + 518
    29 CoreFoundation 0x3061acee CFRunLoopRunInMode + 102
    30 GraphicsServices 0x3552165e GSEventRunModal + 134
    31 UIKit 0x32f66168 UIApplicationMain + 1132
    32 tts 0x0000cd84 main (main.mm:37)
    33 libdyld.dylib 0x3b7e7ab4 start + 0


    Your help is really appreciated.

    Thanks.
     

    Attached Files:

  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @kenli

    It looks like this problem occurs in a p/invoke call from managed code to native code. Can you provide the signature of the native method (chartBoostInit) and the signature of the corresponding extern declaration in managed code (including the DLLImport attribute). I would like to see how this is being called.