Search Unity

Various unreproducible crashes caused by asset bundles

Discussion in 'Asset Bundles' started by Ed-Marty, Apr 18, 2019.

  1. Ed-Marty

    Ed-Marty

    Joined:
    Jul 16, 2015
    Posts:
    15
    We recently released a game on iOS and Android, and a bunch of crash reports have started coming in on iOS that appear to be due to problems with shaders in asset bundles and other asset bundle problems. We haven't been able to reproduce this problem, so we aren't sure what we can do about them other than do a new release with new builds of the asset bundles and hope that they work. We're using Unity 2108.2.12f1.

    Is there anything we can do to try to resolve this problem?

    For reference, here are some of the places where it has crashed. All of these are internal to Unity apparently. There's nothing specific to our game in the stack trace

    And a dozen similar ones.

    And a dozen similar ones

    And again, a dozen similar ones.
     
  2. Ed-Marty

    Ed-Marty

    Joined:
    Jul 16, 2015
    Posts:
    15
    I am seeing many more of these now. Still no idea how to track this down. Any ideas?
     
    KB73 likes this.
  3. dirty-rectangle

    dirty-rectangle

    Joined:
    Apr 23, 2015
    Posts:
    78
    @Ed-Marty Did you find a fix for this issue? we seeing similar crash callstacks, for example


    iOS Unity 2018.4.0f1

    Code Type: ARM-64
    Exception Type: SIGSEGV
    Exception Codes: SEGV_ACCERR at 0x0


    Thread 29 Crashed:
    0 libsystem_platform.dylib 0x00000001b570251c 0x1b56fa000 + 34076
    1 appname 0x00000001052f3778 0x104934000 + 10221432 std::__1::enable_if<(__is_forward_iterator<ShaderLab::SerializedSubProgram::ConstantBuffer*>::value) && (is_constructible<ShaderLab::SerializedSubProgram::ConstantBuffer, std::__1::iterator_traits<ShaderLab::SerializedSubProgram::ConstantBuffer*>::reference>::value), void>::type std::__1::vector<ShaderLab::SerializedSubProgram::ConstantBuffer, std::__1::allocator<ShaderLab::SerializedSubProgram::ConstantBuffer> >::assign<ShaderLab::SerializedSubProgram::ConstantBuffer*>(ShaderLab::SerializedSubProgram::ConstantBuffer*, ShaderLab::SerializedSubProgram::ConstantBuffer*) (in appname) (vector:1415)
    2 appname 0x00000001052f1a7c 0x104934000 + 10214012 void resize_trimmed<std::__1::vector<ShaderLab::SerializedSubShader, std::__1::allocator<ShaderLab::SerializedSubShader> > >(std::__1::vector<ShaderLab::SerializedSubShader, std::__1::allocator<ShaderLab::SerializedSubShader> >&, unsigned int) (in appname) (vector_utility.h:38)
    3 appname 0x00000001052f1a24 0x104934000 + 10213924 void resize_trimmed<std::__1::vector<ShaderLab::SerializedSubShader, std::__1::allocator<ShaderLab::SerializedSubShader> > >(std::__1::vector<ShaderLab::SerializedSubShader, std::__1::allocator<ShaderLab::SerializedSubShader> >&, unsigned int) (in appname) (vector_utility.h:27)
    4 appname 0x0000000105123aec 0x104934000 + 8321772 void SafeBinaryRead::TransferSTLStyleArray<dynamic_array<long long, 0ul> >(dynamic_array<long long, 0ul>&, TransferMetaFlags) (in appname) (SafeBinaryRead.h:162)
    5 appname 0x0000000105124cbc 0x104934000 + 8326332 void Transfer_Blittable_ArrayField<SafeBinaryRead, ColorRGBA32>(SafeBinaryRead&, ArrayInfo&, StaticTransferFieldInfo const&) (in appname) (Blittable.h:22)
    6 appname 0x0000000105124ee4 0x104934000 + 8326884 void Transfer_Blittable_ArrayField<SafeBinaryRead, BitField>(SafeBinaryRead&, ArrayInfo&, StaticTransferFieldInfo const&) (in appname) (Blittable.h:32)
    7 appname 0x000000010505d700 0x104934000 + 7509760 void std::__1::__insertion_sort_3<std::__1::less<BuiltinResourceManager::Resource>&, BuiltinResourceManager::Resource*>(BuiltinResourceManager::Resource*, BuiltinResourceManager::Resource*, std::__1::less<BuiltinResourceManager::Resource>&) (in appname) (algorithm:3733)
    8 appname 0x0000000104d270c8 0x104934000 + 4141256 std::__1::__split_buffer<std::__1::pair<int, ConstantString>, std::__1::allocator<std::__1::pair<int, ConstantString> >&>::~__split_buffer() (in appname) (__split_buffer:340)
    9 appname 0x000000010505f78c 0x104934000 + 7518092 bool std::__1::__insertion_sort_incomplete<ResourceManager::Dependency::Sorter&, ResourceManager::Dependency*>(ResourceManager::Dependency*, ResourceManager::Dependency*, ResourceManager::Dependency::Sorter&) (in appname) (algorithm:3791)
    10 appname 0x000000010505f54c 0x104934000 + 7517516 void std::__1::__insertion_sort_3<ResourceManager::Dependency::Sorter&, ResourceManager::Dependency*>(ResourceManager::Dependency*, ResourceManager::Dependency*, ResourceManager::Dependency::Sorter&) (in appname) (algorithm:3746)
    11 appname 0x000000010505f500 0x104934000 + 7517440 void std::__1::__insertion_sort_3<ResourceManager::Dependency::Sorter&, ResourceManager::Dependency*>(ResourceManager::Dependency*, ResourceManager::Dependency*, ResourceManager::Dependency::Sorter&) (in appname) (ResourceManager.h:191)
    12 appname 0x000000010509dc4c 0x104934000 + 7773260 dynamic_array<short, 0ul>::assign(short const*, short const*) (in appname) (dynamic_array.h:263)
    13 libsystem_pthread.dylib 0x00000001b57102c0 0x1b5705000 + 45760
    14 libsystem_pthread.dylib 0x00000001b5710220 0x1b5705000 + 45600
    15 libsystem_pthread.dylib 0x00000001b5713cdc 0x1b5705000 + 60636
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Looks like a recently fixed race condition in AssetBundle loading. Yes, it's very hard to reproduce. Check the release notes for 2019.1 or 2019.2. It's possible that not all supported versions with the fix have been released yet.