Addressables Build Never Completes - No Errors or Warnings, Just Nothing

I have updated my project from 2019.4.29 to 2021.3.31 a few days ago. I’m using Addressables 1.21.17.

I cleaned my build cache and performed a new default build. Everything seems to go well until it gets stuck on the screen in the attached image. Normally it takes me between 10-25 minutes to build when there’s no cache. But since updating to 2021.3.31 the build never completes. I let it run twice over night only to find the same screen in the morning. The console log is completely empty (notices, warnings, errors) so I never have anything to go on.

9407657--1317260--upload_2023-10-13_11-42-7.png

Does anyone have any ideas where to look?

Thanks!

I still haven’t gotten this working I’ve tried reinstalling Addressables and other packages that use it, but this is still happening after 5 days of trying to figure it out.

Terribly frustrating to diagnose this without errors!

You can use Visual Studio to attach debugger to Unity to see what’s running. It might provide more information to investigate the issue further.

Thanks for the suggestion. I ran through it a couple times with the VS debugger attached but it didn’t reveal anything at all in the logs. Would Visual Studio debugger normally show something in the Output debug log during an Addressables build?

On the chance someone at Unity looks at this, I was able to capture some code dump info.


  • Exception Analysis *

*** WARNING: Unable to verify checksum for mono-2.0-bdwgc.dll

KEY_VALUES_STRING: 1

Key : Analysis.CPU.Sec
Value: 10

Key : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on DESKTOP

Key : Analysis.DebugData
Value: CreateObject

Key : Analysis.DebugModel
Value: CreateObject

Key : Analysis.Elapsed.Sec
Value: 110

Key : Analysis.Memory.CommitPeak.Mb
Value: 98

Key : Analysis.System
Value: CreateObject

Key : Timeline.OS.Boot.DeltaSec
Value: 435159

Key : Timeline.Process.Start.DeltaSec
Value: 788

NTGLOBALFLAG: 0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS: 0

EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 0000000000000000
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 0

FAULTING_THREAD: 00009ca4

PROCESS_NAME: Unity.exe

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.

EXCEPTION_CODE_STR: 80000003

STACK_TEXT:
00000062334ec938 00007ffb050a30ce : 0000000000000010 000003f52f1d6128 0000000000000001 00007ff7bd0d3246 : ntdll!NtWaitForSingleObject+0x14
00000062334ec940 00007ff7bd0d31ba : 00000062334ecf90 00007ff7be5ae328 0000016500000000 0000000000001a28 : KERNELBASE!WaitForSingleObjectEx+0x8e
00000062334ec9e0 00007ff7bb0be6fa : 000003f52f1d612a 00000062334ecf90 00000062334ecf90 0000000000000001 : Unity+0x2c431ba
00000062334eca10 00007ff7bc2bc4bc : 00007ff7be5ae328 00000062334ecf90 00000062334ecbb0 0000000000000000 : Unity+0xc2e6fa
00000062334ecab0 00007ff7bc2bcac9 : 0000016480182470 00000062334ecf90 0000000000000000 000001653ccbd420 : Unity+0x1e2c4bc
00000062334ecf50 00007ff7bc2bcc3a : 0000016480182470 00000062334ed130 0000000000000038 00000062334ed130 : Unity+0x1e2cac9
00000062334ed070 00007ff7bbdf0ccc : 0000016768e35d50 0000016768e35d50 0000016768e35d50 00000167991ae760 : Unity+0x1e2cc3a
00000062334ed0f0 00007ff7baa1ee43 : 00007ff7bdb18668 00007ff7bdb18668 00000062334ed260 00007ffac58d8166 : Unity+0x1960ccc
00000062334ed170 00000169ad4819fa : 0000016768e35d50 0000016768e35d50 00007ff7bdb18668 0000016768e32000 : Unity+0x58ee43
00000062334ed1d0 00000169ad48164b : 000001679b17fd80 000001689162f1e0 0000000000000000 00000167991ae760 : 0x00000169ad4819fa 00000062334ed270 00000169ad48132a : 00000169ad481310 fffffffffffffffb 00000167155901b4 00007ffac5fbfee0 : 0x00000169ad48164b
00000062334ed2f0 00000168b60fea78 : 000001676242f2a5 000001676242f2a5 0000000000000001 0000016766fc91c0 : 0x00000169ad48132a 00000062334ed330 00000168b60f41f3 : 0000000000000000 0000000004000400 00000168901d0100 00000167dfaa2c30 : 0x00000168b60fea78
00000062334ed500 0000016868d5026c : 2f2f2f2f2f2f2f2f 2f2f2f2f2f2f2f2f 0077006f006c0066 006f0020002c0073 : 0x00000168b60f41f3 00000062334edf30 0000016868b750d5 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : 0x0000016868d5026c
00000062334ee050 0000016868b74b9d : 00300031002e0033 002e00380031002e 00000167295f4900 00000062334ee200 : 0x0000016868b750d5 00000062334ee150 0000016868b74703 : 00000167155901d0 0000016715540220 000001671ac06180 0000016868b74570 : 0x0000016868b74b9d
00000062334ee240 0000016868b73a6b : 00750042002f0065 00200064006c0069 0000000000000000 0000000000000000 : 0x0000016868b74703 00000062334ee2b0 0000016868b738c3 : 0000000000000002 00007ffb0371c45a 00000062333c6000 0000000000000000 : 0x0000016868b73a6b
00000062334ee370 0000016868b737e3 : 0000000000030000 00000062334ee558 00008568717ecd50 0000000000000000 : 0x0000016868b738c3 00000062334ee3e0 000001686892b2ee : 00000062334ee578 0000000000000000 0000000000000200 00007ffb0726e439 : 0x0000016868b737e3
00000062334ee440 00007ffac5ae65de : 0000000033587af4 000001671a6713a0 0000000000000000 00007ffb072e0070 : 0x000001686892b2ee 00000062334ee4d0 00007ffac5a1cd74 : 000001672126d040 000001686c4ae020 000001679b6f0620 00000167159b3c20 : mono_2_0_bdwgc!mono_jit_set_domain+0x5e8e 00000062334ee780 00007ffac5a1ceec : 0000000000000000 00000062334ee8d0 00000062334eeb00 00000062334eea60 : mono_2_0_bdwgc!mono_object_get_virtual_method+0x454 00000062334ee7d0 00007ff7bb3bf764 : 00000062334eea00 000001679b06b500 00007ffac5a1cde0 0000016821d72e20 : mono_2_0_bdwgc!mono_runtime_invoke+0x10c 00000062334ee980 00007ff7bb39f0a4 : 00000062334eeaa0 0000000000000000 00000062334eea60 00000062334eec28 : Unity+0xf2f764 00000062334ee9c0 00007ff7bbe8250d : 000001679b06b500 00000165580f5b00 0000000000000000 00000062334eeb30 : Unity+0xf0f0a4 00000062334eea30 00007ff7bbe08a80 : 000001679b06b500 00000164c0980015 0000000000000000 0000016799a46310 : Unity+0x19f250d 00000062334eec10 00007ff7bc4462b2 : 0000016500000002 000001653092da98 00000062334eee70 42f000004470c000 : Unity+0x1978a80 00000062334eed70 00007ff7bc4570c6 : 0000000000000001 42f000004470c000 00000078000003c3 00000078000003c3 : Unity+0x1fb62b2 00000062334eeed0 00007ff7bbec2343 : 0000016559088f10 0000000000000000 0000006200000000 0000016400000007 : Unity+0x1fc70c6 00000062334ef2f0 00007ff7bbec2218 : 00000167271fa248 00000167271fa248 00000062334ef379 00000062334ef480 : Unity+0x1a32343 00000062334ef320 00007ff7bc44fdfe : 0000000000000000 00000167271fa248 0000001dfffffec8 0000000000000019 : Unity+0x1a32218 00000062334ef3e0 00007ff7bc45923d : 0000016500000002 00000062334ef540 0000000000000002 0000016530052310 : Unity+0x1fbfdfe 00000062334ef500 00007ff7bbfef753 : 0000000000000000 0000006200000002 00000062334ef530 0000000000000001 : Unity+0x1fc923d 00000062334ef5e0 00007ff7bc42c87a : 0000000000000000 0000000000000001 000003f4b05d7b00 00007ff7be5fdfc0 : Unity+0x1b5f753 00000062334ef910 00007ff7bc43110b : 4081f74c36b243b4 00007ff7be57d0e8 00007ff7bc42e0f0 0000000000000000 : Unity+0x1f9c87a 00000062334efbb0 00007ff7bd810b6e : 000000000000000a 0000000000000000 0000000000000000 0000000000000000 : Unity+0x1fa110b 00000062334ffe80 00007ffb06477344 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : Unity+0x3380b6e 00000062334ffec0 00007ffb077c26b1 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : kernel32!BaseThreadInitThunk+0x14 00000062334ffef0 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21

