Workaround for GIMP crashing with KM running

Continuing the discussion from Copying certain objects from Illustrator CC2015 is slow:

@peternlewis - I tried this to see if it solves the problem I've been having with GIMP crashing when KM is running. It appears to solve the problem, although time will tell for sure. But before I get too excited, I have some questions:

###Automatically changing defaults when GIMP starts/stops:
Assuming changing the default does indeed work, consider this scenario:

  • When GIMP starts up, automatically execute:
defaults write com.stairways.keyboardmaestro.engine MaxClipboardHistory -int 0
  • When GIMP quits, automatically execute:
defaults delete com.stairways.keyboardmaestro.engine MaxClipboardHistory

##Questions & Suggestions

  1. It appears that the KM Engine detects the change to the default right away. Is this correct, or should I reset the engine?

  2. When 'MaxClipboardHistory' is set to 0, what things won't work? For instance:

  3. Can macros still use "Insert Text by Pasting"?

  4. What happens if a macro executes an action that deletes the most recent clipboard history entry? I think I don't care as long as it doesn't cause an error...

  5. Any other considerations?

Thanks. I'm cautiously optimistic that this might finally solve this PITA issue. It's so frustrating to spend time on an image in GIMP, only to lose it because I didn't save it before GIMP crashes due to doing simple copy/pastes.

You will lose your clipboard history entirely. Everything that is not marked as a favorite will be removed when you next copy something.

Anything in Keyboard Maestro that reads the system clipboard will read it at the time it is used in the macro, so they will all work.

Pasting is unaffected.

Anything that uses the past clipboards (eg the PastClipboard token) will not work (will work as if you had chosen either 0 (the current clipboard) or an infinitely high number).

Probably nothing, since you cannot "delete" the system clipboard, you can only replace it with something else, and there is nothing else to replace it with since there is no second entry in the clipboard history to replace it with.

It's a crappy solution, removing a big chunk of important functionality (heck, even if you don't use Keyboard Maestro you really should have a clipboard history, it's a very importatn facility.).

Thanks.

If it lets me run GIMP and KM together, it's worth it. The whole point of this post was that I'd be doing this only when I run GIMP. I don't mind losing the contents of the clipboard history when I do this.

So I wouldn't say it's a crappy solution, I'd just say it's not ideal. And it sure beats the alternative, which is GIMP crashing and losing my work. Now, THAT is crappy, to say the least!! :open_mouth:

Thanks again. :slight_smile:

Just got an email saying that someone determined exactly what the issue is, and that “a patch is forthcoming”.

1 Like