Welcome! Log In Create A New Profile

Advanced

Crash of App upon exit.

Posted by sorg 
Crash of App upon exit.
September 06, 2010 03:21AM
Looks like there is some kind of "bug" in libogc.
If application didn't call VIDEO_Init() then it will crash upon exit.
libogc uses video functions while shutting down which produces crash.
Re: Crash of App upon exit.
September 07, 2010 05:12AM
i have plenty of apps that dont use any video functions that dont crash on exit. are you saying that if you create a program
main() { exit( 0 ); }
that this will crash?

it works fine for me
Re: Crash of App upon exit.
September 10, 2010 06:48AM
well, launching app from HBC won't produce this bug.

I have this bug when i launch from my loader.
You may tell "Ahh.. that's because your loader!", but it's not quite correct.
I suspect, it related to how loader organize its data before launch the app.
I remember, there is a space for copy of GX registers defined by gcc linker. Probably, if two consecutive apps are using the same place for this copy then bug won't happen. However, my launcher uses custom LD script to allocate other areas for some sections. In this case, launched app may get garbage in some areas. And without VIDEO_Init shutdown code of libogc crashes.

May be i can fix this bug from loader side by ressembling environment close to HBC, but it's not correct anyway.
Launched application shouldn't depend on launcher.
Future libogc versions could integrate VIDEO_Init() into initialization code (CRT?). So, at least apps won't be depend on each other.
Sorry, only registered users may post in this forum.

Click here to login