Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 178067

Summary: media-gfx/gimp: Script-Fu doesn't work - even with 100% good scripts
Product: Gentoo Linux Reporter: GregS <phoenix_>
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: RESOLVED NEEDINFO    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://www.gimptalk.com/forum/topic/tut-Installing-Scripts-And-Gradients-4718-last.html#164824
Whiteboard:
Package list:
Runtime testing required: ---

Description GregS 2007-05-11 15:06:18 UTC
When I am trying execute Script-Fu gimp reporting error even if script is 100% correct - for example:

Error: set!: unbound variable:

The script is checked on different version of gimp and works good. No errors

Reproducible: Always

Steps to Reproduce:
Example script:

(define (cond-example image drawable opt)
  (set! a
     (cond 
          (( equal? opt 0 ) "you choose option 0" )
          (( equal? opt 1 )  "you choose option 1" )
          (( equal? opt 2 )  "you choose option 2" )
          (( equal? opt 3 ) "you choose option  3" )
          (( equal? opt 4 ) "you choose option 4" )))

 (gimp-message a)
)

(script-fu-register "cond-example"
    _"<Toolbox>/Xtns/Script-Fu/Gimp-talk.com/Cond-Example..."
    "Cond-example is the most basic example i could think of for demonstrating the use on (cond) and equal?"
    "kward1979uk"
    "Gimptalk.com"  
    "2006"
    "*"
    SF-IMAGE "Image" 0
    SF-DRAWABLE "Drawable" 0
    SF-OPTION "OPTION"'("option 0" "option 1""option 2""option 3""option 4")
)

1. Register script in GIMP (create file *.scm | past the above example script | save file in ~/.gimp-version/scripts directory
2. Run GIMP - execute script
3. The following error apear: Error: set!: unbound variable: a
Actual Results:  
Problem appear in GIMP version 2.3.14, 2.3.16, SVN (gimp-9999 -> 2.3.17) - in version 2.2.xx everything is working fine!
Comment 1 Hanno Böck gentoo-dev 2007-05-11 17:53:57 UTC
Well, I have NO idea of functional languages, but this looks to me like an upstream bug. Can you report it to gimp bugzilla?
Comment 2 GregS 2007-05-13 20:30:13 UTC
Yes - I already did it. It seems like it is problem with GIMP itself. Maybe slashes and backslashes in path, or the code page (coding) for script files. (I found quite similar error on GIMP bugzilla). 

Comment 3 Hanno Böck gentoo-dev 2007-05-30 20:11:48 UTC
Can you point me to the gimp bug number? And can you check if this still happens with 2.2.15 as soon as it hits portage?
Comment 4 Hanno Böck gentoo-dev 2007-06-29 17:17:49 UTC
No reply from reporter, please re-open if it's still an issue that should be fixed in gentoo. If it's an issue in upsream-gimp and will be fixed there, we'll get it soon anyway.