STACK_COMMAND: ~0s; .ecxr ; kb

SYMBOL_NAME: unity+2c431ba

MODULE_NAME: Unity

IMAGE_NAME: Unity.exe

FAILURE_BUCKET_ID: BREAKPOINT_80000003_Unity.exe!Unknown

OS_VERSION: 10.0.19041.1

BUILDLAB_STR: vb_release

OSPLATFORM_TYPE: x64

OSNAME: Windows 10

FAILURE_ID_HASH: {5a2ef596-f596-8374-ee94-f467c85745b9}

Followup: MachineOwner

You can use Visual Studio Tool for Unity and use it to see the managed stack trace. Here is the documentation: Using Visual Studio Tools for Unity | Microsoft Learn.

When the Editor is building Addressables, use ‘Attach to Unity’ and ‘break’ to see what’s running in main thread.

I wasn’t able to break anywhere. It definitely attaches - it’s just not revealing details relevant to why it’s no progressing. When I look at the output, all I see is a bunch of these at the end.

The thread 0x27c20390 has exited with code 0 (0x0).
The thread 0x695c5f0 has exited with code 0 (0x0).
The thread 0x9be1fe40 has exited with code 0 (0x0).
The thread 0x27c20130 has exited with code 0 (0x0).
The thread 0x695c390 has exited with code 0 (0x0).

I decided to clear out all my Addressable objects except the defaults and that builds no problem. So I added a single object (a prefab) and the issue starts again. I did manage to get this from the Editor log file.

