Hello everyone,
I joined the project in question later on to work on specific areas, which also required to either introduce Asset Bundles, or to introduce Addressables. Since Addressables are viable in this project, it was decided on to use these.
In the meantime, due to other reasons, quite some time passed after I integrated the Addressables and adjusted the code. If I’m not mistaken, the addressables worked before this “break”, and now, after rebasing to another branch that also contained a lot of Shader adjustments, starting the game doesn’t work on any platform anymore.
The Stacktrace in a Windows Build looks like:
0x00007FFA4EB942E5 (UnityPlayer) Material::CreateMaterial
0x00007FFA4E98C6C9 (UnityPlayer) CreatePresets
0x00007FFA4E9890D6 (UnityPlayer) BeginSplashScreen
0x00007FFA4E57FC9D (UnityPlayer) UnityMainImpl
0x00007FFA4E58252B (UnityPlayer) UnityMain
0x00007FF72B1A11FA (fallback) __scrt_common_main_seh
0x00007FFB0C357034 (KERNEL32) BaseThreadInitThunk
0x00007FFB0D2C2651 (ntdll) RtlUserThreadStart
On another platform it looks more like
0x000000546DDE7B14 _ZN8Material14CreateMaterialER6ShaderN6Object9HideFlagsEb+0x44
0x000000546E14817C _ZN26CustomRenderTextureManager17RecreateResourcesEv+0x8C
0x000000546E147EE4 _ZN26CustomRenderTextureManager6UpdateEb+0x74
0x000000546DECDF9C _Z23InitPlayerLoopCallbacksv+0x121C (too far)
0x000000546DED1EBC _Z17ExecutePlayerLoopP22NativePlayerLoopSystem+0x5C
0x000000546DED1F18 _Z17ExecutePlayerLoopP22NativePlayerLoopSystem+0xB8
0x000000546DED20E4 _Z10PlayerLoopv+0xF4
To me it looks like it might be an issue related to a Shader that can’t be resolved, causing an invalid memory access (0) on the non-Windows-Platforms I’ve tested to far.
In the error.log file of the Windows crash report, it contains an error roughly translating to GetLastError: 'It was attempted to access an invalid address.' (address: 00007FFB0A1280FC)
Does anyone have any idea what the cause of this issue could be?
Versions:
Unity: 2018.4.30
Addressables: 1.16.10
I’ll kick this over to the team for some guidance.
Thank you for that. In the meantime, I was able to narrow down the issue a bit. In between the working version and the not-working version, I added shaders to the always included shaders. The ones that I added are:
Legacy Sahders/Diffuse
Legacy Sahders/Particles/Additive
Legacy Sahders/Particles/Alpha Blended
Legacy Sahders/Transparent/VertexLit
Legacy Shaders/Particles/Alpha Blended Premultiply
Standard
Standard (Specular setup)
Mobile/Diffuse
Legacy Shaders/Self-Illumin/Specular
Legacy Shaders/VertexLit
Legacy Shaders/Bumped Specular
Legacy Shaders/Specular
GUI/Text Shader
VR/SpatialMapping/Wireframe
Hidden/InternalErrorShader
Legacy Shaders/Particles/VertexLit Blended
Mobile/VertexLit
Legacy Shaders/Particles/Multiply
Unlit/Texture
Additionally, there are other shaders included, but they were included previously already, and they are included in a non-crashing build as well.
The non-crashing versions settings don’t contain any shaders that aren’t also contained in the crashing version.
This is now unrelated to the original issue:
I still have issues with the Addressables integration, though. On the one hand, I forgot to add an Addressables.InitializeAsync call, (I received the error message Unable to load runtime data at location). On the other hand, building the packages via API seems to fail with an error message like “DirectoryNotFoundException: Could not find a part of the path “Temp/com.unity.addressables/AssetBundles\5f7891bcb5753228c81b9c52aaf4ac14.bundle” or “Library/com.unity.addressables/aa/Windows/StandaloneWindows64\scenes-research_content_assets_assets/prefabs/ld/compositions/interrupteurs/old_compo_env_gen_interrupteurgrouppressor_01_old.prefab.bundle””. When checking the Temp directory afterwards, the asset bundle was present.
Currently, another build is running after manually cleaning the addressables cache (I’ve also added the corresponding call to the CI code I’m using to create the builds).
I didn’t seem to get any other error messages I wouldn’t also receive during a “normal” build (that doesn’t yet contain addressables).
Editing note: inserted the actual addressables build error message
I do not know what could be happening with the shaders.
I would recommend making a bug report, it is likely that it is something that the graphics teams may know about.
For the second issue, that looks like an issue with the separator characters. This should be fixed in the latest release (it will all be / instead of a mix of / and ).
You should also be ware of the long file name issue on windows as your filepath is very long.