GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2009-Jun-10

Title: Problem at execute a apllication for second time on WIZ
Post by: mentalthink on 2009-Jun-10
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.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Kitty Hello on 2009-Jun-10
Oh. I have to see why this is so and try to patch it.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: mentalthink on 2009-Jun-10
Thanks Kitty.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Ian Price on 2009-Jun-10
I can confrim that this is indeed true.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: snurty on 2009-Jun-11
It also seems to apply to GP2X
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: hoessi666 on 2009-Jun-12
Yeah, this is strange. Happens even if you have started another program in the meantime...
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: dejunai on 2009-Jun-15
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
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: 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.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: dejunai on 2009-Jun-15
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
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Kitty Hello on 2009-Jun-15
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
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: dejunai on 2009-Jun-15
I look forward to the update :)
-DEJ
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Kitty Hello on 2009-Jun-22
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.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Ian Price on 2009-Jun-22
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.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: hoessi666 on 2009-Jun-22
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...
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Kitty Hello on 2009-Jun-22
Does it work a 2nd time then?
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Ian Price on 2009-Jun-22
QuoteYou can exit once and then restart, but exiting again freezes the app (and Wiz).

The game will execute a second time, but then hangs when you try to exit again, and will not return to any Wiz menus,even with VOL +/- You have to turn the Wiz off.
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: hoessi666 on 2009-Jun-22
Quote from: hoessi666 on 2009-Jun-22
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...
Quote from: Kitty Hello on 2009-Jun-22
Does it work a 2nd time then?

It works a 2nd time but freezes while trying to exit again...
Title: Re: Problem at execute a apllication for second time on WIZ
Post by: Kitty Hello on 2009-Jun-22
OK. I'll see if I can fix it with a script file.