IL2CPP crashes at GarbageCollectSharedAssets and LoadLevel

Hi, everyone.

I’m developing an iOS App. But it is crashed at ‘GarbageCollectSharedAssets’ and ‘LoadLevel’.
The version of Unity is 4.6.4 p1 and scripting backend is IL2CPP.
I read that the crash (scripting backend is Mono) is fixed.
But if the scripting backend is IL2CPP, how to resolve the crash?

Welcome to the forum!

Did you submit a bug report?

Of course.

@C0MPLETE

Can you let me know the bug number? That way I can take a brief look and see if there is a work around we can provide before we can get this bug fixed. Thanks.

When you post in the forum, you should always post the case number of the bug in the case that someone from Unity finds it, such that it is easy for them to investigate the bug.

Edit: Was too slow :slight_smile:

The bug number is 687036 I reported. But I didn’t attach whole project because it is too heavy.

@C0MPLETE

Thanks for submitting the bug. I don’t know of a work around now, unfortunately. We may need the project to help reproduce this case. We have a few other ways to obtain a large project, so our QA team will likely contact you when they process the bug report.

Did you slove?

@ainijiujiu

No, we have not yet investigated this issue. If are seeing the same problem and can provide a smaller project to reproduce it. That will help us. If so, please submit a different bug report and include the project. Thanks!

Recently, When I updated all of assetbundles in project, the crash doesn’t occured. I expected that the problem is the sync of the app and assetbundles. Thanks!

@C0MPLETE

Excellent, thanks for letting us know. Can you tell us specific what you updated? Maybe others are facing a similar problem.

I got the same crash in Unity4.6.4P4.
This crash occurred when LoadLevel(). It seems that only occurred on ARMV7 device.(iPad mini and iPhone 5)
Have you resolve this in the newer version unity3d?

@JoshPeterson

* thread #1: tid = 0xccf81, 0x01fa634c warwings`il2cpp::vm::LivenessState::AddProcessObject(object=0x00916964, state=0x1dc6c280) + 48 at Liveness.cpp:309, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xe92d4176)
  * frame #0: 0x01fa634c warwings`il2cpp::vm::LivenessState::AddProcessObject(object=0x00916964, state=0x1dc6c280) + 48 at Liveness.cpp:309
    frame #1: 0x01fa5f08 warwings`il2cpp::vm::LivenessState::TraverseGenericObject(Il2CppObject*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseGCDescriptor(Il2CppObject*, il2cpp::vm::LivenessState*) + 24 at Liveness.cpp:191
    frame #2: 0x01fa5ef0 warwings`il2cpp::vm::LivenessState::TraverseGenericObject(object=0x0277dde8, state=0x1dc6c280) + 48 at Liveness.cpp:163
    frame #3: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #4: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e203260, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #5: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #6: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e203130, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #7: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #8: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e29ae00, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #9: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #10: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0ca67aa0, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #11: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #12: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0d8cd000, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #13: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #14: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0cca1000, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #15: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #16: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e203000, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #17: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #18: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0d0e3000, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #19: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #20: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e29ac40, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #21: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #22: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e68c550, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #23: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #24: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e44c800, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #25: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #26: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x12c43000, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #27: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #28: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0d0e3390, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #29: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #30: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e203980, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #31: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #32: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0d0e3130, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #33: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #34: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0db56900, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #35: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #36: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0db56240, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #37: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #38: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0d987480, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #39: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #40: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0db56b40, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #41: 0x01fa6154 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #42: 0x01fa6144 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e68c000, state=0x1dc6c280) + 272 at Liveness.cpp:287
    frame #43: 0x01fa61c0 warwings`il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 16 at Liveness.cpp:129
    frame #44: 0x01fa61b0 warwings`il2cpp::vm::LivenessState::TraverseArray(array=0x0e203390, state=0x1dc6c280) + 380 at Liveness.cpp:299
    frame #45: 0x01fa6a34 warwings`il2cpp::vm::Liveness::FromStatics(void*) [inlined] il2cpp::vm::LivenessState::TraverseGenericObject(Il2CppObject*, il2cpp::vm::LivenessState*) + 84 at Liveness.cpp:167
    frame #46: 0x01fa69e0 warwings`il2cpp::vm::Liveness::FromStatics(void*) [inlined] il2cpp::vm::LivenessState::TraverseObjects() + 40 at Liveness.cpp:129
    frame #47: 0x01fa69b8 warwings`il2cpp::vm::Liveness::FromStatics(state=0x1dc6c280) + 392 at Liveness.cpp:455
    frame #48: 0x0197fc20 warwings`GarbageCollectSharedAssets(bool) [inlined] MarkManagedStaticVariableRoots(gcState=0xffffffff) + 1928 at GarbageCollectSharedAssets.cpp:496
    frame #49: 0x0197fc04 warwings`GarbageCollectSharedAssets(monoReferences=<unavailable>) + 1900 at GarbageCollectSharedAssets.cpp:242

@big_march

