Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.4.0b3
Issue ID
764609
Regression
No
[ShaderCompiler]Editor crashes when closing if the shader compiler crashed while running
Steps to reproduce:
1. Open Unity;
2. Open attached project and 'test.unity' scene;
3. Open 'DynamicIndexing.shader' file in shader code Editor (MonoDevelop/Visual Studio);
4. Set uniform shader to some big value (in my case uniform float _Floats[10000]; at line 38);
5. Save shader file and return to Editor;
6. Notice that 2 errors have appeared in the console:
'Shader compiler: internal error compiling shader snippet type=1 platform=4: Protocol error - failed to read correct magic number '
and
'Shader error in 'Custom/ShaderUniformArrayTest/DynamicIndexing': Internal error communicating with the shader compiler process'
7. Quit Editor by right clicking on a tray icon and pressing Quit.
Actual result:
Unity crashes (see attached 2 attached gif videos for OSX and Windows repro).
Last 5 calls form the stacktrace:
#0 0x007fff8dfeb434 in pthread_mutex_lock
#1 0x00000101615a98 in CleanupShaderCompilerClient()
#2 0x00000100c3477b in Object::CleanupAllClasses()
#3 0x000001011054db in CleanupEngine()
#4 0x0000010148a69d in AssetInterface::Shutdown()
Expected results:
Unity should not crash when closing Editor with exceeded uniform shader array capacity.
Notes:
- Reproduces on both OSX 10.11.2 and Windows 10;
- Reproduces in 5.4.0b3, 5.4.0b2, 5.4.0.b1, 5.4.0a6;
- Happens only when 2 errors mentioned above are displayed in the console (that said, for instance, when setting extremely big number, like, 10000000000 to array dimension - the issue doesn't reproduce);
- Doesn't happen when entering Play mode after receiving shader compiler errors and closing Editor;
- Happens only when Shader compiler triggers specific shader error in the opened project (that said - if opening Editor with already exceeded uniform array code and closing it - the crash will not repro).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
Add comment