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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
This is a duplicate of issue #1110007