Search Issue Tracker

Fixed

Fixed in 2022.3.29f1, 6000.0.0b16, 7000.0.0a1

Votes

3

Found in

2022.3.5f1

2023.1.5f1

2023.2.0b3

2023.3.0a1

6000.0.0b11

7000.0.0a1

Issue ID

UUM-43771

Regression

No

[AsyncLoadInEditor] Crash on SerializedFile::WriteObject() when building the project

--

-

Steps to reproduce:
1. Open the attached “IN-45795” project
2. Build the project

Expected result: Build completed with a result of ‘Succeeded' or 'Failed’
Actual result: The Editor crashes

Reproducible with: 2022.1.0a15, 2022.3.5f1, 2023.1.5f1, 2023.2.0a13 (all build targets)
Not reproducible with: 2021.3.28f1, 2022.1.0a14 (no "Load texture data on demand" feature)
Not reproducible with: 2023.2.0a22 (Standalone case), 2022.3.23f1
Fixed in: 2023.2.0a14 (Standalone case)

Reproduced on: macOS Monterey 13.3.1 (Intel), Windows 10 (by user)

Notes:
- Switching platform to WebGL sometimes crashes with a similar stack trace
- Reproduced with Standalone, Android, and WebGL platforms
- Standalone case is a duplicate of UUM-31364.
- Android case seen in UUM-37798 (closed as duplicate of this case) -> see UUM-37798 for more information.

First few lines of the stack trace {*}for the standalone failure{*}:
#0 0x0000010d10b8c3 in Texture2D::GetUnusedMipCount() const
#1 0x0000010d1713bf in void Sprite::Transfer<GenerateTypeTreeTransfer>(GenerateTypeTreeTransfer&)
#2 0x0000010d16c717 in Sprite::VirtualRedirectTransfer(GenerateTypeTreeTransfer&)
#3 0x0000010d7e3118 in TypeTreeCache::GetTypeTree(Object const*, TransferInstructionFlags, TypeTree&)
#4 0x0000010d7cdfc0 in SerializedFile::WriteObject(Object&, long long, short, BuildUsageTag const&, GlobalBuildData const&)
#5 0x0000010d7ab33d in PersistentManager::WriteFile(core::basic_string_ref<char>, int, WriteData const*, int, GlobalBuildData const&, VerifyWriteObjectResult ({_})(Object{_}, BuildTargetPlatform), BuildTargetSelection, TransferInstructionFlags, WriteInformation&, InstanceIDResolver const*, PersistentManager::LockFlags, int ({_})(PersistentManager::ReportWriteObjectStep, int, core::basic_string<char, core::StringStorageDefault<char>> const&, int, void{_}), void*)

 

First few lines of the stack trace {*}when building an Android Player{*}:

0x00007ff73ecc4a1e (Unity) fastmemcpy (at C:/UnitySrc/unity-2022.3/Runtime/Serialize/SerializationCaching/CachedWriter.cpp:18)
0x00007ff73ecc2f24 (Unity) CachedWriter::Write (at C:/UnitySrc/unity-2022.3/Runtime/Serialize/SerializationCaching/CachedWriter.cpp:106)
0x00007ff7405f940b (Unity) StreamedBinaryWrite::TransferTypelessData (at C:/UnitySrc/unity-2022.3/Runtime/Serialize/TransferFunctions/StreamedBinaryWrite.cpp:62)
0x00007ff73e116872 (Unity) Texture2D::Transfer<StreamedBinaryWrite> (at C:/UnitySrc/unity-2022.3/Runtime/Graphics/Texture2D.cpp:1535)
0x00007ff73e11811c (Unity) StreamedBinaryWrite::Transfer<Texture2D> (at C:/UnitySrc/unity-2022.3/Runtime/Serialize/TransferFunctions/StreamedBinaryWrite.h:155)
0x00007ff73e11da93 (Unity) StreamedBinaryWrite::TransferBase<Texture2D> (at C:/UnitySrc/unity-2022.3/Runtime/Serialize/TransferFunctions/StreamedBinaryWrite.h:144)
0x00007ff73e144ce5 (Unity) Texture2D::VirtualRedirectTransfer (at C:/UnitySrc/unity-2022.3/Runtime/Graphics/Texture2D.cpp:1775)

  1. Resolution Note (fix version 7000.0.0a1):

    Crashes during Player build when "Load texture data on demand" is enabled in the Editor settings have been fixed.

Comments (3)

  1. Genebris

    Dec 07, 2023 20:34

    The workaround is to disable this option before build. They didn't bother adding it to API but you can automatically edit the config file itself.

  2. jiannis_hs

    Dec 05, 2023 11:03

    We are running into this issue, is there a workaround?

  3. bakashu92064077

    Jul 23, 2023 21:39

    I want see all detel black up

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.