Strange GU crash

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

Moderators: cheriff, TyRaNiD

Post Reply
roby65
Posts: 52
Joined: Sun Jun 01, 2008 9:12 pm
Location: Mid Italy
Contact:

Strange GU crash

Post by roby65 »

Hi guys, i have a REAL strange thing with GU and intrafont.

In practise, if i initialize the GU and render the scene in the main() function, then it's all ok (i can see the text of intrafont).
But if i put the render code in another function, for example:

Code: Select all

while(1)
{
Platform_Graphic_StartDraw();
font->DisplayText(100,100,"Hello world!!");
Platform_Graphic_EndDraw();
}
it just crashes before rendering anything.
The strange thing is that, meanly, the code is the same, just in a function.
I can't understand why it crashes!

PS:The "Font" is a class that when is created initialises intrafont.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Does adding a sleep to the loop help? You'll need to yield to the other threads or the watchdog will reset the psp.

Jim
roby65
Posts: 52
Joined: Sun Jun 01, 2008 9:12 pm
Location: Mid Italy
Contact:

Post by roby65 »

Jim wrote:Does adding a sleep to the loop help? You'll need to yield to the other threads or the watchdog will reset the psp.

Jim
It doesn't.
It crashes almost istantly, after 3-4 seconds, without showing nothing.
A strange thing, is that also the printf doesn't show. (There are some printf in the init of intrafont)

edit:
Maybe is something with the buffers?
Maybe it tryes to render to a non valid buffer?
I dunno why of the crash....
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

going to have to post more code than that if you want an accurate answer
roby65
Posts: 52
Joined: Sun Jun 01, 2008 9:12 pm
Location: Mid Italy
Contact:

Post by roby65 »

Maybe there is something with the printf?
I saw in another tutorial this:

pspDebugScreenSetOffset((int)fbp0);

I never use it, maybe this leads to a crash? (using printf on an old buffer?)

edit:
including pspgum.h in the main.cpp solved the problem. O_O
Post Reply