2.99 PDB procedure file-jpeg-save throws GLib-GObject-CRITICAL when called non-interactively.
in a plugin call the pdb procedure file-jpeg-save with args (runmode, image, num_drawables, drawables, file). The rest of the parameters should default.
no error messages.
(file-jpeg:89): GLib-GObject-CRITICAL **: 19:37:03.157: g_value_get_double: assertion 'G_VALUE_HOLDS_DOUBLE (value)' failed
(Its not clear in my testing whether it actually created a file and if it did, what jpg options it used. I would think the behavior was undefined after such an error.)
When you use the GUI, File>ExportAs>jpg succeeds without a message. I.E. when called in interactive runmode.
Just reading the code: the cause is likely at plug-ins/file-jpeg/jpeg.c near line 485. There the code calls g_value_get_double to get values of type double for args 5-8, which does not agree with the code near line 232 where the procedure registers those args as types (int, bool, int, int).
Context: I found this using my test plugin https://github.com/bootchk/testGimpExportImport.git, but it is not a small test case. When I also set export G_DEBUG=fatal-warnings, the plugin actually aborts. Ubuntu 20.04 Latest gimp 2.99 self-built using meson build.