trouble to launch code

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

Moderators: cheriff, TyRaNiD

Post Reply
quadrizo
Posts: 21
Joined: Thu Aug 23, 2007 10:21 pm

trouble to launch code

Post by quadrizo »

Hi

i have a big trouble ... i code in C/C++, compil on cygwin and test and debug via usbhost and psplink (thanks tyranid ;)very usefull staff ) and all is ok (the game woks no bus error or exception)
but when i make a package ( make EBOOT.PBP) and i install them in PSP/GAME150/ and try to launch it ...trouble!!!... sometimes nothing is done : the psp spashscreen and a black screen after (need to hard reboot...) or few instructructions are launch and freeze ...(need to hard reboot...)

i don't think it's a installation trouble cause when i remove 99% of the code (a basic main and some macro :MODULE_info,....:) ) eboots works well ....
What is the difference beetwen a launch via psplink and directly in the XMB? memory ? thread? user kernel mode ?

how i can do to know why and where it's coming from ?

thanks all

Edit:
Any ideas ?
What exactly append beetwen the .elf and .pbp creation ?
quadrizo
Posts: 21
Joined: Thu Aug 23, 2007 10:21 pm

Post by quadrizo »

really no idea ??
tyranid ?
AllSystemGo
Posts: 26
Joined: Sat Jun 02, 2007 1:15 am

Post by AllSystemGo »

Can you post some of your code??? BTW are you loading picture, image or sounds?? Maybe they are not in the correct folder!!

Please post some code I'll try to help you!

Cheers
quadrizo
Posts: 21
Joined: Thu Aug 23, 2007 10:21 pm

Post by quadrizo »

so i have succeed to make in place a exception handler before it crashs, so it appears that it's a problem with the function realloc when i charge the second texture (a .png charged in memory with libpng) with glTexture2d ...

Code: Select all

	Image *tex=loadImage(filename);
	if (tex==NULL)
		return NULL;
	glEnable(GL_TEXTURE_2D);
	glGenTextures(1, &tex->Name);
	glPixelStorei(GL_PACK_ALIGNMENT,1);
	glPixelStorei(GL_UNPACK_ALIGNMENT,1);
	glBindTexture(GL_TEXTURE_2D, tex->Name);	
	glTexImage2D(GL_TEXTURE_2D,0,4,
		tex->textureWidth,tex->textureHeight,0,GL_RGBA,GL_UNSIGNED_BYTE,tex->data); 

loadImage is the Lua function so without bugs normally ;) data are a pow of 2, aligned, under 512x512 ... i don't understand why glTexture2d can make a call to realloc with trouble ....

but i could always not explain why this bug appear in xmb mode and not with psplink ...
Post Reply