Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synfig (1.3.11) Can't Load My Sifz File #716

Closed
FadhilKwan opened this issue Jan 29, 2019 · 13 comments
Closed

Synfig (1.3.11) Can't Load My Sifz File #716

FadhilKwan opened this issue Jan 29, 2019 · 13 comments
Assignees
Milestone

Comments

@FadhilKwan
Copy link

FadhilKwan commented Jan 29, 2019

Synfig version & platform:
SynfigStudio-1.3.11-testing-19.02.09-win64-9583a for Windows 64 bit in Windows 10

Issue description:
well, since it's here, I decided to take it to the test

So i unpacked it, and load my sifz file
Seconds later, the process finished, but nothing shows up, just the grey grid background

Then i tried to play with its layers (simple check/uncheck the layer visibility), and it crashed

a bit of info, my file does have so many layers, links, and feather settings
Maybe that could be related to the regression...?

if there's any request for it, I'll put the file here as well

@FadhilKwan FadhilKwan changed the title New Synfig (1.3.11 pre5) Can't Load my Sifz File Synfig (1.3.11 pre5) Can't Load my Sifz File Jan 29, 2019
@morevnaproject
Copy link
Member

Thanks for reporting! First of all, please make sure that Draft Mode is off -
screenshot_009

If that doesn't helps, then yes - we will need to examine your file. ^__^

@FadhilKwan
Copy link
Author

Thanks for reporting! First of all, please make sure that Draft Mode is off -
screenshot_009

If that doesn't helps, then yes - we will need to examine your file. ^__^

First, Thanks a lot for the reply, it was quite a relief 😄

Yes, i tried it again, this time with draft disabled....
And it's still looks like this (the marked parts might be related, especially that yellow strip)
From here on, any changes to the file will lead to freeze and crash
Even little things like changing layer's visibility

swtrebugonpre

