Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-bend-path
Thanks for the useful script!

I'm running into the following error most of the time:

"An error occurred running python-fu-ofn-bend-path
error: could not end undo group on image (ID 1)"
______
Traceback (most recent call last):
File "/Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/python/gimpfu.py", line 741, in response
dialog.res = run_script(params)
File "/Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/python/gimpfu.py", line 362, in run_script
return apply(function, params)
File "/Users/xxxxxxx/Library/Application Support/GIMP/2.10/plug-ins/ofn-bend-path.py", line 344, in bendPath
image.undo_group_end()
error: could not end undo group on image (ID 1)
______

I'm just using one layer (not a group) and it sometimes works the first time it's run after starting GIMP. But once it starts throwing this error, it keeps doing it until GIMP restarts, and then (sometimes) it will work again once.

Is it possible to get a copy of the previous version, before the groups got added? It looks like it's related to the most recent changes.
I went as far as reinstalling GIMP to see if it was an issue with my configuration, but I'm still getting this behavior.
Thanks!
Reply
An "undo group" has nothing to do with a "layer group". It is a functionality used in plugins that tells gimp that all the modifications done by the script should be lumped into a single undo, so you can undo the whole script action with a single Ctrl-Z instead of a using a Ctrl-Z for each change that the script has done (which in some scripts would take ages).

Starting/ending the undo groups is part of my boilerplate code so it is always part of the code and I have no version of the code without this.

If you can reproduce the problem on a small image please attach the XCF here and I'll check it out.

But IMHO this may be just the result of something else messing with Gimp's undo stack and O-B-P is just an innocent bystander. Does the problem show on a fresh image? Do you run other scripts?
Reply
(10-16-2024, 08:42 AM)Ofnuts Wrote: An "undo group" has nothing to do with a "layer group". It is a functionality used in plugins that tells gimp that all the modifications done by the script should be lumped into a single undo, so you can undo the whole script action with a single Ctrl-Z instead of a using a Ctrl-Z for each change that the script has done (which in some scripts would take ages).

Starting/ending the undo groups is part of my boilerplate code so it is always part of the code and I have no version of the code without this.

If you can reproduce the problem on a small image please attach the XCF here and I'll check it out.

But IMHO this may be just the result of something else messing with Gimp's undo stack and O-B-P is just an innocent bystander. Does the problem show on a fresh image? Do you run other scripts?

Thanks for following up!

I attached an xcf that's just a blank white background, the text layer I used to generate the text path, the guide path, and the original and bent text path. I was able to get it to work once, but then it started throwing the error. If you want to try to recreate it on your system, just try to bend the text path and then undo it and try again. Usually it'll stop working after the first time. Occasionally it'll work twice. I've been using GIMP for over a decade and I've never seen this error message, but you're right it's probably something unique to my system since it seems to work fine for other folks.

I don't have a particularly customized install, so I completely wiped GIMP (including configuration and support files) from my system and reinstalled it. The issue persisted through that. After that I tried installing another of your scripts (text along path) and that seems to work fine. I also installed GMIC-qt, which also seems to work fine. Is there another one of your scripts that's more similar to bend-path I should try?

I'm on an Intel Mac btw if that matters. I don't have a Windows or Linux machine to test on but I should have some time to try it on a M2 mac later today.


Attached Files
.xcf   Bend Path Test works.xcf (Size: 52.17 KB / Downloads: 35)
Reply
(10-16-2024, 05:35 PM)flyAntiquarian Wrote:
(10-16-2024, 08:42 AM)Ofnuts Wrote: An "undo group" has nothing to do with a "layer group". It is a functionality used in plugins that tells gimp that all the modifications done by the script should be lumped into a single undo, so you can undo the whole script action with a single Ctrl-Z instead of a using a Ctrl-Z for each change that the script has done (which in some scripts would take ages).

Starting/ending the undo groups is part of my boilerplate code so it is always part of the code and I have no version of the code without this.

If you can reproduce the problem on a small image please attach the XCF here and I'll check it out.

But IMHO this may be just the result of something else messing with Gimp's undo stack and O-B-P is just an innocent bystander. Does the problem show on a fresh image? Do you run other scripts?

Thanks for following up!

I attached an xcf that's just a blank white background, the text layer I used to generate the text path, the guide path, and the original and bent text path. I was able to get it to work once, but then it started throwing the error. If you want to try to recreate it on your system, just try to bend the text path and then undo it and try again. Usually it'll stop working after the first time. Occasionally it'll work twice. I've been using GIMP for over a decade and I've never seen this error message, but you're right it's probably something unique to my system since it seems to work fine for other folks.

I don't have a particularly customized install, so I completely wiped GIMP (including configuration and support files) from my system and reinstalled it. The issue persisted through that. After that I tried installing another of your scripts (text along path) and that seems to work fine. I also installed GMIC-qt, which also seems to work fine. Is there another one of your scripts that's more similar to bend-path I should try?

I'm on an Intel Mac btw if that matters. I don't have a Windows or Linux machine to test on but I should have some time to try it on a M2 mac later today.

Can't reproduce. Ran it 5-6 times in a row without problems. Even running with my debugging trace I can't see anything suspicious.
Reply
(10-16-2024, 05:35 PM)flyAntiquarian Wrote: ....big snip....
....Is there another one of your scripts that's more similar to bend-path I should try?  

As far as I know for Gimp  Ofnuts plugin is one-of-kind.   There is an old Saul Goode script, so does not need python, but limited to a  four node envelope. I will attach as a just-in-case option. Also only for text and very-very slow.

   

Otherwise, non-gimp Inkscape might be worth a try. 

---------------------
One strange thing here, I use Kubuntu 24.04 / Gimp 2.10.38 / + appimage to add python 2.7 support. Another one of Ofnuts plugins (old one from 2012) finds the font name(s)  from a saved .xcf  file. That crashed until I changed the shebang to #!/usr/bin/env python2  I don't think that is a fix for you, but maybe the version of python in your MacOS is the issue.


Attached Files
.zip   sg-warptext.zip (Size: 5.01 KB / Downloads: 71)
Reply


Forum Jump: