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 

Problems with newer toolchains

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



Joined: 20 Nov 2008
Posts: 8

PostPosted: Thu Nov 20, 2008 9:23 am    Post subject: Problems with newer toolchains Reply with quote

Hi,

I've been working on this game for a while now:

http://forums.qj.net/showthread.php?t=143471&page=3&highlight=sabacc

With the most recent toolchain (svn 2446), I can no longer build a version without it crashing on the PSP.

I get at varying points an error regarding the threaded malloc (mallocr).

I don't do anything with threads other than that needed for starting the app (and in fact the 1.50 version I let SDL set it up for me). A build for any firmware version crashes. The 1.50 version gives me the following in a psp-gdb backtrace:

#0 _malloc_r (reent_ptr=0x8c9cba8, bytes=<value optimized out>)
at ../../../../../newlib/libc/stdlib/mallocr.c:2376
#1 0x08a04a7c in SDL_AllocBlitMap () at SDL_pixels.c:521
#2 0x08a01f50 in SDL_CreateRGBSurface (flags=<value optimized out>, width=64,
height=64, depth=32, Rmask=255, Gmask=65280, Bmask=16711680,
Amask=4278190080) at SDL_surface.c:147
#3 0x08a28600 in IMG_LoadPNG_RW (src=0x90782e0) at IMG_png.c:219
#4 0x08a25484 in IMG_LoadTyped_RW (src=0x90782e0, freesrc=1, type=0x0)
at IMG.c:135

and

#0 _malloc_r (reent_ptr=0x8c9cba8, bytes=<value optimized out>)
at ../../../../../newlib/libc/stdlib/mallocr.c:2376
#1 0x089ba3a4 in FT_Alloc (memory=0x8c9cba8, size=147443656, P=0x88fea9c)
at /home/anthony/src/psplibraries/build/freetype/src/base/ftutil.c:59
#2 0x089bb090 in FT_Add_Module (library=0x9a12e10, clazz=0x8b08280)
at /home/anthony/src/psplibraries/build/freetype/src/base/ftobjs.c:2739
#3 0x089b5288 in FT_Add_Default_Modules (library=0x9a12e10)
at /home/anthony/src/psplibraries/build/freetype/src/base/ftinit.c:92
#4 0x089b5310 in FT_Init_FreeType (alibrary=0x903cc70)
at /home/anthony/src/psplibraries/build/freetype/src/base/ftinit.c:133

Neither of these involve my own code, and this is when the program first starts, with apparently sufficient free memory available. Each time the program is run, the error is from a different point, two examples shown above.

Any suggestions greatly appreciated,
Anthony
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Nov 25, 2008 6:18 am    Post subject: Reply with quote

From that thread, it sounds like you've had issues with memory corruption from the start... malloc could certainly crash if its data structures get screwed up.
Back to top
View user's profile Send private message
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