Just for confirmation, the file is legit, and was made in most recent stable version 1.2.2
(and also it's still a fan art in progress) (._.v
swtrebugonpre2

File Is in this ZIP :
SweetTreatsredsgnTEST.zip

=====

Additional Info :

If i opened the Pre Version, while the Settings folder for stable version is still present, it will conflict each other and creates some sort of strange things inside the folder,
one of them is turning all colors in palette to white (only affects the stable 1.2.2 version)

So i have to do this everytime testing the Pre version for a precaution
swtrebugonpre1

@BobSynfig
Copy link
Collaborator

We may think about a PortableApps packaging for Windows, it could permit to keep different settings separated.
Not exactly open-source but it could also improve Synfig's visibility!

@BobSynfig
Copy link
Collaborator

BobSynfig commented Jan 31, 2019

@morevnaproject
I tried with the file supplied by @FadhilKwan with both 1.2.2 and pre5 on Ubuntu 18.04.
I already noticed it was an issue passing from one version to another because of Gamma "Transparency" aka Black Level
My settings-1.0 file is shared with both version, look at prefs.gamma

1.2.2 / prefs.gamma= 1.000000 1.000000 1.000000 1.000000
White background, no display of drawings

1.2.2 / prefs.gamma= 1.000000 1.000000 1.000000 0.000000
White background, display of drawings is ok

13.11 pre5 / prefs.gamma= 1.000000 1.000000 1.000000 1.000000
Transparent background, no display of drawings

13.11 pre5 / prefs.gamma= 1.000000 1.000000 1.000000 0.000000
Transparent background, no display of drawings

Note that we can't set anymore Black Level after 1.2.2
1.2.2
image
1.3.11 pre
image

@morevnaproject
Copy link
Member

@BobSynfig Thank you very much for investigating on gamma issue!

First of all, I agree that adding Synfig to PortableApps will increase its visibility, since this is a very popular project.

At the same time, we can try to solve this on our side. We can add an environment variable, which modifies behavior of this function:

synfig::String
synfigapp::Main::get_user_app_directory()
{
String dir;
//! \todo do we need something like Glib::locale_from_utf8()? (bug #1837445)
dir = Glib::get_home_dir()+ETL_DIRECTORY_SEPARATOR+SYNFIG_USER_APP_DIR;
return dir;
}

After that we can add this environment variable to synfigstudio.bat file, which is included into Synfig's portable ZIP bundle.

Here is an example how SYNFIG_ROOT environment variable re-defines location of system files:

if (char* synfig_root = getenv("SYNFIG_ROOT")) {
path_to_icons = String(synfig_root)
+ ETL_DIRECTORY_SEPARATOR + "share"
+ ETL_DIRECTORY_SEPARATOR + "pixmaps"
+ ETL_DIRECTORY_SEPARATOR + "synfigstudio";
path_to_plugins = String(synfig_root)
+ ETL_DIRECTORY_SEPARATOR + "share"
+ ETL_DIRECTORY_SEPARATOR + "synfig"
+ ETL_DIRECTORY_SEPARATOR + "plugins";
path_to_sounds = String(synfig_root)
+ ETL_DIRECTORY_SEPARATOR + "share"
+ ETL_DIRECTORY_SEPARATOR + "synfig"
+ ETL_DIRECTORY_SEPARATOR + "sounds";
}

morevnaproject added a commit to morevnaproject/synfig that referenced this issue Feb 9, 2019
@morevnaproject
Copy link
Member

Added SYNFIG_USER_SETTINGS environment variable - 671edc0. Documented in https://wiki.synfig.org/Environment_Variables

@morevnaproject
Copy link
Member

Just a quick note: it seems the problem here is not about Gamma's Black Level value. The yellow line at timetrack indicates that the rendering is in progress (which is never ends):

screenshot_001

I have tried to disable some layers (using 1.2.2 version and found that the problem is somewhere inside of "lin" group.

screenshot_002

@FadhilKwan
Copy link
Author

FadhilKwan commented Feb 10, 2019

i can give a bit of explanation on what's inside of it
it might help on further search

[lin] is a group layer that consists of 2 vector layers per shape (advanced outline and it's alpha region), plus a few shapes consists of only advanced outlines

the advanced outlines applied with fast gaussian feathers, with a certain amount of feather

almost all of the shape's layers in [lin] group are linked with their respective region in [reg] group (advanced outlines and it's alpha region from [lin] group, and new region layer in [reg] group), it was done for easier color filling

at some point, i also copied layers from other files and paste it in there for my references while drawing

EDIT
Adding another info : empty groups were used for separating shapes based on its parts, while keeping the alpha effects to the rest of layers under them (works like bookmarks)

@FadhilKwan
Copy link
Author

FadhilKwan commented Feb 13, 2019

i think i know one of the reasons!
i haven't fully inspected this yet, but there's a chance that this is the main cause

'lin' group have lots of layers inside of it (it was like 300+ or something),
it seems that Synfig took a long time to render it, and interrupting this render process will lead to crash,

i tried enabling 'lin' group again after erasing lots of layers inside it, and it worked,
counting the layer numbers by z depth, the render works quite slow in 200 layers, but runs faster if the number of the layers inside 'lin' are lower

220 layers works too, but took 2-3 minutes to complete it
and 250 layers going above takes forever to finish

@morevnaproject morevnaproject added this to the v1.4.0 milestone Feb 14, 2019
@FadhilKwan FadhilKwan changed the title Synfig (1.3.11 pre5) Can't Load my Sifz File Synfig (1.3.11) Can't Load My Sifz File Feb 23, 2019
@FadhilKwan
Copy link
Author

i found something interesting while playing around with version 1.3.11

The sifz file can actualy be loaded if the render engine got changed to : Cobra (safe)
swtrebugonpre3

at that moment I was experimenting with the completed version of this artwork
(haven't tested the WIP version yet; the one that i uploaded to this issue's thread)

yes it runs slow like it was mentioned,
only the same transparent background and the yellow strip at first (and interrupting it while rendering still can cause crash), then everything shows up after 40-60 seconds,
but it actually still works

however, it's still not a proper solution to this issue,
one of the reason is how it looks different in render result
(some region colors went a bit off the line boundary, unlike the default renderer)

the other one is that it still can't handle fast navigation (especially zooming in and out too fast), doing so then synfig will end up in the same infinite render time issue

another interesting thing is the amount of memory it consumes while rendering the file,
i checked my task manager while loading the file, and find out that sometimes the memory consumption can be more than 1500 Mb

@morevnaproject
Copy link
Member

The sifz file can actualy be loaded if the render engine got changed to : Cobra (safe)

This is a very important to know! Thank you for sharing this!

@blackwarthog
Copy link
Collaborator

Works fine in latest master. Please recheck.

@FadhilKwan
Copy link
Author

Works fine in latest master. Please recheck.

First of all, i'm really sorry for the very late response, i was busy and somehow couldn't find the notification email for this reply. And also thanks a lot for helping out on fixing this problem (^-^;)

Long story short, i decided to build the master version (and wow, it took a really, really long time), and tried it out immediately.

Now for the results

Short answer :
yes, it finally loads. And despite of some other issues that still persists, it navigates the file relatively very well!

Now for the long answer, in which explains all the issues that i've found so far. But these are clearly understandable for me since this version of Synfig is still under development, so i'm okay with them :

at first, It takes quite a long time to load the file (i think it was about 1-3 minutes). And after that, followed by another few seconds to finally load the image preview into the canvas. Although it was a bit time consuming, the file actually loaded properly this time, which clearly solves this issue right away.

As for navigation, i found it gets laggy quite often. The canvas takes a long time (about almost 1 minute) to load the chunks of new areas that hasn't been reached yet by the canvas itself. And changing the zoom level also adds the necessity to reload those chunks again from the scratch (because the zoom level is different).
But there's a workaround for the lagging navigation, which can be done by disabling the option to "Render Past and Future Keyframes on Background". Even if this doesn't make the area chunks loads faster, it still makes a handy way for quick navigation.

The slow loading may also applies to the editing (adding or modifying layers, effects, etc.). I only tried to add a new spline couple (line and region), and it took a bit of time to finally get to see the splines on canvas (around 40 seconds to 1 minute). Haven't tried with other layers and editing methods yet, though...

And last but not least, memory consumption (which is obvious considering the file is 'that' huge).
I sometimes can feel the computer lags on the inside while i'm doing all of those file inspecting stuff above. Even the music that i was listening on SoundCloud gets choppy for a bit at a few of those moments. (^-^;;)

The overall performance may still couldn't beat the most recent stable version's yet as for now,
But i can safely say, that this issue has been solved. Even though it still hasn't done it's job perfectly, this is a more-than-good proof. 👍
And since this version is still under development, i'm pretty sure there's always rooms for more improvements in the future.

Once again, thanks a lot for solving this issue. This makes me really happy~
(^O^)/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants