GreycLab / gmic

GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Other
66 stars 11 forks source link

Error report with the filter Morph (not using the good Ubuntu version...) #15

Closed fabiengabriel closed 5 months ago

fabiengabriel commented 11 months ago

Hi Just to report an error message with the filter Morph [Interactive] :

*** Error in ./fx_morph_interactive/x_morph/*repeat/*local/*substitute/max_wh/_minmax_whds/ *** Item substitution '{ mw = w; mh = h; md = d; ms = (...)s#k); ); ([mw,mh,md,ms])[0,2]}': Unrecognized function call 'repeat( l,k, mw = max(mw,w#k); mh = max(mh,h#k); md = max(m(...)' in expression '...repeat( l,k, mw = max(mw,w#k); mh = max(mh,h#k); md = max(m(...)...'.

I use the last version 3.3.0 of "Ubuntu 22.04 Jammy: Plug-in for GIMP 2.10" with GIMP 2.10.30 on ... Ubuntu 23.04 ... maybe is it the cause of the issue? (But many other filters work anyway) If it is just because of the Ubuntu version, sorry! But if not, I hope my report could be helpful. Thanks!

dtschump commented 11 months ago

Hello. If the plug-in runs, then using it in 23.04 is not the cause of the issue. I've tried here, and this filter works as expected. Have you tried refreshing your filters ? If so, could you provide a simple and detailed way to reproduce the issue (image data and steps ?). Thanks!

fabiengabriel commented 11 months ago

Hi

The error remain after refreshing the filters.

I tried different images. Here the two pictures I used for the test :

I go to the menu "Filters">G'MIC-Qt..." which opens a window. I refresh the filters (the icon of a spinning arrow, with the box "Internet" checked), and it says : "Les définitions de filtres ont été mises à jour".

Capture d’écran du 2023-09-21 13-58-35

With some basic transformations, the filters are okay:

Capture d’écran du 2023-09-21 13-54-21

Here a screenshot of the error with "Morph":

Capture d’écran du 2023-09-21 13-54-59

I see that the error appears not only with the "Morph" filter, but also with many others... Even "What's New?":

Capture d’écran du 2023-09-21 14-00-32

So I tested the error with the functions :

The errors seem most of the time related to the function repeat. So I made a quick search and I found some discussions about the error :

For information, I was using GIMP installed by snap. I tried other installation methods (using Flatpak and AppImage), but Gimp never found the Plug-in G'Mic, whatever the directory I put it in or whatever the installation method.

Let me know if I can try something else.

Thanks!

Fabien

dtschump commented 11 months ago

I use the last version 3.3.0 of "Ubuntu 22.04 Jammy: Plug-in for GIMP 2.10" with GIMP 2.10.30 on ... Ubuntu 23.04 ... maybe is it the cause of the issue? (But many other filters work anyway)

It seems to me (looking at the screenshot) that you are rather using the quite old version 2.9.6. This may explain the issue. Could you try with latest stable version *3.3.0 ? This issue has been probably fixed since 2.9.6 !

fabiengabriel commented 11 months ago

Okay, I got it!

Explanation:

When installing GIMP 2.10.30 via Snap, the older version of G'Mic (the 2.9.6) is included. I found the file "gmic_gimp_qt" in the directory /snap/gimp/393/usr/lib/gimp/2.0/plug-ins/. I did not even check whether an old version of G'Mic already existed before downloading and installing its version 3.3.0. I was just surprised that G'Mic did not appear in the menu when placed in ~/snap/gimp/393/.config/GIMP/2.10/plug-ins, certainly due to a conflict with the old version (so I moved it in another). It was such an obvious clue, but I haven't noticed it!

The problem remains because I do not know how to remove the old plugin version. The system does not let me easily delete the file gmic_gimp_qt (even in super user), and I guess this is not a good ideal anyway. But I haven't figured out how to delete it (using snap?).

Do you have an idea?

dtschump commented 11 months ago

Do you have an idea?

Not really no. I'm not using snap at all to install things, sorry.

fabiengabriel commented 11 months ago

I've finally found a solution:

  1. I removed the snap installation of GIMP, purging everything: sudo snap remove gimp --purge
  2. I installed GIMP using Flatpak as recommended on https://www.gimp.org/downloads/: flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref
  3. I installed G'Mic using Flatpak as proposed here https://www.gimp-forum.net/Thread-GMic-Disappeared-from-GIMP-2-10-24-Flatpak-Installation-Solved: flatpak install flathub org.gimp.GIMP.Plugin.GMic where I sellected the Branch 2-40.
  4. Now I can use the last G'Mic 3.30 version and all the filters seem to work

Capture d’écran du 2023-09-21 22-13-03

Thank you anyway for your help.

dtschump commented 11 months ago

Great, thanks for sharing your solution. I'm pretty sure this will help others!