Build Task WriteSerializedFiles failed with exception:
The requested operation caused a stack overflow.
  at (wrapper managed-to-native) UnityEditor.Build.Content.ContentBuildInterface.WriteSerializedFile_Internal_Injected(string,UnityEditor.Build.Content.WriteCommand,UnityEditor.Build.Content.BuildSettings&,UnityEditor.Build.Content.BuildUsageTagGlobal&,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildReferenceMap,UnityEditor.Build.Content.PreloadInfo,UnityEditor.Build.Content.AssetBundleInfo,UnityEditor.Build.Content.WriteResult&)
  at UnityEditor.Build.Content.ContentBuildInterface.WriteSerializedFile_Internal (System.String outputFolder, UnityEditor.Build.Content.WriteCommand writeCommand, UnityEditor.Build.Content.BuildSettings settings, UnityEditor.Build.Content.BuildUsageTagGlobal globalUsage, UnityEditor.Build.Content.BuildUsageTagSet usageSet, UnityEditor.Build.Content.BuildReferenceMap referenceMap, UnityEditor.Build.Content.PreloadInfo preloadInfo, UnityEditor.Build.Content.AssetBundleInfo bundleInfo) [0x00000] in <273a7cbcc8d7454ea7ae78e07082aa77>:0
  at UnityEditor.Build.Content.ContentBuildInterface.WriteSerializedFile (System.String outputFolder, UnityEditor.Build.Content.WriteParameters parameters) [0x0005f] in <273a7cbcc8d7454ea7ae78e07082aa77>:0
  at UnityEditor.Build.Pipeline.WriteTypes.AssetBundleWriteOperation.Write (System.String outputFolder, UnityEditor.Build.Content.BuildSettings settings, UnityEditor.Build.Content.BuildUsageTagGlobal globalUsage) [0x00001] in D:\Unity\v1.2.0_playstation\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.20\Editor\WriteTypes\AssetBundleWriteOperation.cs:36
  at UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility.IRunCachedCallbacks<UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.Item>.ProcessUncached (UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility+WorkItem`1[T] item) [0x00081] in D:\Unity\v1.2.0_playstation\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.20\Editor\Tasks\WriteSerializedFiles.cs:172
  at UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility.RunCachedOperation[T] (UnityEditor.Build.Pipeline.Interfaces.IBuildCache cache, UnityEditor.Build.Pipeline.Interfaces.IBuildLogger log, UnityEditor.Build.Pipeline.Interfaces.IProgressTracker tracker, System.Collections.Generic.List`1[T] workItems, UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility+IRunCachedCallbacks`1[T] cbs) [0x0019e] in D:\Unity\v1.2.0_playstation\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.20\Editor\Utilities\TaskCachingUtility.cs:100
  at UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.Run () [0x0003d] in D:\Unity\v1.2.0_playstation\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.20\Editor\Tasks\WriteSerializedFiles.cs:120
  at UnityEditor.Build.Pipeline.BuildTasksRunner.Run (System.Collections.Generic.IList`1[T] pipeline, UnityEditor.Build.Pipeline.Interfaces.IBuildContext context) [0x000cd] in D:\Unity\v1.2.0_playstation\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.20\Editor\Shared\BuildTasksRunner.cs:56
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
UnityEditor.Build.Pipeline.Utilities.BuildLogger:LogError (string,object[]) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Utilities/BuildLogger.cs:124)
UnityEditor.Build.Pipeline.BuildTasksRunner:Run (System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IBuildContext) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Shared/BuildTasksRunner.cs:63)
UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&,System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IContextObject[]) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/ContentPipeline.cs:155)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:smile:oBuild<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:302)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:BuildDataImplementation<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:91)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptBase.cs:92)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,bool) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Settings/AddressableAssetSettings.cs:2828)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&,UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Settings/AddressableAssetSettings.cs:2791)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildAddressables (UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor/BuildMenuContext) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:565)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildAddressables (object) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:546)
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

(Filename: Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Shared/BuildTasksRunner.cs Line: 63)

Destroying AssetBundle directly is not permitted.
Use AssetBundle.UnloadBundle to destroy an AssetBundle.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEditor.Build.Utilities.SceneStateCleanup:smile:ispose (bool) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Utilities/SceneStateCleanup.cs:50)
UnityEditor.Build.Utilities.SceneStateCleanup:smile:ispose () (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Utilities/SceneStateCleanup.cs:30)
UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&,System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IContextObject[]) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/ContentPipeline.cs:168)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:smile:oBuild<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:302)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:BuildDataImplementation<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:91)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Build/DataBuilders/BuildScriptBase.cs:92)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,bool) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Settings/AddressableAssetSettings.cs:2828)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&,UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/Settings/AddressableAssetSettings.cs:2791)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildAddressables (UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor/BuildMenuContext) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:565)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildAddressables (object) (at Library/PackageCache/com.unity.addressables@1.21.18/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:546)
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

[Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.20/Editor/Utilities/SceneStateCleanup.cs line 50]

But this seems like it’s all Unity’s SBP internal stuff.

Not sure what happend. Some questions:

  • Can you reproduce the issue in an empty project with that prefab?
  • Between the successful build and the failed build(with the prefab added), did you enter play mode?
  • Does other prefabs also cause the issue?

Thanks for all the follow-ups!

So I think I know what’s wrong, kind of. I’m a dolt. This is for a Playstation build and I hadn’t installed their SDK. It didn’t seem explicitly necessary in the documentation. I installed it to see what tools were available and lo and behold my Addressable build started working after that. Since Sony provides their own version of the Unity Editor, I suppose it interfaces with the SDK.

I’m sure I could have reproduced it with an empty project and any prefab or asset, but unfortunately I don’t have a way to test that any more.

Right now I’m reverting to a backup (taking hours) so I can attempt the full build - not just the single prefab test. I’ll follow-up when I know!

Thanks again for the help Alan. :slight_smile:

Yup, that was the problem indeed. I’m able to build my Addressables now. Thanks for the replies @Alan-Liu