Search Issue Tracker
Duplicate
Votes
0
Found in
2018.3.0b7
2018.3.1f1
Issue ID
1116274
Regression
Yes
"GetGfxDevice() should only be called from main thread" error and occasional hard crash with ":SetShaders" > ":ApplyGpuProgram"
Reproduction steps:
1. Open the attached project (OC link).
2. (Optional) Change Editor platform to iOS (higher chance to experience the crash).
3. Play the "LoadGame" scene.
4. Click on the '?' button.
Actual behavior:
Error messages in the Console:
GetGfxDevice() should only be called from main thread
Called Release() on an invalid object:
Serialized stream size doesn't match
Gfx command not handled
Crash call stack (full call stack attached in the edit below):
Thread 31 Crashed:: UnityGfxDeviceWorker
...
7 ??? 0x0000000000000001 0 + 1
8 com.unity3d.UnityEditor5.x 0x000000010079dace GpuProgramMetal::ApplyGpuProgram(GpuProgramParameters const&, unsigned char const*) + 254
9 com.unity3d.UnityEditor5.x 0x00000001007a3d43 MetalContext::SetShaders(GpuProgram**, GpuProgramParameters const**, unsigned char const* const*) + 339
10 com.unity3d.UnityEditor5.x 0x0000000102a55df5 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 22965
11 com.unity3d.UnityEditor5.x 0x000000010078ae4c GfxDeviceWorkerAutoreleasePoolProxy + 60
...
Alternative reproduction steps to reproduce the crash:
1. Build and run the attached project.
Reproduced with:
2018.3.0b7, 2019.2.0a2
Metal, OpenGL
Editor, Standalone
Not reproducible with:
2018.2.20f1, 2018.3.0b6
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
This is a duplicate of issue #1110007