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 586451 - Alpha Logo scripts incorrectly become sensitive after "Refresh Scripts"
Alpha Logo scripts incorrectly become sensitive after "Refresh Scripts"
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Script-Fu
2.6.6
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-20 06:40 UTC by David Melik
Modified: 2012-02-07 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.02 KB, patch)
2012-02-04 18:19 UTC, Massimo
needs-work Details | Review

Description David Melik 2009-06-20 06:40:41 UTC
Please describe the problem:
One or all the logo scripts crash.  Of course you have to make a new picture and then 'reset scripts' to even use them, but after that a logo script crashes when used.

Steps to reproduce:
1. start gimp
2. try to use a logo script, but then you have to make a new picture
3. use the logo script


Actual results:
it says for example:

Cool Metal Message
Error while executing script-fu-cool-metal-logo-alpha:

Error: Procedure execution of gimp-floating-sel-to-layer failed on invalid input arguments: Cannot convert this layer to a normal layer because it is not a floating selection.

Plug-in 'Cool Metal' left image undo in inconsistent state, closing open undo groups.

Expected results:
it should make a logo

Does this happen every time?
lately

Other information:
Comment 1 Sven Neumann 2009-06-20 06:56:31 UTC
Reset scripts? What are you talking about? Your bug report is very confusing. Are you talking about all Logo scripts in general or about 'Cool Metal' in particular? How do you access the script? Please give the exact location in the menus.
Comment 2 Sven Neumann 2009-06-20 06:58:18 UTC
Most likely this is nothing but a duplicate of bug #557061. But I will keep it open until the bug reporter answers my questions.
Comment 3 David Melik 2009-06-20 19:03:02 UTC
I meant 'refresh scripts.'  Yes, I am talking about 'cool metal' and all logo scripts.  You have to start a new picture and refresh scripts to be able to use any logo script.  'Cool metal' is the only one I recently tried and then I got the error on it.  I did report this in script-fu, but I will tell you it is 'filters, alpha to logo, cool metal.'
Comment 4 Sven Neumann 2009-06-21 09:56:48 UTC
What makes you think that you need to 'refresh scripts' to be able to use a Logo script ?
Comment 5 David Melik 2009-06-21 21:18:55 UTC
On my system, Slackware64 with KDE 3.5.10, the way GIMP just works is when you start it the logo script menu options are gray and inacessible.  Then when I 'refresh scripts' the logo script menu options become black and accessible.
Comment 6 Sven Neumann 2009-06-21 22:15:17 UTC
Uh, the way this is supposed to work is that these scripts need an RGBA image to work on. The fact that they become accessible after you call "Refresh Scripts" is a bug.

The crash you reported is a duplicate of bug #557061. But we should really fix the menu sensitivity bug that you pointed out. Changing the summary accordingly.
Comment 7 Sven Neumann 2009-06-21 22:18:43 UTC
Note that the wrong menu state is only there directly after refreshing the scripts. As soon as the image is updated once, the state of the menu items is corrected. But the situation is particularly bad with the empty image window as there are no image updates on this window and the user may call the scripts without even having an image opened.
Comment 8 David Melik 2009-06-21 22:43:24 UTC
I had reported that first I had to make a blank image to use the logo scripts.  I thought that was what happened a few weeks ago, but 2.6.6 may be newer.  However, I found out that also when I 'refresh scripts' before even making an image they become accessible, though when I try 'cool metal' it still crashes with a similar error as if I had made a blank image and tried 'cool metal.'  I do not know about all the other logo scripts, but I also tried '3d outline' before making an image and got such an error; I hope I have given you enough info to start seeing if there is sometimes anything wrong in general with logo scripts.
Comment 9 Sven Neumann 2009-06-22 21:33:16 UTC
There is nothing wrong except that these scripts absolutely need an image to work on and must not be called from an empty image window. The bug is that calling 'Refresh Scripts' makes this possible. The fact that the scripts may crash if called in this way is nothing but a followup error.

Perhaps you are actually looking for the scripts that create new Logos from scratch? They are found in the File->Create->Logos menu.
Comment 10 Crystal 2009-07-07 09:27:22 UTC
I get this bug too. I have an image (tried this with both png and xcf) that I load. I attempt to apply Cool Metal to it, but instead of doing Cool Metal it gives the following error:
Cool Metal Message

Error while executing script-fu-cool-metal-logo-alpha:

Error: Procedure execution of gimp-floating-sel-to-layer failed on invalid input arguments: Cannot convert this layer to a normal layer because it is not a floating selection. 


I am running 64 bit Vista with SP1 and GIMP 2.6.6
Comment 11 Sven Neumann 2009-07-07 10:33:14 UTC
(In reply to comment #10)
> I get this bug too. I have an image (tried this with both png and xcf) that I
> load. I attempt to apply Cool Metal to it, but instead of doing Cool Metal it
> gives the following error:
> Cool Metal Message
> 
> Error while executing script-fu-cool-metal-logo-alpha:
> 
> Error: Procedure execution of gimp-floating-sel-to-layer failed on invalid
> input arguments: Cannot convert this layer to a normal layer because it is not
> a floating selection. 

That is bug #557061.


Comment 12 Michael Natterer 2011-03-20 20:21:54 UTC
Let's see it we get this fixed in 2.8...
Comment 13 Massimo 2012-02-04 18:19:14 UTC
Created attachment 206773 [details] [review]
Proposed patch

Basically the excerpt from plug_in_actions_update dedicated
to update actions sensitivity copied in plug_in_actions_add_proc.

Plus a fix for a memory leak appeared while testing.
Comment 14 Michael Natterer 2012-02-06 22:10:32 UTC
Review of attachment 206773 [details] [review]:

Looks good, except that you should probably call
sensitive = gimp_plug_in_procedure_get_sensitive(...)
also when drawable is NULL, just like the other
function, for consistency.

And please commit the leak fix separatels.
Comment 15 Massimo 2012-02-07 16:42:22 UTC
pushed (consistently and separately).

commit 7cf2ee6397ac05ca8a925b8667fc313cc321a099
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Tue Feb 7 16:56:41 2012 +0100

    Bug 586451: Alpha Logo scripts incorrectly become...
    
    sensitive after "Refresh Scripts"