Game crashes on iphone with Unity 4.1.2

The game works fine in editor but crashes on the device.
It was working fine with version 4.0.1

Last thing that shows up on my stack is ‘should_process_value’ stop reason = EXC_BAD_ACCESS (code=1, address=0x4)

You need more lines of stack trace to guess the reason. Type “bt” into Xcode debugger console and inspect its output there.

True :slight_smile:

Thing is, since I am in a bit of tight schedule, I reversed to Unity 4.0.1 and everything works fine.
I remember that the call stack was starting with garbage collector.

I hope I will soon have the time to re-create it and then post again.

OK

I reinstalled Unity and tried it again. So here is the dump from the xcode:


  • thread #1: tid = 0x2503, 0x01362c00 texasvampshould_process_value + 48, stop reason = EXC_BAD_ACCESS (code=1, address=0x104) frame #0: 0x01362c00 texasvampshould_process_value + 48
    frame #1: 0x01363010 texasvampmono_add_process_object + 72 frame #2: 0x0136334c texasvampmono_traverse_objects + 108
    frame #3: 0x013634c0 texasvampmono_traverse_objects + 480 frame #4: 0x013634c0 texasvampmono_traverse_objects + 480
    frame #5: 0x013634c0 texasvampmono_traverse_objects + 480 frame #6: 0x013634c0 texasvampmono_traverse_objects + 480
    frame #7: 0x013634c0 texasvampmono_traverse_objects + 480 frame #8: 0x013634c0 texasvampmono_traverse_objects + 480
    frame #9: 0x013634c0 texasvampmono_traverse_objects + 480 frame #10: 0x013634c0 texasvampmono_traverse_objects + 480
    frame #11: 0x013634c0 texasvampmono_traverse_objects + 480 frame #12: 0x013634c0 texasvampmono_traverse_objects + 480
    frame #13: 0x013637d4 texasvampmono_unity_liveness_calculation_from_statics + 592 frame #14: 0x00faab64 texasvampGarbageCollectSharedAssets(bool) [inlined] MarkManagedStaticVariableRoots(gcState=0x00000001) + 1436 at GarbageCollectSharedAssets.cpp:442
    frame #15: 0x00faab50 texasvampGarbageCollectSharedAssets() + 1416 at GarbageCollectSharedAssets.cpp:206 frame #16: 0x00fb1004 texasvampUnloadUnusedAssetsOperation::IntegrateMainThread(this=0x0b693f30) + 24 at PreloadManager.cpp:832
    frame #17: 0x00fb01e8 texasvampPreloadManager::UpdatePreloadingSingleStep(this=0x03225580) + 300 at PreloadManager.cpp:451 frame #18: 0x00fb06a0 texasvampPreloadManager::WaitForAllAsyncOperationsToComplete(this=0x03225580) + 40 at PreloadManager.cpp:515
    frame #19: 0x00fb0788 texasvampPreloadManager::UpdatePreloading() + 192 at PreloadManager.cpp:538 frame #20: 0x00faef10 texasvampPlayerLoop(batchMode=false, performRendering=true, pHookEvt=0x00000000) + 224 at Player.cpp:1579
    frame #21: 0x00d76f10 texasvampUnityPlayerLoop() + 36 at LibEntryPoint.mm:376 frame #22: 0x00009b68 texasvamp-[AppController Repaint](self=0x03286740, _cmd=0x01511471) + 144 at AppController.mm:342
    frame #23: 0x00009ac8 texasvamp-[AppController RepaintDisplayLink](self=0x03286740, _cmd=0x015114a5) + 384 at AppController.mm:323 frame #24: 0x0306ab3a libglInterpose.dylib-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 306
    frame #25: 0x3573d098 QuartzCoreCA::smile:isplay::smile:isplayLink::dispatch(unsigned long long, unsigned long long) + 160 frame #26: 0x3573cff0 QuartzCoreCA::smile:isplay::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 64
    frame #27: 0x37994fd6 IOMobileFramebufferIOMobileFramebufferVsyncNotifyFunc + 154 frame #28: 0x34737448 IOKitIODispatchCalloutFromCFMessage + 192
    frame #29: 0x33b1a5da CoreFoundation__CFMachPortPerform + 118 frame #30: 0x33b25172 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 34
    frame #31: 0x33b25116 CoreFoundation__CFRunLoopDoSource1 + 138 frame #32: 0x33b23f98 CoreFoundation__CFRunLoopRun + 1384
    frame #33: 0x33a96ebc CoreFoundationCFRunLoopRunSpecific + 356 frame #34: 0x33a96d48 CoreFoundationCFRunLoopRunInMode + 104
    frame #35: 0x376492ea GraphicsServicesGSEventRunModal + 74 frame #36: 0x359ac300 UIKitUIApplicationMain + 1120
    frame #37: 0x0000a820 texasvampmain(argc=1, argv=0x2fdffc84) + 212 at main.mm:25 frame #38: 0x3bc05b20 libdyld.dylibstart + 4

Also there is a screenshot from the xcode debug view

1224423--50887--$Screen Shot 2013-04-19 at 8.59.30 PM.png

argh, it seems you hit nasty bug that will be (should be) fixed in next release (be it 4.1.3 or 4.2)

i found that if i had this problem if i had empty game objects, so i just added game objects at the start of the app and it fixed it.

When is the next release planned? any time soon

We just hit this same issue on 4.2.0f4. So far a one-off crash.
Is there a fix coming in an upcoming release or is the intended fix already in 4.2 ?

Is there a fix coming in an upcoming release or is the intended fix already in 4.2 ?
it is expected to be fixed (if we refer to the same bug)
so if you get it again - please bug report with repro steps (as good as you can collect)

Can you please share the bug request # for this fix? thank you

we are seeing the same crash with the same exact call stack in Unity 4.7.1