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
Tooll3 lets you create a mismatching type connection by splitting an already existing good connection; then it crashes with a System.ArgumentOutOfRangeException exception while updating the operators.
Please complete the following information:
OS: Windows 10 Pro
Version: 21H1
Graphics card and resolution: nVidia GeForce GTX 1070 Ti, 1920x1080
To Reproduce
Steps to reproduce the behavior:
Add a Value operator
Connect it to the float input of another operator (e.g. RadialGPoints)
Add a disconnected FloatToInt operator
Drag the FloatToInt onto the previous connection to split it
Hover the mouse on the target operator (e.g. RadialGPoints) to update it
Expected behavior
The GUI should check for type mismatching and prevent making the connection.
Describe the bug
Tooll3 lets you create a mismatching type connection by splitting an already existing good connection; then it crashes with a System.ArgumentOutOfRangeException exception while updating the operators.
Please complete the following information:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The GUI should check for type mismatching and prevent making the connection.
Additional context
I think the culprit is this if-statement in the ConnectionMaker.SplitConnectionWithDraggedNode method that doesn't seem to check correctly for the type mismatch between the splitting operator and the target operator: https://github.com/still-scene/t3/blob/2750057c245b5f221df7eea1b60840856e6d1cca/T3/Gui/Graph/Interaction/ConnectionMaker.cs#L544-L551 Indeed, it doesn't log a warning nor it returns without doing anything; instead, it goes on and creates the commands needed to make the connection.
Then, while processing the commands, the Slot.AddConnection method detects the type mismatch, logs a warning and returns without adding the source Slot to the InputConnection List of the Slot: https://github.com/still-scene/t3/blob/2b652951903e0398fc2b676eb280d2182222b865/Core/Operator/Slots/Slot.cs#L91-L110
Finally, while executing the Slot.ConnectedUpdate method, Tooll3 crashes on a System.ArgumentOutOfRangeException exception while trying to access index 0 of an empty List: https://github.com/still-scene/t3/blob/2b652951903e0398fc2b676eb280d2182222b865/Core/Operator/Slots/Slot.cs#L79-L82
The text was updated successfully, but these errors were encountered: