RSS/Atom feed Twitter
Site is read-only, email is disabled

Sometimes the contents of config/devicerc are not read

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Sometimes the contents of config/devicerc are not read Elle Stone 09 Jun 13:13
  Sometimes the contents of config/devicerc are not read Simon Budig 09 Jun 14:28
Elle Stone
2016-06-09 13:13:30 UTC (almost 8 years ago)

Sometimes the contents of config/devicerc are not read

When using GIMP 2.9/2.10 at floating point precision, various editing operations can generate RGB colors that have one or more channel values that are outside the range 0.0 to 1.0.

These out of gamut floating point colors generate two inconvenient error messages, one from GIMP and one from glib:

1. From GIMP:

If the last Foreground/Background color that was picked is out of gamut, then upon restarting GIMP a pop-up message says:

"Error while parsing '/home/elle/code/gimpdefault/install/config/devicerc' in line 7: unexpected character '-', expected number (float) - fatal parse error"

The same message is printed to the terminal.

Triggering this error message seems to keep GIMP from reading the entire contents of config/devicerc, which changes things the user might have configured, including:

* The colors stored for the FG/BG tool revert to black and white. * The preselected paint dynamics revert to Dynamics Off. * The preselected brush reverts to the clipboard.

The error can be eliminated by removing the following two lines from libgimpconfig/gimpscanner
(https://git.gnome.org/browse/gimp/tree/libgimpconfig/gimpscanner.c):

gimp_hsv_clamp (&hsv); gimp_rgb_clamp (&color);

2. From glib:

When using GIMP, when the color picker picks an out of gamut color, glib prints to the terminal the following message:

(gimp-2.9:1865): GLib-GObject-WARNING **: value "((GimpRGB*) 0xde2f30)" of type 'GimpRGB' is invalid or out of range for property 'color' of type 'GimpRGB'

These error messages can be eliminated by removing the following lines from glib's gobject/gobject.c
(https://git.gnome.org/browse/glib/tree/gobject/gobject.c):

else if (g_param_value_validate (pspec, &tmp_value) && !(pspec->flags & G_PARAM_LAX_VALIDATION))
{
gchar *contents = g_strdup_value_contents (value);

g_warning ("value \"%s\" of type '%s' is invalid or out of range for property '%s' of type '%s'",
contents,
G_VALUE_TYPE_NAME (value),
pspec->name,
g_type_name (pspec->value_type)); g_free (contents);
}

Can the glib people be persuaded to do something about the glib error message? I perused the internet and notice other people complaining about other error messages that glib prints to the screen. I couldn't find a compile option for glib to eliminate these messages.

Best, Elle

Simon Budig
2016-06-09 14:28:27 UTC (almost 8 years ago)

Sometimes the contents of config/devicerc are not read

Elle Stone (ellestone@ninedegreesbelow.com) wrote:

"Error while parsing '/home/elle/code/gimpdefault/install/config/devicerc' in line 7: unexpected character '-', expected number (float) - fatal parse error"

Yay, now the implicit assumptions crop up :)

Thanks for spotting this.

2. From glib:

When using GIMP, when the color picker picks an out of gamut color, glib prints to the terminal the following message:

(gimp-2.9:1865): GLib-GObject-WARNING **: value "((GimpRGB*) 0xde2f30)" of type 'GimpRGB' is invalid or out of range for property 'color' of type 'GimpRGB'

This is not actually glib. Somewhere in the definition of GimpRGB we apparently register one getter/setter function that errors when encountering negative or >= 1 values. This needs fixing in gimp itself.

Mitch: is extending the range of GimpRGB harmless enough to do?

Bye, Simon

simon@budig.de              http://simon.budig.de/