re new group script 'ST - Paint'

Case number:699969-991330
Topic:General
Opened by:ErichVonSterich
Status:Open
Type:Bug
Opened on:Monday, December 19, 2011 - 18:07
Last modified:Thursday, January 5, 2012 - 12:08

When this script terminates, I see the message "terminates with items on stack - should be none". Script creator, Thom001, assures me this is a client bug. Sounds potentially serious, though

(Mon, 12/19/2011 - 18:07  |  4 comments)


gramps's picture
User offline. Last seen 5 years 17 weeks ago. Offline
Joined: 12/16/2010
Status: Open » Closed

uh, oops! not UW's problem ...

gramps's picture
User offline. Last seen 5 years 17 weeks ago. Offline
Joined: 12/16/2010
Status: Closed » Open

RE: Public script 'ST - Paint'

re-oops! script is public recipe "ST - Paint (Lua v2)"
http://fold.it/portal/recipe/36488

My bad, regret confusion

beta_helix's picture
User offline. Last seen 9 hours 14 min ago. Offline
Joined: 05/09/2008
Groups: None
Status: Open » Open

oh, hopefully rileya will be able to figure this one out when school starts up again...

rileya's picture
User offline. Last seen 7 years 26 weeks ago. Offline
Joined: 10/18/2011
Groups: None

This is simply a consequence of the "return nil" at the end of the script. The scripting system isn't expecting scripts to return values (there's currently no way of using a value returned from the end of a script, so it doesn't accomplish anything to do so). When the script exits, the return value (in this case nil) gets pushed onto the otherwise empty stack, and so the script runner sees an item on what it had expected to be an empty stack (which could be indicative of an actual error, but is not a real issue here).

Apart from the warning message, this does no harm, so the easy fix to stop the warning message would just be to not return values from scripts. Returning values from functions within the script is fine (as is exiting the script with a plain return statement), it's just exiting from the script itself by returning a value that's the issue here.

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons