Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Transform node crashes app when scale == 0

Open Kakapio opened this issue 1 year ago • 7 comments

This is primarily an issue when dragging the scale parameters to adjust them in the UI. When the value for scale hits 0 on either x or y, Graphite crashes. I'm gonna look into this myself and try to patch it up (since I'm new 😄) but I'm making an issue to document it.

My solution is to just ignore an input of 0 in the backend. Let me know if that's too sloppy.

Kakapio avatar Feb 29 '24 08:02 Kakapio

issue only seems to occur when a TransformNode -> RepeatNode...

Kakapio avatar Mar 01 '24 02:03 Kakapio

any updates?

devharsh2k4 avatar Mar 05 '24 17:03 devharsh2k4

any updates?

There are several upcoming refactors so this issue is being put aside for now.

Kakapio avatar Mar 05 '24 19:03 Kakapio

Yeah, it's potentially blocked by @TrueDoctor's work on https://github.com/GraphiteEditor/Graphite/pull/1558

Keavon avatar Mar 05 '24 19:03 Keavon

As far as I can tell (please include the actual panic message in future) this is probably from failing to inverse a transform matrix containing 0 in debug mode? We likely need to special case the zero transform such that we don't end up inverting.

@Keavon / @Kakapio I struggle to see how this is relevant to a change in the pivot code.

0HyperCube avatar Mar 05 '24 22:03 0HyperCube

Thanks for chiming in @0HyperCube, perhaps this doesn't need to be blocked then (it just needs to have a zeroness check in the correct place, like where you suggested with the inverse transform matrix).

Keavon avatar Mar 05 '24 22:03 Keavon

As far as I can tell (please include the actual panic message in future) this is probably from failing to inverse a transform matrix containing 0 in debug mode? We likely need to special case the zero transform such that we don't end up inverting.

@Keavon / @Kakapio I struggle to see how this is relevant to a change in the pivot code.

Here's the full output, I think. This should be the correct log. But yes, will look into this some more.

Kakapio avatar Mar 07 '24 06:03 Kakapio

Can't currently reproduce.

Keavon avatar Jun 09 '24 07:06 Keavon