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

Resynthesizer plugins can crash on large image files of 1 GB #97

Open
tsong3 opened this issue May 31, 2021 · 1 comment
Open

Resynthesizer plugins can crash on large image files of 1 GB #97

tsong3 opened this issue May 31, 2021 · 1 comment

Comments

@tsong3
Copy link

tsong3 commented May 31, 2021

Hello. I wrote a bug report my issue to gitlab, but someone replied that I needed to reach out to the author of the plugin. After searching online for a while, I ran across this forum which appears to me that you might be responsible for the releases of this. Does this issue I wrote about is one of the known limitations of what the resynthesizer plugin does?

Here is the link explaining what I am experiencing. https://gitlab.gnome.org/GNOME/gimp/-/issues/6928#note_1126315

@bootchk
Copy link
Owner

bootchk commented Jun 1, 2021

Yes, it is a known limitation and yes this is the right forum.

The Resynthesizer plugin is known to crash in certain rare use cases on very large images about 1 gigabyte in size.
Only the plugin should crash. The GIMP app itself should not crash.

The Resynthesizer engine does not use the GEGL tile backend. Instead it loads the entire image (more precisely, it also depends on the selection in most cases) into virtual memory, which is only as large as your swap space. When it runs out of virtual memory, the OS kills the plugin process.

Even if you make virtual memory larger (add swap space) or even if the plugin used the GEGL tile backend, I think it would be so slow as to be practically unusable. The plugin would "thrash."

I discuss this in the wiki: the algorithm is not a traditional filter using a graphics kernel, instead it is a search algorithm and accesses the entire image. So tiling doesn't help, or at least trades off one use case against another.

More about exact use cases. One known failure case is "Heal transparency", which ignores the selection and so processes the entire image. However, "Heal selection" should not be a failure case if the selection is small enough. In that case, the Python part of the plugin should crop the original image to something smaller around the selection, and pass the cropped image to the engine, etc. But Heal selection could fail when the selection is not compact, e.g. marching ants all across the image.

I don't think this issue is something that can be fixed. Maybe the plugin could give a warning.

@bootchk bootchk changed the title Possible file size rendering issues on resynthesizer? Resynthesizer plugins can crash on large image files of 1 GB Jun 1, 2021
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

2 participants