Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Crash when selecting node with Widget::NumberInput in properties panel

Open adamgerhant opened this issue 1 year ago • 4 comments

When the cursor is in a text box, such as in the Text node, and the transform node is clicked, the editor crashes. This is due to the Value::String not being reset when switching nodes, so the string value from the text box gets passed to the number input, which causes a panic.

adamgerhant avatar May 27 '24 16:05 adamgerhant

Note that this doesn't happen in firefox and only in chromium. Also the text node needs to be selected in the graph with the cursor in the text box before clicking on the transform node.

0HyperCube avatar May 27 '24 20:05 0HyperCube

Yeah, I've run into other bugs where Firefox and Chrome had different event ordering. I can try looking into this. Thanks for that extra data @0HyperCube.

Keavon avatar May 27 '24 20:05 Keavon

  1. (Use a Chromium browser)
  2. Draw something with the Text tool
  3. Open the node graph
  4. Click the text node so it's the only selection in the graph
  5. Select the text field in the Properties panel so your text cursor is somewhere that'd allow you to type
  6. Click on a different node, such as Transform, Fill, or Stroke

Keavon avatar Jul 12 '24 22:07 Keavon

I found a more general issue: 0. (This happens in both Firefox and Chromium browsers)

  1. Draw a rectangle with some fill color, so it'll be visible even without a stroke
  2. Open the graph
  3. Select the Stroke node, click the Weight, set it to 0, and hit enter because the bug only works when the initial value of the field is 0
  4. Select that Weight field again and type something like 500 but don't hit enter yet
  5. Click the Transform node and you'll find that it has applied the 500 to the rotation as 500°

Keavon avatar Jul 12 '24 22:07 Keavon

hello @Keavon is this still an issue? when I tried to follow the steps in the most recent comment, i was unable to reproduce

I found a more general issue: 0. (This happens in both Firefox and Chromium browsers)

  1. Draw a rectangle with some fill color, so it'll be visible even without a stroke
  2. Open the graph
  3. Select the Stroke node, click the Weight, set it to 0, and hit enter because the bug only works when the initial value of the field is 0
  4. Select that Weight field again and type something like 500 but don't hit enter yet
  5. Click the Transform node and you'll find that it has applied the 500 to the rotation as 500°

prestonbourne avatar Nov 30 '24 22:11 prestonbourne

I think I recall when we might have fixed this or something related to this (it involved how the widgets were displaying the unit, such as °, across widgets when clicking between nodes). I also can't reproduce the issue, so I'm going to close this. Thanks for bringing this up @prestonbourne.

Keavon avatar Dec 24 '24 00:12 Keavon