šŸ“ƒ SLua Alpha

General discussion and feedback on Second Life's SLua Alpha
Memory limit reached during state_entry method when there's plenty of memory left
I've been porting a set of three scripts to the LSL on luavm 2025 and have run into an unexpected memory limit issue. As the script has grown by my enabling more of it by integrating the three scripts into one, the USED memory size has crossed the 64k boundary. This includes code and data, and because of a different bug that Harold Linden is aware of (code size greater than 64k triggers a constructor fault), I've been working to keep the code under 64k (just barely at this point). Today I started getting these kinds of runtime errors: PRIMA Femme Elite v1.9 [script:body_lsl] Script run-time error not enough memory not enough memory [C] function ListInsertList [C] function ListReplaceList lsl_script function _fupdate_link_alpha lsl_script function _fchange_piece_shape lsl_script function _e0/state_entry By commenting out other code that is not used during the state_entry logic, the code runs. I'm guessing it's because there are checks in the list code called to make sure the lists are inside the 64k boundaries of days of yore. I have some skid marks in my code and what I see are these two messages before the script fault occurs: state_entry 0 used 61241 free 69831 state_entry2 1 used 66745 free 64327 The first one is the first statement in state_entry(). The second one is down a ways after I've initialized a bunch of my global variables. The third one I added to the code never runs because of the error shown above.
1
Ā·
Bug
Ā·
inĀ progress
Bug in Script Editor: Second Life Project Lua Editor 26.1.0.21525310258 (64bit)
This appears to be related to highlighting. It is also influenced by the amount of code in the script and by the amount of comment text. However, commenting out all preceding code, or turning it all into a very long string, can make the problem vanish. The affected scripts compile and run without unexpected errors, but it becomes difficult to edit certain lines within the editor: Steps to reproduce: In an SLua Enabled Sim, rez a new prim. Create a new script, open it, and replace the contents with the attached script. Note that "LLEvents" in line 14 is highlighted in green. Attempt to select the line. Observe that only the word "function" is highlighted. Copy the line and paste at the bottom of the script. Observe that the whole line is pasted. Place the cursor at the left edge of the line and move right one character at a time with the arrow keys. Observe that the characters "s.touch_e" are skipped as a group. Attempt to select or erase "_end". Depending on your method, various failures will occur. Press End to move to the end of the line. Observe that the visible cursor is well past the end of the line, but that backspace deletes the last character. Note that when the line no longer represents a proper event that the line becomes normally editable. Comment out line 12. Observe that "LLEvents" becomes blue and the line is normally editable. Reenable line 12 and delete line 13. Observe the same. So far, I have only observed this with LLEvents.touch... All 3 are affected. In-Editor WORKAROUND: When editing an affected line, change the first keyword by adding an extra character at the beginning, such as making "LLEvents" into "xLLEvents". Edit the line as needed, then remove the extra character.
3
Ā·
Bug
Ā·
needsĀ info
Load More
→