Critical when calling gimp_text_layer_new from plug-in
Environment/Versions
- GIMP version: self-built master with changes to the psd plug-in
- Operating System: Windows 10 Home, 64-bit
Description of the bug
Trying to improve the psd plug-in, see this branch, I get a critical error when calling gimp_text_layer_new
here and the function doesn't return a GimpTextLayer.
Note that I don't always get far enough to see criticals due to other crashes without details, so there may be more going on, or it's all related.
(file-psd:47120): LibGimp-CRITICAL **: 16:00:59.035: gimp_gp_param_to_value: type name GimpTextLayer is not registered
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.035: ../glib-2.76.4/gobject/gtype.c:4406: type id '0' is invalid
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.035: can't peek value table for type '<invalid>' which is not currently referenced
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.035: ../glib-2.76.4/gobject/gvalue.c:220: cannot initialize GValue with type '(NULL)', this type has no GTypeValueTable
implementation
(file-psd:47120): LibGimp-WARNING **: 16:00:59.036: gimp_gp_param_to_value: unsupported deserialization to GValue of type 'GimpTextLayer'
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.036: ../glib-2.76.4/gobject/gtype.c:4406: type id '0' is invalid
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.036: can't peek value table for type '<invalid>' which is not currently referenced
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.037: ../glib-2.76.4/gobject/gvalue.c:220: cannot initialize GValue with type '(NULL)', this type has no GTypeValueTable
implementation
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.037: g_value_type_compatible: assertion 'src_type' failed
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.037: g_value_copy: assertion 'g_value_type_compatible (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value))' failed
(file-psd:47120): GLib-GObject-CRITICAL **: 16:00:59.037: g_value_get_object: assertion 'G_VALUE_HOLDS_OBJECT (value)' failed
Failed to create text layer!
Reproduction
Is the bug reproducible? Yes.
Reproduction steps:
Build the branch mentioned above and load a PSD with a text layer, e.g. https://gitlab.gnome.org/GNOME/gimp/uploads/f43bf45d844b364b0ed561d5fd92b22b/text_layer_bold.psd from issue #94.
I see GimpTextLayer not being mentioned in a few places in libgimp/gimpgpparams-body.c
, but so far haven't found a working solution.
Edit
As far as I remember, this was working when I first worked on this in December. The problem started after rebasing.