PDA

View Full Version : Random PSP shutdowns during running of lua scripts --



Emeriastone
November 6th, 2006, 17:00
Hey all, I have a problem. During running of one script in particular, my psp will go black, shut off. I recieve no error messages and cannot discover for the life of me why this is happening.

The following is an excerpt of the script in question. This same sequence of script repeats 7 times to show multiple frames, and the random shutdowns occur from sequence 4 to 6. For example this is sequence 3 and all the sequences are identical except for specifics, filenames, etc.



...

Frame3 = Image.load("intro/intro3.jpg")

empty = 255
fadercolor = Color.new(0,0,0,empty)
trans:clear(fadercolor)

while true do
screen:clear()

screen:blit(0,0,Frame3)
screen:blit(0,0,trans)
if empty > 0 then
empty = empty - 5
else
break
end

fadercolor = Color.new(0,0,0,empty)
trans:clear(fadercolor)
screen.waitVblankStart()
screen.flip()
end
seagull:play()
screen.waitVblankStart(630)
while true do
screen:clear()
screen:blit(0,0,Frame3)
screen:blit(0,0,trans)
if empty < 255 then
empty = empty + 5
else
break
end

fadercolor = Color.new(0,0,0,empty)
trans:clear(fadercolor)
screen.waitVblankStart()
screen.flip()
end

...


Again, I've tried isolating the problem, breaking each sequence up into parts and testing them for errors, still it seems that these shutdowns are random.

Any help would be greatly appreciated.

Emeriastone

Apoklepz
November 6th, 2006, 17:10
Wow...that's frikkin weird...I'll look into this soon enough and let you know what happens on mine.

BTW, what version of lua are ya running on your 1.50 DAX custom fw?

Emeriastone
November 6th, 2006, 17:20
lua v0.20 I believe

Apoklepz
November 6th, 2006, 17:32
Ok, have you tried runnind the same script on luaplayer ver. 0.16 before?

BTW, I'm gonna test the script right now on my 0.16 lua...looks like I only need an image in there (intro3.jpg)along with the script, am I right? If so, I'll just create one and name it accordingly...you don't need to post it up. I'll post back in a sec.

Emeriastone
November 6th, 2006, 18:12
No I haven't. Got a link to an old version of lua?

yaustar
November 6th, 2006, 18:54
How you tried running it on LuaPlayer windows version? Does it give the same random shutdown?

Emeriastone
November 6th, 2006, 20:38
Luaplayer windows has problems rendering this because of the fade rendering, I can see each transition through a flicker, but as far as I know it runs completely though the script without error.

I can relate the random shut down like this: if it was the script's problem, it would shut my computer off when running it in LuaPlayer windows (or cause my computer to bluescreen, restart). But since it doesn't, since it doesn't shutdown LuaPlayer for windows, I'm guessing one of the following is the culprit:

LuaPlayer v0.20 for psp (I will try v0.16 next)
My PSP can't handle the fade-in/fade-out effects 5 to 6 to 7 times in a row
Lua doesn't like me


Update:


v0.20 was causing random shutdowns.
v0.16 for some reason works better than v0.20. It renders the fade effects faster too. Can someone explain to me why this version is better?

drEDN4wt
November 7th, 2006, 21:17
are you running out of memory?

have it show your free memory while running.

NoQuarter
November 7th, 2006, 22:06
Running out of memory shouldn't cause a shutdown with luaplayer,I think.

Zion
November 7th, 2006, 22:29
That would be a memory issue, i experienced the same thing in coding in the faded cut scenes for linkens quest until i found a better way of dealing with the issue.

Rather than loading one image after another, i made it replace the currently loaded image with the next one, therfor removing the memory issue :D

Hope that helps