We’ve not yet had a project which can reproduce this issue, so if you can provide one, we would greatly appreciate it. I don’t think this is a crash that we will easily be able to track down without being able to reproduce it.

Test in Unity4.6.5f1, this crash didn’t occurred again.

@JoshPeterson

Hey,
I just had this occur with an iOS build from Unity 5.1.3p3. Should I submit it as a bug report? Is sending over just the XCode project enough? Thanks.

@VoxelBoy

There is no need for a bug report, we have a correction internally for this issue. It will be corrected in the 5.1.4 release next week. I would recommend falling back to 5.1.3p2, where this bug does not occur, if possible.

If you need something else that is in 5.1.3p3, I can send you a link to a pre-release version of 5.1.4 that has this fix. PIng me via a conversation if you need that link.

@JoshPeterson

Would this issue affected 4.6.8p2 ? We upgraded to fix the ios9 font issues, but now are crashing on boot with something that looks very much like this bug.

What version of 4.6 should we rollback to ?

Thread : Crashed: com.apple.main-thread
0  ScrapForceOmega                0x00000001013584c8  + 4315137224
1  ScrapForceOmega                0x0000000101181570 il2cpp::vm::Liveness::Begin(TypeInfo*, int, void (*)(void**, int, void*), void*, void (*)(), void (*)()) (Liveness.cpp:467)
2  ScrapForceOmega                0x0000000100cbea8c GarbageCollectSharedAssets(bool) (GarbageCollectSharedAssets.cpp:470)
3  ScrapForceOmega                0x0000000100cd35a8 CleanupAfterLoad() (SaveAndLoadHelper.cpp:518)
4  ScrapForceOmega                0x0000000100cc18c8 LevelLoading::LoadLevel(int, std::string const&, AwakeFromLoadQueue&) (Player.cpp:1361)
5  ScrapForceOmega                0x0000000100cc65a0 PreloadLevelOperation::IntegrateMainThread() (PreloadManager.cpp:796)
6  ScrapForceOmega                0x0000000100cc54d8 PreloadManager::UpdatePreloadingSingleStep(bool) (ThreadUtility.h:54)
7  ScrapForceOmega                0x0000000100cc5e1c PreloadManager::WaitForAllAsyncOperationsToComplete() (PreloadManager.cpp:555)
8  ScrapForceOmega                0x0000000100cc2e8c PlayerLoop(bool, bool, IHookEvent*) (Player.cpp:1800)
9  ScrapForceOmega                0x0000000100ad3d78 UnityPlayerLoop (LibEntryPoint.mm:253)
10 ScrapForceOmega                0x00000001000ce30c UnityRepaintImpl(bool) (UnityAppController+Rendering.mm:225)
11 ScrapForceOmega                0x00000001000cdc50 __51-[UnityAppController(Rendering) repaintDisplayLink]_block_invoke (UnityAppController+Rendering.mm:55)
12 libdispatch.dylib              0x0000000198981994 _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x0000000198981954 _dispatch_client_callout + 16
14 libdispatch.dylib              0x000000019898620c _dispatch_main_queue_callback_4CF + 1608
15 CoreFoundation                 0x0000000186647544 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
16 CoreFoundation                 0x00000001866455ec __CFRunLoopRun + 1492
17 CoreFoundation                 0x0000000186570f74 CFRunLoopRunSpecific + 396
18 GraphicsServices               0x000000018ffd36fc GSEventRunModal + 168
19 UIKit                          0x000000018b172d94 UIApplicationMain + 1488
20 ScrapForceOmega                0x00000001000ca15c main (main.mm:37)
21 libdyld.dylib                  0x00000001989aea08 start + 4

@JoshPeterson Hi! Will the 4.6.8 patch that fixes this be coming out next week as well? We can’t rollback to an older version because of the iOS 9 unicode bug, and we can’t use this version because of the crash. Please help, you’re our only hope! If you have a link to the prerelease version of 4.6.8 with the fix we’d love to try that over the weekend- we’re on a very tight release schedule. Thanks!
Josh

@caecus @nsejosh

We have any early version of 4.6.8p3 which corrects this issue available here:

Revision: 5edf5b4fd05e
Version: 4.6.8p3
MAC: http://beta.unity3d.com/download/5683418501/unity_update-4.6.8p3.dmg
(md5sum=4dcf4801f1e44f8ab7b6251a20cb5556)
PC: http://beta.unity3d.com/download/5683418501/UnitySetup_update-4.6.8p3.exe
(md5sum=35b0e9fec080d0208fd6703d738f37c0)

The problem did occur only in 4.6.8p2 (in the 4.6 series). We’ll have the final 4.6.8p3 release with more changes available next week, so please upgrade to that when it is available.

1 Like

Hi,

We have similar crash with “Application.LoadLevelAsync” and the P3 you provided does not fix the issue :frowning:
Btw, this version is 4.6.8p2 from sept 10th (72e1c4081d0). I re-installed many times, it’s not a P3 and/or the revision is not 5edf5b4fd05e

Regards

Nicolas