Lua - bugs and problems
| Case number: | 845813-986954 |
| Topic: | Game: Tools |
| Opened by: | steveB |
| Status: | Done |
| Assigned: | Seth Cooper |
| Priority: | 3 |
| 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
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 ;(
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.
all.marco? I meant all.macro
Sorry.
CTRl-V works also for special symbols, I didn´t know that! *feels ashamed*
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.
| Assigned: admin » Seth Cooper |
I'm re-assigning it, so the problems will be noticed.
As per usual, amazing detail to the finer parts of the scripting stuff. thanks Crashguard !!!! always nice to read your input !
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
Canceling a script can cause foldit to crash
I have attached log files.
You know, by now I think they get it. Endless posting of logs isn't going to fix it.
True, But it would be nice to hear that from admin too.
Brick does this Bug crash your foldit?
No - never has, and I've been running and stopping a lot of scripts, both the "classic" style and lua based.
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
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.
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?
The script was "Acid Tweeker v0.5" by Steven Pletsch
(A great script, thanks steven)
| Status: Open » Ongoing |
Thank you, that will be very helpful in tracking this down.
| Status: Ongoing » Done |
Looks like it is fixed long time ago...






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.