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
{{ message }}
Repository navigation
Synfig 1.3.14 crashes on attempt to edit spline (Windows) #1442
changed the title [-]Synfig 1.3.14 crashes pn attempt to edit spline (Windows)[/-][+]Synfig 1.3.14 crashes on attempt to edit spline (Windows)[/+]on May 24, 2020
I tried to play with this file for quite a while now, and still couldn't find out why it crashes at certain times (still feels random to me).
However, i found something else that might be somewhat related...
You don't need to click any vertex points at all to find out if the crash will occur or not.
You can just click any line (or maybe even any layer), then hover your mouse to the parameter panel and try to scroll it. That also works (in terms of crashing Synfig).
That should be relatively the same thing, since when you click any point, the parameter panel will automatically scroll and select that exact point.
With this discovery on hand, i then decided to close the "Parameters" panel and tried to replicate what's in the video again. This time, no crashes occured.
But, the crash can still happen. The only way to do that is to scroll the "Timetrack" panel down,
(the "Graph" panel may can also do that, but i couldn't confirm that yet since you can't scroll far down in "Graph" panel.)
I even tried this with one of my old artwork (which was created in v1.2.2) once and this issue also happened with that file as well.
Still, I couldn't find what triggers the crash, though. This thing comes up sometimes with no clear sign of whether it'll happen or not.
It doesn't seem to crash if --console is passed as argument.
yeah, It kinda occurs..... much less now. (....?)
Most of the time it won't crash, but once you close the file and load it up again on the same Synfig window, scrolling the "Timeline" (or maybe clicking a point) then crashes it again almost all the time.
Speaking of the console, i can see more interesting things in it, especially how often the gtk errors pops in on certain conditions.
Like when i load Synfig, there's no error lines in the console. Same as when i open the file, not even a single arror even when i scroll the "Timetrack" or "Parameters" panel.
But once i switched workspace to "Synfig Animation 1" (the one that you starts with by default), the errors starts pouring in.
Maybe the console would do different things with different scenarios as well (such as closing all Synfig workspace windows before opening the file).
One thing for sure is, Synfig's console pops in some lines of gtk errors for a short time, before then it crashes (still not sure if that was the trigger, though).
I did some debugging too and here's where I got:
The crash occurs after the program calls the function "g_closure_invoke" in libgtk with wrong callback address (might be right at the time of calling but later freed for example). I don't know anything about GTK, but I believe the purpose of this function might be to update GUI elements such as scrollable windows for example, because later that function call others such as "gtk_range_get_adjustment".
The function then rises an "EXCEPTION_ACCESS_VIOLATION" and bam, Synfig closes. The crash happens at exact moment when I switch from one spline to another and select a tangent (click on it). You don't even need to edit it, just select it. Of course, it's random, but under a debugger it happens more often. Below is the picture of Synfig in the moment of crash. I first selected "R2" spline, then selected green dot (circle786), clicked at tangent (you can see yellow dot is being activated) and at that moment Synfig crashed.
Therefore, my theory is that something wrong with the code that handles update of widgets. There's some race condition. Like the memory being freed while it's still being used by the gtk widget (from another thread perhaps?). It happens more frequently when the default tab is opened (Synfig Animation 1), maybe because more widgets are in need of update, so the chances of crash go up.
Also, if you remove all the widgets, then crash doesn't happen (I might not test enough times though). So try opening the "retestz" example, then remove all widgets so Synfig looks like this:
and next try to switch between layers/splines, edit them, and you know, make the program crash. If crash doesn't happen, then issue is definitely somewhere in code handling the update of widgets.
Moreover, I found another crash that is 100% reproducible under Windows and may lead to some clues with this one. To reproduce:
See one gray vertex? It has conversions, so Synfig cannot manage it automatically. Drag it by the spline, not handles. Synfig will greet you with the following error message:
Hit "Close" and Synfig crashes
Not sure if it's relatable to current subject, but it might be worth looking at. At least this crash is reproducible and who knows, might have the common case.
Reacted by FadhilKwan, ice0 and Konstantin Dmitriev
@Svarov-RZM
What do you mean here? I can't drag anything via the three gray handles (vertex + tangents), and nothing happens if I try (on Linux). I don't know what "drag it by the spline" means. :(
What do you mean here? I can't drag anything via the three gray handles (vertex + tangents), and nothing happens if I try (on Linux). I don't know what "drag it by the spline" means. :(
i think he meant that you should try to drag the line itself to edit its shape, since you can't drag the greyed points.
Reacted by rodolforg, Dmitry Razumovsky and Konstantin Dmitriev
umm.. yeah... apologies ._.v
I'm currently pretty busy at the moment. But i did try the testing build a bit.
And i'd say, nothing's different in my part, still crashes the same way, though i haven't tried it a bit more, so i didn't want to make a hasty statement.
I've tried to twiddle the test file with this one in the ways they could crash the synfig (scrolling parameters panel, clicking points, closing and reopening the file, switching files, etc). I've done those things for many times now, and so far, No Crashes At All, Sweet! ^O^
I think i could say that this issue has been resolved, but maybe i should test it a bit more just to make sure. Also we should wait until Svarov have tested this one and can confirm it as well
Thanks to everyone for testing! So, it looks like all instability is about this commit - aeb01c1.
I wonder what do we loose after reverting it? Looks like it fixes issues with synchronization of horizontal scrolling for Params Panel and TimeTrack Panel...
But in my tests everything works well even after reverting. Maybe I missed something.
Activity
[-]Synfig 1.3.14 crashes frequently on Windows[/-][+]Synfig 1.3.14 crashes pn attempt to edit spline (Windows)[/+]morevnaproject commentedon May 24, 2020
I was unable to reproduce that on Linux. Can someone help here? @ice0
morevnaproject commentedon May 24, 2020
@FadhilKwan
[-]Synfig 1.3.14 crashes pn attempt to edit spline (Windows)[/-][+]Synfig 1.3.14 crashes on attempt to edit spline (Windows)[/+]FadhilKwan commentedon May 24, 2020
@morevnaproject yes ._.?
I tried to play with this file for quite a while now, and still couldn't find out why it crashes at certain times (still feels random to me).
However, i found something else that might be somewhat related...
You don't need to click any vertex points at all to find out if the crash will occur or not.
You can just click any line (or maybe even any layer), then hover your mouse to the parameter panel and try to scroll it. That also works (in terms of crashing Synfig).
That should be relatively the same thing, since when you click any point, the parameter panel will automatically scroll and select that exact point.
With this discovery on hand, i then decided to close the "Parameters" panel and tried to replicate what's in the video again. This time, no crashes occured.
But, the crash can still happen. The only way to do that is to scroll the "Timetrack" panel down,
(the "Graph" panel may can also do that, but i couldn't confirm that yet since you can't scroll far down in "Graph" panel.)
I even tried this with one of my old artwork (which was created in v1.2.2) once and this issue also happened with that file as well.
Still, I couldn't find what triggers the crash, though. This thing comes up sometimes with no clear sign of whether it'll happen or not.
rodolforg commentedon May 24, 2020
It doesn't seem to crash if
--consoleis passed as argument.@FadhilKwan could you confirm it? Edit the
.batappending this option on the end of line of synfig executable callFadhilKwan commentedon May 25, 2020
yeah, It kinda occurs..... much less now. (....?)
Most of the time it won't crash, but once you close the file and load it up again on the same Synfig window, scrolling the "Timeline" (or maybe clicking a point) then crashes it again almost all the time.
Speaking of the console, i can see more interesting things in it, especially how often the gtk errors pops in on certain conditions.
Like when i load Synfig, there's no error lines in the console. Same as when i open the file, not even a single arror even when i scroll the "Timetrack" or "Parameters" panel.
But once i switched workspace to "Synfig Animation 1" (the one that you starts with by default), the errors starts pouring in.
Maybe the console would do different things with different scenarios as well (such as closing all Synfig workspace windows before opening the file).
One thing for sure is, Synfig's console pops in some lines of gtk errors for a short time, before then it crashes (still not sure if that was the trigger, though).
Svarov-RZM commentedon May 25, 2020
I did some debugging too and here's where I got:
The crash occurs after the program calls the function "g_closure_invoke" in libgtk with wrong callback address (might be right at the time of calling but later freed for example). I don't know anything about GTK, but I believe the purpose of this function might be to update GUI elements such as scrollable windows for example, because later that function call others such as "gtk_range_get_adjustment".
The function then rises an "EXCEPTION_ACCESS_VIOLATION" and bam, Synfig closes. The crash happens at exact moment when I switch from one spline to another and select a tangent (click on it). You don't even need to edit it, just select it. Of course, it's random, but under a debugger it happens more often. Below is the picture of Synfig in the moment of crash. I first selected "R2" spline, then selected green dot (circle786), clicked at tangent (you can see yellow dot is being activated) and at that moment Synfig crashed.

Therefore, my theory is that something wrong with the code that handles update of widgets. There's some race condition. Like the memory being freed while it's still being used by the gtk widget (from another thread perhaps?). It happens more frequently when the default tab is opened (Synfig Animation 1), maybe because more widgets are in need of update, so the chances of crash go up.
Also, if you remove all the widgets, then crash doesn't happen (I might not test enough times though). So try opening the "retestz" example, then remove all widgets so Synfig looks like this:

and next try to switch between layers/splines, edit them, and you know, make the program crash. If crash doesn't happen, then issue is definitely somewhere in code handling the update of widgets.
Moreover, I found another crash that is 100% reproducible under Windows and may lead to some clues with this one. To reproduce:
Open attached "LinkedSplineN" file
LinkedSplinesN.zip
Click on the top light gray spline
See one gray vertex? It has conversions, so Synfig cannot manage it automatically. Drag it by the spline, not handles. Synfig will greet you with the following error message:

Hit "Close" and Synfig crashes
Not sure if it's relatable to current subject, but it might be worth looking at. At least this crash is reproducible and who knows, might have the common case.
rodolforg commentedon May 25, 2020
@Svarov-RZM
What do you mean here? I can't drag anything via the three gray handles (vertex + tangents), and nothing happens if I try (on Linux). I don't know what "drag it by the spline" means. :(
FadhilKwan commentedon May 25, 2020
i think he meant that you should try to drag the line itself to edit its shape, since you can't drag the greyed points.
rodolforg commentedon May 25, 2020
Wow! I didn't even know it was possible :)
rodolforg commentedon May 25, 2020
Error is thrown here:
synfig/synfig-studio/src/synfigapp/actions/valuedescset.cpp
Line 1171 in 6d3f75f
And catch here:
synfig/synfig-studio/src/synfigapp/action_system.cpp
Lines 131 to 141 in 6d3f75f
But the real problem is this thrown:
synfig/synfig-studio/src/gui/duckmatic.cpp
Lines 957 to 960 in 6d3f75f
And this is called by:
synfig/synfig-studio/src/gui/duckmatic.cpp
Lines 3300 to 3311 in 6d3f75f
called indirectly via:
synfig/synfig-studio/src/gui/workarea.cpp
Lines 1540 to 1546 in 6d3f75f
that doesn't deal with exception inside a gtk-event signal processing :)
13 remaining items
morevnaproject commentedon Jun 14, 2020
Thank you for testing and for the video! I will continue digging...
Will try to revert aeb01c1 and f534533 to see if that will affect the stability...
morevnaproject commentedon Jun 14, 2020
I have reverted aeb01c1, let's wait when build finishes...
FadhilKwan commentedon Jun 15, 2020
umm.. yeah... apologies ._.v
I'm currently pretty busy at the moment. But i did try the testing build a bit.
And i'd say, nothing's different in my part, still crashes the same way, though i haven't tried it a bit more, so i didn't want to make a hasty statement.
so... this issue still persists, right? ._.
morevnaproject commentedon Jun 15, 2020
One more attempt:
Please test. ^__^
FadhilKwan commentedon Jun 17, 2020
Wow, this one actually feels really promising!
I've tried to twiddle the test file with this one in the ways they could crash the synfig (scrolling parameters panel, clicking points, closing and reopening the file, switching files, etc). I've done those things for many times now, and so far, No Crashes At All, Sweet! ^O^
I think i could say that this issue has been resolved, but maybe i should test it a bit more just to make sure. Also we should wait until Svarov have tested this one and can confirm it as well
Svarov-RZM commentedon Jun 17, 2020
Yep, can also confirm — no crashes in this version. I did pretty much the same as FadhilKwan in terms of testing and Synfig didn't crash once.
morevnaproject commentedon Jun 19, 2020
Thanks to everyone for testing! So, it looks like all instability is about this commit - aeb01c1.
I wonder what do we loose after reverting it? Looks like it fixes issues with synchronization of horizontal scrolling for Params Panel and TimeTrack Panel...
But in my tests everything works well even after reverting. Maybe I missed something.
@ice0 @rodolforg What do you think about that? ^__^
rodolforg commentedon Jun 19, 2020
You mean vertical scrolling, right?
morevnaproject commentedon Jun 20, 2020
Vertical scrolling, right. 🤣 Oh, I am messing terms again ^__^"
morevnaproject commentedon Jun 20, 2020
Just to make it clear: here I pushed a commit, which reverts aeb01c1 -
--> ce37dbe
try to catch all exceptions thrown in GTK event callback handlers
try to catch all exceptions thrown in GTK event callback handlers
try to catch all exceptions thrown in GTK event callback handlers