Welcome! Log In Create A New Profile

Advanced

problem with libfat version 20081205

Posted by JustWoody 
problem with libfat version 20081205
December 09, 2008 10:59PM
I just recompiled my app with the latest version of libfat (along with libogc and devkitPPC) and the app now performs a crash dump when I try to load a saved config from SD.

Here is the code of my load routine:-
bool loadConfig() {
return false;
	if(!fatInitDefault()) return false;

	FILE *fp;

	if((fp = fopen("sd:/mahjongg.cfg","rb"))==NULL) return false;

	// get the version number in case it older than current
	int version=getc(fp);

	opt_music=getc(fp);
	opt_sound=getc(fp);
	opt_layout=getc(fp);
	opt_lang=getc(fp);
	opt_rumble=getc(fp)==1?true:false;
	opt_hoverhint=getc(fp)==1?true:false;

	fclose(fp);
	
	return true;
}

Any ideas anyone? Has anyone complied with the latest libs and are not having this problem? + is the code any different?
Re: problem with libfat version 20081205
December 09, 2008 11:00PM
libfat is also giving me headaches as hell on this new release, its all bugged around.
We need to find Chishm to bug him out.
Re: problem with libfat version 20081205
December 10, 2008 10:27AM
the code seems fine to me...

I recently have trouble with the last releases (libogc+libfat+devkippc) when the gcc optimization flag was -O3
Minor changes in the code resulted in a crashdump upon startup

Reversing to -O2 fixed it, not sure if it could help you
Might be a compilation issue with the new gcc, I don't know, this is really weird



Edited 1 time(s). Last edit at 12/10/2008 10:28AM by ekeeke.
Re: problem with libfat version 20081205
December 10, 2008 03:23PM
Well the optimization flag makes no difference on my compiled files.....
Re: problem with libfat version 20081205
December 10, 2008 04:08PM
I noticed that too, I got new coredumps with my code after some modifications, even with -O2
there is no logic in that, the modifications I made does not even affect the startup code but the application still crashed on startup

That's time I somehow fixed it by recompiling the libfat sourcecode with some modifications (svpe readhead's patch) then recompile my application from scratch
I'm however pretty sure that I will get new coredumps later when I will modify/recompile my code again

so weird and so frustrating when you do not know where crash are coming from :/

what could it be : gcc ? newlib ? libfat ?



Edited 1 time(s). Last edit at 12/10/2008 04:08PM by ekeeke.
Re: problem with libfat version 20081205
December 10, 2008 04:34PM
i also get random dump's and lock up. Since last version even.....Parts of my code that didnt even executed, crash......sad.
Re: problem with libfat version 20081205
December 10, 2008 06:12PM
Update using devkitpro updater or other methods, it should be fixed by devkitpro team.
Cheers,
Scognito.
Re: problem with libfat version 20081205
December 10, 2008 06:34PM
Cheers Scognito I've downloaded the latest version of libfat 1.0.2

But now the programmers notpad is not loading so I can't test it! Anyone come across problems with the programmers notpad? + does anyone know where to send the dumps?
Re: problem with libfat version 20081205
December 10, 2008 06:56PM
thanks for the notice
Re: problem with libfat version 20081205
December 10, 2008 07:36PM
when people find bugs like these, i suggest you to fill the bug tracker on sourceforge, like i did =]
[sourceforge.net]
Re: problem with libfat version 20081205
December 10, 2008 08:01PM
I uninstalled and reinstalled devkitpro and now the programmers notepad is working again and I've tested with the new libfat and all is working again.

Cheers for the prompt work on the devs for the fix.
Sorry, only registered users may post in this forum.

Click here to login