Problem at execute a apllication for second time on WIZ

Previous topic - Next topic

mentalthink

Hi, a llitle problem, again in the WIZ, is about when executes a game/aplication for second time in WIZ, maded whit GLBASIC

When you run for first time the aplication you can exit of it without problems.

But if you exit of aplication and turn again to run the same aplication/game, when you can exit the screen appears frreze, and the console turn  locked.

This problem not only affect to me,to another people too.

Thanks, again.

Kitty Hello

Oh. I have to see why this is so and try to patch it.

mentalthink


Ian Price

I came. I saw. I played.

snurty


hoessi666

Yeah, this is strange. Happens even if you have started another program in the meantime...

dejunai

Uh, this needs to be fixed...
Kinda upsets development...
But really upsets publishing.
Endusers wont like reseting Wiz to use the app.
Any progress?
-DEJ

Kitty Hello

It's very strange. I end the program with "execl("gp2xmenu.gpe", "gp2xmenu.gpe");
This works nice the first time, but the 2nd time it locks somehting up. I'm tracing it, but it's very very strange.

dejunai

Quote from: Kitty Hello on 2009-Jun-15
It's very strange. I end the program with "execl("gp2xmenu.gpe", "gp2xmenu.gpe");
This works nice the first time, but the 2nd time it locks somehting up. I'm tracing it, but it's very very strange.

uh, well, er,
I'd appreciate if you DIDN"T end the program like that.
cause I end the program like that...
AND.. I also test for a GPU in the same currentdir so if the app is launched from a script,
the app returns to the script. Returning to the SYSTEM menu is a bad idea, cause I think
a number of endusers will ultimately use a different "GUI".

Perhaps a WIZMENU$() can be set in the program. TRUE to exit to the system menu.
FALSE to return to the calling script, or simply hang on bad code.

Good Luck finding the bug, and please consider my request.
-DEJ

Kitty Hello

No need. I'm doing this at the end:

Code (glbasic) Select

#if defined(GP2X) || defined(GPHWIZ)
// sync the written data to the disk
system("sync");

DGStr exepath;
GFFileSystem::GetExePath(exepath.getbuffer(1024));
exepath.releasebuffer();
for(long ee = (long)strlen(exepath.c_str()); ee>0; ee--)
{if (exepath.c_str()[ee]== '/' || exepath.c_str()[ee]== '\\')
{exepath.left(ee); break;}
}
GFFileSystem::SetCurrentDir(exepath.c_str());

if(GFFileSystem::DoesFileExist("gp2xmenu.gpe"))
execl("gp2xmenu.pge","gp2xmenu.gpe",NULL);
if(GFFileSystem::DoesFileExist("gp2xmenu.gpu"))
execl("gp2xmenu.pgu","gp2xmenu.gpu",NULL);
if(GFFileSystem::DoesFileExist("gp2xmenu"))
execl("gp2xmenu","gp2xmenu",NULL);

chdir("/usr/gp2x");
execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);
#endif

dejunai


Kitty Hello

It seems that when you end the program with exiting from the main loop, it works. I think "END" will work, too. I think it's related to holding the Vol+/Vol- buttons to exit.
Can someone confirm this?
At least running out of the main function worked perfectly for me.

Ian Price

Um no. I NEVER exit by using the Vol +/- buttons.

My B'lox! game exits the via the main menu. You can exit once and then restart, but exiting again freezes the app (and Wiz). Volume controls are not used to exit.
I came. I saw. I played.

hoessi666

My TetWiz-Game exits from the Main-Prog (ie. not in a Function) via the End-Command. No use of the Vol-Keys to exit here...

Kitty Hello