psyic
New Member
Posts: 20
|
Post by psyic on Oct 29, 2005 22:44:31 GMT -5
I created a lua script which did nothing more than displayed a number, subtracted 1, then displayed it again (a basic timer). Upon loading and unloading the script about 5 times, an error sound played, the game was ok for a few seconds (albeit unfocused), then died. I had to terminate the process from Taskman to even get out of it.
Second time opening the game, I attempted to load the same script, and the same effect: it crashed and burned. Ended the process from Taskman.
Third attempt was a tad smoother. I was able to load Goblins.lua, then unload it. Then I loaded the test script fine. I then tried to consta load and unload again (very quickly too, I was almost going to macro "/con .Lunar load test.lua") and it once again unfocused and error noised.
About this time I started posting this message, and the game was fine again. A few loads and unloads again and there was a game error and pol exited (didn't lock though.)
I shall keep trying to determine a constant way to reproduce this error.
|
|
psyic
New Member
Posts: 20
|
Post by psyic on Oct 29, 2005 22:47:51 GMT -5
Did it again, i'll try rebooting next. The interesting thing about this error is that only after you re-focus the window to FF does it lock up.
|
|
|
Post by TinyTerror on Oct 29, 2005 22:54:16 GMT -5
I wouldn't recomend making scripts that are deisnged to load and unlad really fast until the lunar core is alot more solid. Most of the instability that occurs in lunar is in the loading/unloading code. It's one of the areas where I am trying to improve reliability as I work through builds. Might I suggest looking into passing commands? You could have the script stay loaded, but idle until a command comes in. Then again, the command code hasn't been thouroughly tested either Ahh the joy of being a one man dev team. I should quit my job and work on lunar 24x7! Post or PM me the script you are trying having the trouble with, and I'll see if I can replicate the error. I would love to get the scriptloaders a little bit cleaner for the next release.
|
|
|
Post by TinyTerror on Oct 29, 2005 22:59:00 GMT -5
Did it again, i'll try rebooting next. The interesting thing about this error is that only after you re-focus the window to FF does it lock up. Thats just the way it seems. Whats happeing is that lunar is causing a runtime error in the thread where the windower runs. This causes parts of the game to lock up one by one. Refocusing the window only makes it happen faster. I'll put in some time tomorrow on the scriptloader code. Right now its pretty rough on threads, killing them in a sloppy way. I'll move the manual kill routine over to the new execution hook method. It asks a script nicely to shutdown insted of clubbing it like a baby seal
|
|
psyic
New Member
Posts: 20
|
Post by psyic on Oct 29, 2005 23:00:23 GMT -5
Well, the purpose of this script wasn't to do anything (just yet), but just to *try* to create errors by loading and unloading to examine the effects. I'm just still confused about that unfocusing thing. And yes! You should quit and do lunar 24x7. I'm sure you could get the general FFXI player base who uses windower plugins to raise a year of your salery. Hell, if the writer of Something Positive did it, i'm sure you can
|
|
psyic
New Member
Posts: 20
|
Post by psyic on Oct 29, 2005 23:02:23 GMT -5
It asks a script nicely to shutdown insted of clubbing it like a baby seal Lunar-fur coats anyone?
|
|
|
Post by TinyTerror on Oct 29, 2005 23:02:47 GMT -5
Well, the purpose of this script wasn't to do anything (just yet), but just to *try* to create errors by loading and unloading to examine the effects. Well, you did what you were trying to do didn't you?
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Oct 30, 2005 3:07:22 GMT -5
was playing with this in port and my fps would drop to -10 anytime a ship came in or alot of people ran by. i went to leave the pier and my fps would drop to 0 when i moved the camra when i tried to unload the script pol crashed no error or hang just gone. here's the script
MyText=Graphics.text_CreateObject() Graphics.text_SetColor(255,255,255,255,MyText) Graphics.text_SetPosition(100,100,MyText) Graphics.text_SetFont("Arial",10,MyText) Graphics.text_SetVisibility(1,MyText)
while true do
HPP=FFXI.target_GetHPPercent() Status=FFXI.player_GetStatus()
if Status==50 or Status==38 then Fishing=1 else Fishing=0 end
if Status==38 then FishOn=1 else FishOn=0 end
Output=string.format("HP Percent: %i\r\n Status: %i\r\n Fishing: %i\r\n FishOnline: %i\r\n",HPP,Status,Fishing,FishOn)
Graphics.text_SetText(Output,MyText)
end
|
|
|
Post by TinyTerror on Oct 30, 2005 12:00:20 GMT -5
This happens because you are running a unrestricted loop. Add a Windower.script_Sleep(10) at the end of your loop and see if that fixes it. If you don't regulat your loops, lua will try to use 100% of your CPU to spin the loop as fast as possible. This isn't a bug in lunar or in lua. Its a behavior that effects every programming language ever created. You have to make your scripts play nice with FFXI, since FFXI relies so much on the CPU as opposed to the video card.
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Oct 31, 2005 21:22:03 GMT -5
If you add Windower.script_SetName("Fish Fighter") Windower.script_SetVersion("0.10 ALPHA") Windower.script_SetAuthor("RZN") Lunar is unable to unload the script
|
|
|
Post by TinyTerror on Oct 31, 2005 21:48:16 GMT -5
I'll check those commands out. The stuff in the windower library is the oldest, and the most unstable of the library code. It needs to be redone
|
|
|
Post by TinyTerror on Nov 1, 2005 11:41:07 GMT -5
This should be resolved in tonight's build.
|
|