Search Unity

Crashes on iOS (asset bundle related)

Discussion in 'iOS and tvOS' started by liortal, Jul 12, 2016.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Hey,

    We are experiencing many such crashes on our iOS version. These seem to be related to asset bundle loading (or unloading?) while the game is terminating (according to the stack, though i am not sure).

    This release was made using Unity 5.3.5p4 (the last one was with 5.3.4p1 and did not have this specific crash type).

    Is this a known issue? what can we do to resolve it ?
     
  2. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @liortal,
    We have seen this stack pop up. We have not been able to get a reproduction project back though. Do you have such a reproduction project? It would greatly help our investigation into this issue. If you file a bug with a reproduction case, please post the case number here.
    Cheers,
    Chris
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Unfortunately I don't know the exact reproduction steps.

    We have a crash reporting service that reports all the crashes in our game. This crash is the top one right now for the latest version. But i do not have any steps on how to reproduce the issue (we've never seen it internally during testing).

    Here are some stats, this is what i can offer at the moment:
    1. It occurred over 600 times already.
    2. The build was created using Unity 5.3.5p4.
    3. All devices ran iOS 9.3.2 (100%)
    4. I was able to find this crash in the previous version of our game (built with 5.3.4p1):
    Again, as i said, even if i shared our project with you, without exact reproduction steps, there's probably little you'll be able to do as this isn't reproduced internally.

    Could you maybe help me better understand the scenario through the stack trace, having more insight into what it actually means? it appears that the application is terminating. Is this callback raised when the user is shutting down the game? will it also happen during a crash? (e.g: the game crashed anyway for another reason and is performing a cleanup)

    Any information may help in finding the root cause for this issue :)
     
  4. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    Hi @christophergoy ,
    We are also experiencing similar issue, we are not sure when it occurs as its happening on live with with our users.

    0x1010dff20 UnityWebStream::Release() (UnityWebStream.cpp:75)
    0x1010dfe4c CleanupUnityWebStreams(void*) (LinkedList.h:26)
    0x100de3ff8 RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() (RegisterRuntimeInitializeAndCleanup.cpp:69)
    0x100d37684 RuntimeCleanup() (Player.cpp:1073)
    0x10010ce48 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:358)
    0x185c31240 -[UIApplication _terminateWithStatus:] + 280
    0x185e4fff8 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2017 + 796
    0x185e530c8 _runAfterCACommitDeferredBlocks + 292
    0x185e60a80 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
    0x185b925a4 _afterCACommitHandler + 96
    0x1809f8728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    0x1809f64cc __CFRunLoopDoObservers + 372
    0x1809f68fc __CFRunLoopRun + 928
    0x180920c50 CFRunLoopRunSpecific + 384
    0x182208088 GSEventRunModal + 180
    0x185c0a088 UIApplicationMain + 204
    0x1000f84ac main (main.mm:32)
    0x1804be8b8 (Missing)

    we are using Unity 5.3.5p7 pro version
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @tanveerm good to know that this still happens with patch 7. This means that the issue is not fixed yet.
    I now wonder where it happens and whether they'll be able to fix it.
     
  6. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    @liortal , did you manage to get it to work by doing work around?
    @christophergoy , any updates on this? when will this be fixed?
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    What workaround? i am not ever sure where this happens (i never saw this issue in-house).
     
  8. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey guys, the stack that @tanveerm posted is being address currently. @liortal I have not been able to address your original stack trace yet, but it is next on my list of things to tackle. I'll keep you posted on this thread.
    Cheers,
    Chris
     
  9. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    @christophergoy Hi, its been long time we are getting this crash. are there any updates on this?
     
  10. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi @tanveerm,
    There was a fix submit a couple of weeks ago into 5.3.6p7. Are you still seeing this crash on that version or later?
    Cheers,
    Chris
     
  11. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    Hi @christophergoy ,
    We are still on 5.3.5p7, we will be moving to 5.4x very soon. Good to know that it has been fixed.
    Thanks,
    Tanveer.
     
  12. Betry

    Betry

    Joined:
    Nov 10, 2016
    Posts:
    1
    Hi @liortal,we happen on 5.3.6p8 device containt:iphone5c and ipad air2,i have load assetbundle use loadfromfile , crash message:
    BesideM FileSystemEntry::Set(char const*)+199
    1BesideM FileSystemEntry::Set(char const*)+164
    2BesideM FileSystemEntry::FileSystemEntry(char const*)+108
    3BesideM ArchiveStorageReader::Initialize(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long)+124
    4BesideM AssetBundleLoadFromAsyncOperation::InitializeAssetBundleStorage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long)+140
    5BesideM AssetBundleLoadFromFileAsyncOperation::LoadArchiveJob(void*)+26
    6BesideM JobQueue::Exec(JobInfo*, int, int)+86
    7BesideM JobQueue::Steal(JobGroup*, JobInfo*, int, int, bool)+214
    8BesideM JobQueue::ExecuteJobFromQueue()+72
    9BesideM JobQueue::processJobs(void*, bool*)+54
    10BesideM JobQueue::WorkLoop(void*)+8
    11BesideM Thread::RunThreadWrapper(void*)+46
    12libsystem_pthread.dylib __pthread_body+141
    13libsystem_pthread.dylib _pthread_start+102
     
  13. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    well we're still getting this in 5.4.3f1.
     
  14. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @tranveerm,
    Can you file a bug report and attach a reproduction case? If you have already filed a bug please the case number here.
    Cheers,
    Chris
     
  15. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    0 myth Release (UnityWebStream.cpp:75)
    1 myth Release (UnityWebStream.cpp:75)
    2 myth CleanupUnityWebStreams (LinkedList.h:26)
    3 myth ExecuteCleanup (RegisterRuntimeInitializeAndCleanup.cpp:69)
    4 myth RuntimeCleanup (Player.cpp:1069)
    5 myth UnityPlayerLoopImpl (LibEntryPoint.mm:243)
    6 myth UnityRepaint (UnityAppController+Rendering.mm:234)
    7 myth -[UnityAppController(Rendering) repaintDisplayLink] (UnityAppController+Rendering.mm:49)
    8 QuartzCore CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44
    9 QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 436
    10 IOKit IODispatchCalloutFromCFMessage + 372
    11 CoreFoundation ___CFMachPortPerform + 180
    12 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
    13 CoreFoundation ___CFRunLoopDoSource1 + 436
    14 CoreFoundation ___CFRunLoopRun + 1752
    15 CoreFoundation CFRunLoopRunSpecific + 424
    16 GraphicsServices GSEventRunModal + 100
    17 UIKit UIApplicationMain + 208
    18 myth main (main.mm:32)
    19 libdyld.dylib _start + 4

    We're using 5.3.7p4, and this crash online has a really high occur rate.