friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
220 stars 11 forks source link

Crash with window timeline/queue and bug with flipping a path #204

Open PsychoTAL opened 2 months ago

PsychoTAL commented 2 months ago

Friction2D v.0.9.6 OS: Windows 10 RAM: 4 GB VRAM: 1 GB

Hello.

1. Crash with timeline/queue window: When closing (with the 'X' on the window) a windowed timeline/render queue ('Timeline/Queue Window' checked in the 'View' tab), that does not uncheck the 'Timeline/Queue Window' in the 'View' tab, and the timeline/render queue just disappear (you can not drag it back with the 'dots' in the bottom either for the timeline), repressing the 'Timeline/Queue Window' in the 'View' tab will make it reappear in their normal location, and finally, when repressing it again (to make them in window mode again), the program crashes. 2. Flipping a path: So, flipping a path (both vertically 'V' and horizontally 'H') will flip that paths node rotation axis (the rotation gets inverted)

Thanks for your time. Wish you all the best!

rodlie commented 2 months ago

Thanks for the report, I will review the issues when I get the time.

rodlie commented 2 months ago
  1. I'm able to replicate the crash and know why, will figure out a solution.
rodlie commented 2 months ago

This build should fix the timeline/queue window issues: https://sourceforge.net/projects/friction/files/0.9.6.1-a07973bb/

PsychoTAL commented 2 months ago

I confirm, v0.9.6.1-a07973bb indeed fixes the issue. Thanks !

rodlie commented 2 months ago

I introduced a buggy save state for the windows, this is fixed. Will make a test build tomorrow (too late to make any builds now).

https://sourceforge.net/projects/friction/files/0.9.6.1-5c7a23b1/

rodlie commented 2 months ago
  1. Might need some more info on this one. Flipping seems to work here, can you provide a basic method to replicate this issue?
PsychoTAL commented 1 month ago

Sorry for the late reply.

Its important to note that IT ONLY HAPPENS WITH 'PATH' (drawn with 'Add path') WHEN I ROTATE THEIR 'NODES' (Edit path), not with the others. (Sorry for not providing a video, I'm on someone else PC)

Hope that helps.

rodlie commented 1 month ago

Sorry for the late reply.

It seems flipping depends on pivot, so center the pivot and it's ok?

PsychoTAL commented 1 month ago

Sorry for my confusing explanation, I hope the video (I'm still on someone else old PC so the video is in bad quality, but the operation should be quite clear)

https://github.com/user-attachments/assets/36f0fdd0-73b7-4b72-a9da-94d539a88346

More info: -The issue only affects path object (Curves, Splines ?), not the other objects. -Flipping the path again (vertically or horizontally) will correct the issue -The issue also happens with a local pivot (the green one) -The global rotation is never affected (the yellow pivot/origin)

Hope that helps. Wish you the best!

rodlie commented 1 month ago

Thanks for additional info, I'm able to replicate the issue (don't know why it's like this though).

PsychoTAL commented 5 days ago

Hello!

So, about the nodes' rotation issue, I might have a little theory, BUT before that a little disclaimer: -I'm not a programmer, but I kinda understand the concept of it (code structure, etc...), -I just have a very basic experience with C++ (I know classes, functions, etc... but on a very basic level only, I'm more experienced with Python LOL), With that out of the way, here it is:

When flipping an object, we call "flipSelectedBoxesHorizontally()" or "flipSelectedBoxesVertically()", which just call a "scale(-1,1)" or "scale(1,-1)" on the object and thus invert that object on the X or Y axis. When rotating now, we call "rotateRelativeTo..." which needs to verify if the object is flipped or not before applying the rotation. How? With "rotationFlipped" which returns true if 'that product' is negative (I don't know what are those arguments XD, but if *scale.Xscale.Y<0** then it proves the object is flipped). If the object is flipped, the rotation gets a negative value in order to make that rotation consistent with the mouse movement.

Rot

What I want to say is that when the scale of the entire "Path" got flipped, the "Nodes forming that path" inherit the flipped scale too... Maybe...well, it should. It is important to note that we can scale down (with 'S' key) a path to a point it gets 'flipped' IN BOTH AXIS, but "rotationFlipped" will return false because *scale.Xscale.Y>0 in that case, and to prove that the issue doesn't manifest. And what's fascinating is, after flipping (with 'H' or 'V' key)** a "Path", using the "Local pivot" when all nodes are selected (all nodes should rotate around the local pivot), the issue is still present in that case.

If you are still there, thanks for reading. I don't know (yet) how to build the program to test my theory, maybe in the near future (no promise though, I'm still learning at my pace XD ). I am writing this in hope to be as helpful as I can (at least I hope I didn't waste your time).

Wish you all the best!

rodlie commented 5 days ago

Thanks for the additional info, will take a look a bit later tonight.

I don't know (yet) how to build the program to test my theory,

Windows or Linux?


We now have working CI for the main branch, so any commit/PR etc will generate Windows and Linux binaries. So you could fork the repo and run CI in your own repo and get binaries to test, or submit a PR against the main branch and get binaries that way.

PsychoTAL commented 5 days ago

I'm on Windows (for the time being). My schedule is a little bit tight lately, BUT I will try something (and that I can promise!)