LSL Compiler Bug
|
|
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
|
11-20-2006 07:19
I've got a reproducible compiler bug which seems to be related to having a lot of globals.
I wrote a script with 104 global constants and variables and a single method of about 50 statements and got a bogus syntax error. I then commented out a single line of the globals which define a constant not referenced in the script and it compiled and ran correctly. Rearranging the code didn't help.
This has been reported, but be aware that there seems to be a problem in this area.
|
|
Zi Ree
Mrrrew!
Join date: 25 Feb 2006
Posts: 723
|
11-20-2006 08:00
Was the constant a negative number or did it contain any special characters like ° € ~ ß ä ö ü or anything like that?
_____________________
Zi! (SuSE Linux 10.2, Kernel 2.6.13-15, AMD64 3200+, 2GB RAM, NVidia GeForce 7800GS 512MB (AGP), KDE 3.5.5, Second Life 1.13.1 (6) alpha soon beta thingie) Blog: http://ziree.wordpress.com/ - QAvimator: http://qavimator.orgSecond Life Linux Users Group IRC Channel: irc.freenode.org #secondlifelug
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
11-20-2006 08:32
Or, are you mistakenly assigning something that needs to calculated to a variable value? Catches us all from time to time.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-20-2006 08:52
Your scripts complexity was too great for the LSL compiler; complain to LL about raising the amount of space the LSL compiler is given to work in. Specifically the max stack size needs to be increased.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
|
11-20-2006 09:01
The commented out line had nothing to do with where the error appeared, this is a global assignment.
integer m_PicturePrice = 149;
The syntax error is inside a procedure over 100 lines later and doesn't use the constant - actually nothing in the script uses the constant.
string fadeType = llToUpper(llList2String(cmdList, cmdIdx));
It got a syntax error after the first (
Commenting out the m_PicturePrice line resulted in a clean compilation and execution. Actually, commenting out any of the unused globals or variables fixes it as well, there's nothing magic about the m_PicturePrice line, just the number of globals AFAICT
|
|
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
|
11-20-2006 09:10
From: Strife Onizuka Your scripts complexity was too great for the LSL compiler; complain to LL about raising the amount of space the LSL compiler is given to work in. Specifically the max stack size needs to be increased. Hmmm, I'm not sure it would be stack size. That would have more to do with complex statements I would think, like statements with a lot of nested evaluations or calls. This seems to be more that there is some kind of limit on how many globals can be defined, which I would think would just be a symbol table issue. Maybe they have a fixed sized global symbol table or there's a bug when they need to expand it?
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-20-2006 09:11
From: Ralph Doctorow ...The syntax error is inside a procedure over 100 lines later and doesn't use the constant - actually nothing in the script uses the constant. Yep that definitely sounds like the compiler stack limit. Try compiling your code with lslint, it will give you a better error message. http://w-hat.com/lslint
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-20-2006 09:13
Globals are stored in the compilers stack.
The LSL compiler sucks.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
|
11-20-2006 09:59
From: Strife Onizuka Yep that definitely sounds like the compiler stack limit. Try compiling your code with lslint, it will give you a better error message. http://w-hat.com/lslintYes, lslint says the same thing, stack limit error and behaves the same way, comment out the line and apart from the unused variable warnings it compiles. This seems like a pretty restrictive limit to me, and a better error message would also help. lslint seems very useful, is it available as source? I'm pretty leery of loading something like that just as an executable.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-20-2006 10:52
From: Ralph Doctorow lslint seems very useful, is it available as source? I'm pretty leery of loading something like that just as an executable. Source? no. I profiled it in dependencywalker to see what dll's it called. I haven't seen it do anything out of the ordinary. I've come to trust the developer on this one (the name slips my mind).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-20-2006 10:57
Yes you can download lslint and attach it to another editer like NotePad++ or in my case Scite-EZ. All of the links are in the wiki under Alternative Editers
EDIT::: Ooops I demonstrated an ability to not understand a basic question. SORRY!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-20-2006 13:06
From: Strife Onizuka Source? no. I profiled it in dependencywalker to see what dll's it called. I haven't seen it do anything out of the ordinary. I've come to trust the developer on this one (the name slips my mind). I think its Ezhar Fairlight?
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-20-2006 13:32
From: Newgate Ludd I think its Ezhar Fairlight? Thats Scite that Ezhar did (the LSL mod atleast).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|