gimp_get_default_unit(): makes Python-Fu Console crash
Environment/Versions
- GIMP version: 2.99.14
- Package: Installer from gimp.org
- Operating System: Windows
Description of the bug
I'm developing a python plugin to write some text.
I'm migrating my working scripts from Gimp-2.10.32-1 to 2.99.14 (to be ready for 3.0)
But LayerText requires Gimp.Unit parameter, so I encountered this crash several times
Somehow I discovered that the bug could be due to Gimp.Unit
Reproduction
Is the bug reproducible? Always
Reproduction steps:
Python-Fu --> Python Console
img = Gimp.list_images()[0]
unit = img.get_default_unit()
OR simply
unit = Gimp.get_default_unit()
Actual result: (see screenshots)
Additional information
GNU Image Manipulation Program version 2.99.14
git-describe: GIMP_2_99_14
Build: org.gimp.GIMP_official rev 0 for windows
# C compiler #
Using built-in specs.
COLLECT_GCC=C:/msys64/mingw64/bin/cc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev6, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Rev6, Built by MSYS2 project)
# Libraries #
using babl version 0.1.99 (compiled against version 0.1.99)
using GEGL version 0.4.41 (compiled against version 0.4.41)
using GLib version 2.74.1 (compiled against version 2.74.1)
using GdkPixbuf version 2.42.10 (compiled against version 2.42.10)
using GTK+ version 3.24.34 (compiled against version 3.24.34)
using Pango version 1.50.11 (compiled against version 1.50.11)
using Fontconfig version 2.14.0 (compiled against version 2.14.0)
using Cairo version 1.17.6 (compiled against version 1.17.6)
GIMP-WARNING: gimp-2.99.exe: gimp_wire_read(): error