Python-fu file-format plugin crashes with null-pointer dereference in babl_format_with_space
Environment/Versions
- GIMP version: 2.99.13 / commit b3332bb9
- Package: nightly Flatpak
- Operating System: Linux / Flatpak
Description of the bug
Loading an image via a custom python-fu file-format plugin, via the file menu
Reproduction
Always
Reproduction steps:
- File -> Open
- Select an image of the appropriate image-format
- Hit open button
Expected result:
Loading the image without a crash
Actual result:
Plugin crashes with segfault (null-pointer dereference)
Additional information
Backtrace attached. bt_bt.txt
I tried to investigate the problem by running gimp in gdb. The crash happens as 'space' is a null-pointer at line 755 (in babl-format.c), even after the call 'space = babl_space ("sRGB")'.
So, lucky me, it appears it is not my (plugins) fault.
If needed / helpful:
- The openraster/ora plugin works fine.
- The actual plugin is a thin wrapper based on the ora plugin (like "register the procedure with gimp, import the python modules which do the actual work and pass the filename to them").
- If these modules are called via the python-console plugin, they work perfectly.
- The corresponding python statement is calling get_buffer() on a 'Gimp.Layer' / 'GType GimpLayer'.
I will try to provide further information if needed. Thanks!
Edited by pkrause1980