After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541586 - Tool options not saved/loaded correctly?
Tool options not saved/loaded correctly?
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.4.x
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
: 616002 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-04 18:58 UTC by strata_ranger
Modified: 2010-04-18 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description strata_ranger 2008-07-04 18:58:48 UTC
Occasionally, when I start up GIMP I find various Tools set to Blending modes and Opacity values that I did not use on my previous GIMP session (typically "Divide" and 70% opacity).  This even affects tools such as Eraser and Smudge which don't utilize blending modes in the first place (dropdown box is greyed out, but still reads "Divide" instead of "Normal" on those tools).

Unfortunately this does not occur very often (which makes it all the more frustrating when it does), so I have not been able to establish a pattern for this behavior yet.  GIMP is set to save tool options on exit.

PS:  Restarting GIMP to double-check its version number (2.4.4), and found all Tools set to "Divide" blending mode, after I <i>specifically</i> set all Tools back to a "Normal" blending mode before exiting GIMP last time.
Comment 1 Martin Nordholts 2008-07-04 19:32:02 UTC
Sounds pretty annoying, but without a consistent and repeatable way to reproduce the problem, a fix is extremely unlikely to be made.

Just to be sure:
You always let GIMP close completely right? (I.e. you're not forcing it to close in some way.)
Comment 2 Sven Neumann 2008-07-04 21:25:36 UTC
This is most probably an unexpected keyboard interaction. I guess that you are using cursor keys to move a layer or something similar but have the keyboard focus on the tool-options.

Do you have 'save-tool-options' enabled in your gimprc?
Comment 3 strata_ranger 2008-07-05 09:08:20 UTC
I do have save tool options enabled on my GIMP, normal shutdowns, and in most cases they are saved and loaded just fine.  It's the few that aren't which really get to me, because however it does occur, once it does all my tools are saved (and subsequently initialized) with the wrong blending mode/opacity.

There was one time, over a year ago and on an older GIMP version where I actually did use one tool with "Divide" blending and 70% opacity, come to think of it I never experienced the bug prior to that.

Anyway.  For now I'll try an experiment:
1- Delete contextrc and all tool-options setting files.
2- Start GIMP.  (All tools say 100% opacity, normal blending, as expected)
3- Set the Paintbrush to "Divide" and 50% opacity.
4- Saved tool options manually from GIMP Preferences screen.
5- Searched files for divide-mode setting (appears only in contextrc and gimp-paintbrush-tool; precisely as expected)
6- Exit GIMP, repeat previous step (no changes)
7- Restart GIMP, check tool options. (Strange, I am now seeing all my tools set to "Divide" mode and 50% opacity.  Wow, that was fast.)
8- Save tool options manually and search for 'divide-mode' in tool options files. (I am now seeing it in 14 tool-options files plus contextrc.  Basically everywhere)
9- Exit GIMP.
9- Delete all tool-options setting files (but not contextrc).
10- Restart GIMP and check tool options (I am still seeing Divide blending mode and 50% opacity across all tools)
11- Exit GIMP.
12- Open gimp-pencil-tool in a text editor.  Manually change opacity to 1.00 and blending mode to 'normal-mode', save changes.
13- Start GIMP, check Pencil tool.  (Opacity now says 100%, but the blending mode still says 'Divide').
14- Exit GIMP.

* * * * *

Wow, it occured almost on command (steps 6 and 7).  Seems as if the blending mode and opacity specified in contextrc overrode what was saved in the individual tool-options files (also noting that GIMP never records normal-blending or 1.00 opacity in tool-options files, as those are the defaults).

I'll have to try this experiment again tomorrow.
Comment 4 Sven Neumann 2008-07-05 10:52:04 UTC
The interaction between devicerc, contextrc and tool-options is complex and difficult to get right. There might very well be a bug in that code.
Comment 5 strata_ranger 2008-07-05 17:31:18 UTC
Part of the bug is no doubt that when it occurs, even the eraser/smudge/blur/dodge tools (which don't utilize the blending mode option at all) have their blending modes altered, and subsequently saved to disk that way.

Experiment #2, test if this bug varies depending on the last tool used:
* * * * *
1- Delete contextrc and all tool-options settings files; start GIMP.
2- Set Pencil tool to "Dissolve" and 50% opacity.  Save options manually, and with the Pencil tool selected, exit GIMP.
3- Verify the values saved to contextrc and tool-options files (only contextrc and gimp-pencil-tool specify a blending mode or opacity)
4- restart GIMP and check all tools (they were initialized to Dissolve and 50% opacity).
5- Exit GIMP; delete contextrc and all tool-options files, then restart GIMP.
6- Again, set the Pencil tool to "Dissolve" and 50% opacity.  This time, however, select the Paintbrush tool (Normal blending, 100% by default) before exiting GIMP.
7- Verify the values saved to contextrc and tool-options files; restart GIMP and check all tools (Pencil tool says Dissolve and 50%, all other tools still say Normal and 100%).

* * * * *

Conclusions so far:
#1 - If contextrc specifies a blending mode or opacity, all tools which do not specify a blending mode or opacity themselves will inherit those values from contextrc (instead of being initialized to Normal blending and 100%).
Comment 6 Michael Natterer 2010-04-18 10:45:28 UTC
*** Bug 616002 has been marked as a duplicate of this bug. ***
Comment 7 Michael Natterer 2010-04-18 10:52:19 UTC
Fixed in master and 2-6:

commit 713a98da3dc485eed6e0524e0ff6ded4cf244da5
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Apr 18 12:47:18 2010 +0200

    Bug 541586 - Tool options not saved/loaded correctly?
    
    Don't overwrite the entire context part of all tool options with
    values from contextrc, or we will end up with one tool option set to a
    non-default values affecting all other tool options that were at their
    default value in the next gimp session.
    (cherry picked from commit 547c92d0f646710887890621615f4b2777657955)

 app/tools/gimp-tools.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)