| View previous topic :: View next topic |
| Author |
Message |
roby65
Joined: 01 Jun 2008 Posts: 55 Location: Mid Italy
|
Posted: Fri Feb 05, 2010 7:39 am Post subject: Strange GU crash |
|
|
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: |
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. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri Feb 05, 2010 8:44 pm Post subject: |
|
|
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 _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
roby65
Joined: 01 Jun 2008 Posts: 55 Location: Mid Italy
|
Posted: Fri Feb 05, 2010 8:51 pm Post subject: |
|
|
| 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.... |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Sat Feb 06, 2010 12:55 am Post subject: |
|
|
| going to have to post more code than that if you want an accurate answer |
|
| Back to top |
|
 |
roby65
Joined: 01 Jun 2008 Posts: 55 Location: Mid Italy
|
Posted: Sat Feb 06, 2010 1:57 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|