forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange GU crash

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
roby65



Joined: 01 Jun 2008
Posts: 55
Location: Mid Italy

PostPosted: Fri Feb 05, 2010 7:39 am    Post subject: Strange GU crash Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Fri Feb 05, 2010 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
roby65



Joined: 01 Jun 2008
Posts: 55
Location: Mid Italy

PostPosted: Fri Feb 05, 2010 8:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Sat Feb 06, 2010 12:55 am    Post subject: Reply with quote

going to have to post more code than that if you want an accurate answer
Back to top
View user's profile Send private message
roby65



Joined: 01 Jun 2008
Posts: 55
Location: Mid Italy

PostPosted: Sat Feb 06, 2010 1:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group