Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Asset bundle decompression is crashing Unity 5.3.1p3

Discussion in 'iOS and tvOS' started by aixa, Jan 20, 2016.

  1. aixa

    aixa

    Joined:
    Sep 28, 2012
    Posts:
    46
    Hi,
    I'm having wierd problem with asset bundles. When I run game on iOS device, I get crash when the game is trying to load asset bundles from the cache, it gets stuck on DecompressAndStore().
    I have tried to use this function on Awake() - Caching.compressionEnabled = false, but still the error is the same.
    The game is working fine when it loads the asset bundles for the first time, but later it always crashes in some random places when I have unload them and try to load again.
    The same code is running without any problem on Unity 5.2 on iOS and with Unity 5.3 on windows standalone.

    I'm using Xcode 7.2 (7C68) with Unity 5.3.1p3 and this is logs I get from Xcode
    Code (CSharp):
    1. starting www download: file:///var/mobile/Containers/Bundle/Application/A7B54158-7738-48FC-8BE9-CAD1E1A7F607/myAwesomeGame.app/Data/Raw/AssetBundles/iOS/ui_elem/pausebtn
    2. Unable to open archive file for writing: '/var/mobile/Containers/Data/Application/D176270A-89CB-450F-9138-65D10296C097/Library/UnityCache/Temp/166b0508ba7b14d0bbed7209ead3f693/__data'
    3. (Filename: /Users/builduser/buildslave/unity/build/Runtime/VirtualFileSystem/ArchiveFileSystem/ArchiveStorageCreator.cpp Line: 51)
    4. Failed to decompress data for the AssetBundle 'file:///var/mobile/Containers/Bundle/Application/A7B54158-7738-48FC-8BE9-CAD1E1A7F607/myAwesomeGame.app/Data/Raw/AssetBundles/iOS/ui_elem/pausebtn'.
    5. (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
    6. starting www download: file:///var/mobile/Containers/Bundle/Application/34FAAB88-F896-48E2-942A-DDEC4B2518A4/myAwesomeGame.app/Data/Raw/AssetBundles/iOS/soundbanks/soundbank_ring.bnk
    7. starting www download: file:///var/mobile/Containers/Bundle/Application/34FAAB88-F896-48E2-942A-DDEC4B2518A4/myAwesomeGame.app/Data/Raw/AssetBundles/iOS/soundbanks/soundbank_start.bnk
    8. starting www download: file:///var/mobile/Containers/Bundle/Application/34FAAB88-F896-48E2-942A-DDEC4B2518A4/myAwesomeGame.app/Data/Raw/AssetBundles/iOS/soundbanks/soundbank_click.bnk
    9. myAwesomeGame was compiled with optimization - stepping may behave oddly; variables may not be available.
    and the callstack:

    Code (CSharp):
    1. (lldb) bt * thread #37: tid = 0xc8987, 0x00b268bc myAwesomeGame`::Lock() + 8 at VirtualFileSystem.cpp:733, stop reason = EXC_BAD_ACCESS (code=1, address=0x410)  
    2. frame #0: 0x00b268bc myAwesomeGame`::Lock() + 8 at VirtualFileSystem.cpp:733 [opt]  
    3. frame #1: 0x009146c8 myAwesomeGame`::OnArchiveStorageBlocksInfoProcessed() + 204 at AssetBundleLoadFromStreamAsyncOperation.cpp:69 [opt]
    4. * frame #2: 0x00b2c67a myAwesomeGame`::DecompressAndStore() + 58 at ArchiveStorageConverter.cpp:274 [opt]  
    5. frame #3: 0x00b2c9b2 myAwesomeGame`::ConversionThreadFunc() + 22 at ArchiveStorageConverter.cpp:194 [opt]  
    6. frame #4: 0x00b23e1a myAwesomeGame`::RunThreadWrapper() + 46 at Thread.cpp:40 [opt]  
    7. frame #5: 0x2206ec7e libsystem_pthread.dylib`_pthread_body + 138  
    8. frame #6: 0x2206ebf2 libsystem_pthread.dylib`_pthread_start + 110  
    9. frame #7: 0x2206ca08 libsystem_pthread.dylib`thread_start + 8
    If you need any extra information just let me know.
    Thanks for any help
     
  2. DziDAI

    DziDAI

    Joined:
    Dec 6, 2012
    Posts:
    68
    Hi @aixa

    Did you solve your problem?

    I'm using asset bundles, and I have very similar crashes on iOS,
    In editor works withous problem

    (Unity 5.3.4p2)

    Here my crashes:
    first: http://take.ms/9isvy
    second: http://take.ms/uARtI