Search Issue Tracker
Fixed in 5.4.4
Fixed in 5.3.X
Votes
0
Found in
5.4.2f2
Issue ID
851359
Regression
Yes
[5.3+][Graphics] Destroying a shader might cause stale pointers in SharedMaterialData, leading to a crash
Looks like if there's a Material with some shader on it, then destroying the shader (either explicitly, or via asset bundle unload) might lead to stale pointers in some material data, which causes a crash later on. Seems to happen starting with 5.3 (in some cases), and happens in more cases in 5.4+.
--- New repro steps:
1. Open ShaderDeletionCausesStaleMaterialDataPointers-52project.zip project
2. Open scene it in, press play.
3. Crashes!
Reproduced in: 5.3.6, 5.4.2, 5.6 alpha
Does not reproduce in: 5.2.1.
--- Previous repro steps from original bug report:
Repro steps:
1. Open "Homework.zip" project
2. Load "Homework" scene
3. In the menu toolbar find wtf > LoadAssetBundle and click on it
Note: Cube should be loaded, check "StreamingAssets folder" for files called "cube"
Stack trace:
0x0000000140120B36 (Unity) RenderLoopContext::`scalar deleting destructor'
0x0000000140121223 (Unity) DoRenderLoop
Expected: A cube should be created and Editor should not crash
Actual: A cube is not created, Editor crashes
Reproduced on: 5.4.2f2, 5.5.0b11, 5.6.0a3
Not reproducible on: 5.3.6p8
Could not test on 5.2 due to errors
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Add comment