sdl standby problem

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
pensoffsky
Posts: 8
Joined: Sun Nov 13, 2005 7:23 am

sdl standby problem

Post by pensoffsky »

hi,
i've written a program for the psp using the sdl library.
everything works fine except for one detail,

when the program is running i put the psp to sleep (powerbutton),
wake it up again, then the programm is running but it crashes after a short while with a bluescreen,

Exception - Adress load/inst fetch
EPC - 0895f950
Cause - 00000010
...

i identified the "offending routine" using psp-addr2line:
../newlib/libc/machine/mips/memcpy.c:72


i am using pspsdk, sdl 1.2.7?, sdl-image

thanks in advance!
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

When you suspend the PSP, the kernel closes all open file handles. It does not reopen them. Chances are your program was reading from a closed file which caused an exception somewhere else in your program.

A solution to this problem is to install your own power callback that can handle suspend events. I think there's sample code in PSPSDK that shows how to use it.
pensoffsky
Posts: 8
Joined: Sun Nov 13, 2005 7:23 am

Post by pensoffsky »

thx
Post Reply