"restore credit best" crashes recipe during band.SetStrength

Case number:845813-2004583
Topic:Game: Tools
Opened by:LociOiling
Status:Open
Type:Bug
Opened on:Thursday, December 21, 2017 - 01:17
Last modified:Monday, January 15, 2018 - 07:45

Accidentally using the keyboard shortcut lowercase "i" when a recipe happens to be running band.SetStrength can cause the recipe to terminate with an index out of bounds error.

I suspect this happens if the best position doesn't have any bands, so the band index passed to band.SetStrength is no longer valid.

The undo shortcuts like "i" should be disabled while a recipe is running.

Not sure, but I wonder if this problem may be related to the fact that you can add, change, or delete bands while a recipe is running. It's often handy to be able to play with bands while wiggle is running, but it probably makes sense to disable that ability while a recipe is running.

The recipe bandfun 1.0 can be used to recreate this problem. The recipe draws a lot of bands, and sets the strength of many of them. Hitting "i" during the early going usually terminates the recipe. (The band.Add calls in the recipe are wrapped in pcall calls, but the band.SetStrength calls are not.)

I assume that other band functions which use a band index might show the same behavior.

Not directly related, but band.SetStrength seems relatively slow. The first part of bandfun 1.0 draws a relatively small number of long, strong bands, and seems quite slow. The second part draws many more bands without changing their strength, and seems much faster.

(Thu, 12/21/2017 - 01:17  |  5 comments)


Hanto's picture
User offline. Last seen 8 hours 19 min ago. Offline
Joined: 05/10/2008
Groups: None

Not crashing on my current machine, but may be creating breaks which continue running, possible short pauses, but no crashing. But I do concur that no shortcut keys or any keys outside of the normal " CANCEL " should be affecting recipe runs. Saw something similar to this the other day on a client which reset itself to CREDIT BEST while recipe was running and I had been accidently brushing keys with fingertips. Wasn't handy then and probably won't be in the future.

Hanto's picture
User offline. Last seen 8 hours 19 min ago. Offline
Joined: 05/10/2008
Groups: None

Apparent breaking/pausing is a visual artifact due to my blindness and red light banding on recipe ( bandfun )

brow42's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 09/19/2011
Groups: None

There are many, many ways for players to change the number of bands while a recipe is running, both by accident or on purpose. This can easily crash the script. usually this is a bad idea but sometimes I mess with bands during a rebuild script.

* Bands can be disabled, deleted, or added with mouse clicks. Deleted with R. Surprised you were able to do a restore best. There may be a difference between which shortcut keys are active in selection and original interface. Obviously any key that does a configuration load from a quicksave or autosave can change the number of bands, too.

Hanto's picture
User offline. Last seen 8 hours 19 min ago. Offline
Joined: 05/10/2008
Groups: None

Might be misinterpreting what I said, there was no crash of the bandfun recipe and it did not change the protein on which it was run in any fashion that I can easily see on 4 different computers all the while using Restore Credit Best during SetStrength part of bandfun. I, personally, could see no way in which the protein was damaged by the bandfun run. If it can and does, then I would have to consider it an option to break minimas, but so far, it's a nogo. Sorry

Hanto's picture
User offline. Last seen 8 hours 19 min ago. Offline
Joined: 05/10/2008
Groups: None

Finally, after much effort, I was able to accomplish Loci's stated goal with the "i" key on all my computers, however, 2 of the computers would not exhibit the error wording in the recipe output box. Simply put, there should be no inputs, except for cancel key during recipe run, assuming one wants to call the error above a crash. I see it primarily as computers being different, possibly in keyboard only. What we should be discussing is the real Foldit bug of the past 7 years, the tracks scoring bug. Why are we letting it slide by?

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, Microsoft, Adobe, RosettaCommons