You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Visual Shader editor, clicking Arrange Nodes crashes Godot.
Steps to reproduce
Click Arrange Nodes in the Visual Shader editor with the reproduction project. Sometimes it works on first click, sometimes it takes a few clicks. Below is an image of the shader I was fiddling with that caused this to happen (I assume).
By observing the function arguments, I found that there may be something wrong with the r_layers: normally, we only need to know which nodes there are in a certain layer, it is unlikely that duplicate nodes will be needed. But this is not the case, sometimes, there will be repeated elements in a some layers.
By looking at the code before calling function _place_block, r_layers is obtained by calling the following function:
Assume that layer one includes two nodes, "3" and "13", but in the layers returned by _layering(), the elements of that layer may be "3", "3", "13", which means a "3" is repeated (interesting, if repetition happens, that is the repetition of the first element, I'm not sure if it's always like this, I haven't dug into the algorithm of _layering() carefully).
One dirty workaround is to remove all repeated elements in every entry of the returned HashMap, i.e., Vector("3", "3", "13")->Vector("3", "13")
Godot version
v4.1.1.stable.mono.official [bd6af8e]
System information
Windows 10
Issue description
In the Visual Shader editor, clicking Arrange Nodes crashes Godot.
Steps to reproduce
Click Arrange Nodes in the Visual Shader editor with the reproduction project. Sometimes it works on first click, sometimes it takes a few clicks. Below is an image of the shader I was fiddling with that caused this to happen (I assume).
Minimal reproduction project
Test.zip
The text was updated successfully, but these errors were encountered: