Update : I’ve currently compiled G’MIC with the address sanitizer and I get indeed a few issues.
I’ll try to fix those ASAP and make you know when it’s ready.
This will probably lead to a 2.9.4 release…
I’ve made two fixes related to possible wron memory access.
Would you like to test on your machine ?
Basically, you have to modify file gmic.cpp, with the following commits:
and
That’s minor modifications that you can apply on the sources, then you have to recompile everything, and test once again.
Thanks for your help !
I’d love to try it but I’m not finding gmic.cpp in my sources.
I went to the gmic-master source tree in the git links you sent and modified the code as suggested, but then the commands you gave to build it do not work.
Sorry but it seems I need some hand-holding, as I don’t understand how to build it.
I’ll prepare an up-to-date pre-release archive and post it in a few minutes (half an hour).
It will be easier to make the test. I’ll let you know when it’s ready!
Well I figured this must be the case and copied gmic_gimp_qt to my plugin folder and gave it a go.
gmic_gimp_qt:419520): Gtk-WARNING **: 15:35:09.070: Theme parsing error: gtk.css:4:1: '/*' in comment block
/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt: fatal error: Segmentation fault
Terminating plug-in: '/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt'
GIMP-Error: Plug-in crashed: "gmic_gimp_qt"
(/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt)
The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.
Haa bad news.
So, could you do the same procedure as before, compiling it with the fsanitize=address enabled ?
Also, please check that GIMP actually takes the latest binary of the plug-in, sometimes there are duplicates and it’s not always easy to find which binary it loads.
I think I was chasing my tail for a while. Should I have tried to make clean between builds?
Anyway, I just deleted the entire build directory and tried again with the new gmic.cpp. Here’s what happened.
(gmic_gimp_qt~:442422): Gtk-WARNING **: 16:32:19.546: Theme parsing error: gtk.css:4:1: '/*' in comment block
/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt~: fatal error: Segmentation fault
Terminating plug-in: '/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt~'
GIMP-Error: Plug-in crashed: "gmic_gimp_qt~"
(/home/akovia/.config/GIMP/2.10/plug-ins/gmic_gimp_qt~)
The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.
I’m pretty sure I’ve fixed the first issue you got.
It was related to a null pointer, used for a string comparison.
Maybe there are another problem going on.
Again, if you succeed in compiling the stand-alone G’MIC-Qt application, with fsanitize=address enabled, and copy/paste the error log you get from the console, I’ll be able to better understand where the problem comes from, and hopefully fix it.
I’m still a bit surprised about the fact it doesn’t work, but of course, it’s hard to test on all different architectures and compiler versions, so these things may happen from time to time.