Lua - bugs and problems

Case number:845813-986954
Topic:Game: Tools
Opened by:steveB
Status:Closed
Type:Bug
Opened on:Wednesday, October 28, 2009 - 06:51
Last modified:Thursday, July 19, 2012 - 01:03

Hi,

I had a first good look at the Lua scripting yesterday and made some notes whilst doing so :

- If you run a Lua script on a protein with some segments frozen, foldit crashes. There needs to be an unfreeze_all() command of some sort to allow adjustments of the structure on which the Lue script will be working, since the command 'restore_abs_best()' also has the potential to load in a frozen protein.

- Canceling a script can cause foldit to crash

- It would be much more useful in the do_local_rebuild() function if 1 iteration was defined as 1 rebuild, and not some arbitrary number. ie If I request 'do_local_rebuild(1)' it stops when it comes across the first rebuilt section.

- You cannot get braces {} to appear in the script on a German keyboard. The key combination is AltGr+7 and AltGr+8 for the respective brackets.

- The 'save' icon does not light up when writing a new script. To save the script you have to "set details" every time to make the 'save' work properly.

- If you save a script, then ammend it, then try to reload the same script (which should be without the ammendments) it does not work - you are left with the ammended script.

- Cntr Z (delete last) is a vital tool and is missing from the interface

- A copy and paste functionality would be very useful. At present you can paste (Cntr V) but cannot highlight sections of text and copy them (Cntr C).

- In the help facility it would be much more legible if the function names were in one colour and the description in another

Rgds

Steve B

(Wed, 10/28/2009 - 06:51  |  29 comments)


Joined: 09/18/2009
Groups: SETI.Germany

Well, that´s an impressive summary! I´m with you.
Frozen Proteins lead to a lua crash? Ooops, good that I didn´t try it :)

Getting the "selected"- status of a single segment or "locked"-status of backbone and sidechain would fix this, so you could skip a frozen segment and only execute selected parts of the game interface.

Joined: 09/18/2009
Groups: SETI.Germany

I tried a workaround for the keyboard problem by changig language to English in the language bar (In german called Eingabegebietsschemaleiste, what a word!), which activates english keyboard behaviour, giving edged brackets by pressing ü and + and braces by pressing SHIFT-ü and SHIFT-+ but only in windows and its programs ;(

Joined: 09/18/2009
Groups: SETI.Germany

Now, I´ve got a workaround!
If you want brackets or braces in the script, write some word into the script which is never used everywhere else, like um... "rhubarb", for example.
Words like "test", "wiggle" or something like this would not be unique.
Close Foldit.
Then, search in C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\foldit (or wherever windows stores this file) the file "all.macro" and open it with the text-editor.
Search for "rhubarb" and exchange it to your needs. Insert []{} etc.
If you are done, save the file over.

I recommend you to make a copy of all.marco before and to save the script under another name just after restarting foldit.

Joined: 09/18/2009
Groups: SETI.Germany

all.marco? I meant all.macro
Sorry.

Joined: 09/18/2009
Groups: SETI.Germany

CTRl-V works also for special symbols, I didn´t know that! *feels ashamed*

Joined: 09/18/2009
Groups: SETI.Germany

You can make the SAVE-button (for overwriting recipes) appear again, if you open the recipe-info-box and close it again.

Maybe, the game is programmed this way that a "change in the script-code" is only noticed if you also change the info.

Joined: 09/18/2009
Groups: SETI.Germany

I'm re-assigning it, so the problems will be noticed.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

Canceling a script can cause foldit to crash
I have attached log files.

Brick's picture
User offline. Last seen 1 year 47 weeks ago. Offline
Joined: 07/15/2008
Groups: Beta Folders

You know, by now I think they get it. Endless posting of logs isn't going to fix it.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

True, But it would be nice to hear that from admin too.

Brick does this Bug crash your foldit?

Brick's picture
User offline. Last seen 1 year 47 weeks ago. Offline
Joined: 07/15/2008
Groups: Beta Folders

No - never has, and I've been running and stopping a lot of scripts, both the "classic" style and lua based.

Joined: 09/18/2009
Groups: SETI.Germany

Must be a "stacking" problem.
This error rather occurs, if the running script is in a loop (or function), and in this loop another loop is executed, and if you abandon the progcess then.

Running a single loop won't let it crash.

For example:

for k ...
[point 1]

for l ...
[point 2]
end [of loop l]

[point 3]
end [of loop k]

You see, this are two loops whereas the loop "for l" is executed within loop "for k"
If you terminate the process at point 1 or 3, a crash is rather improbable,
abandoning the script at point 2, a crash is more probable.
If you would execute a function at point 2 AND terminating the script while this function is called, a crash is almost for sure.

I hope, this proves and gives more details.

best regards,
Alex

Joined: 09/18/2009
Groups: SETI.Germany

If it would be possible to fetch some keypresses by command or variable, we could terminate by the script by itself and not by GUI, by exiting loops if a stop key was pressed.

Joined: 11/10/2007
Groups: Window Group

Can someone post, or give me the name of, a script that consistently crashes for the cases mentioned above, 1) when some segments are already frozen and 2) when canceled at a certain point?

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

A screenshot of the recipe output box below is of the script sequence that makes foldit crash if you cancel at that point, with a few seconds of the global wiggle starting.

mat747's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 10/15/2008
Groups: Void Crushers

The script was "Acid Tweeker v0.5" by Steven Pletsch
(A great script, thanks steven)

Joined: 11/10/2007
Groups: Window Group
Status: Open » Open

Thank you, that will be very helpful in tracking this down.

Joined: 06/17/2010
Status: Open » Closed

Looks like it is fixed long time ago...

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