Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Game Launcher Hang situation (solved)  (Read 3520 times)

0 Members and 1 Guest are viewing this topic.

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Game Launcher Hang situation (solved)
« on: March 01, 2008, 11:01:56 am »
Hi All,
been banging my head :banghead: so I thought maybe someone could point out my obvious mistake

I have gamelauncher running fine as a front end for Mame and for several pc games.
The problem is that for some PC games (ChoRenSha or Duke Nukem for example) when I exit the game, the screen blanks and gamelauncher hangs.

Symptoms include:
Before the screen blanks I see ChoRenSha appear to iconify or minimize...then black screen.
At that point CtlAltDel to Taskmanager shows gamelauncher v0.9.8-pre1 Not Responding
there is a c:\winnt\system32\cmd.exe which is running (if I kill this process from task manager I get back to gamelauncher but gamelauncher won't start additional games)

Occasionally when this happens I can find messages in the gamelauncher log which say "Unable to switch video mode"

I am running windows 2000 on a laptop in 800x600 on the VGA out

I found this old thread and it sounds similar but not the same (I can't switch using alt tab to help work around as suggested here)
http://forum.arcadecontrols.com/index.php?topic=1207.0

Any help greatly appreciated
« Last Edit: March 12, 2008, 10:40:19 pm by mazzmn »

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation
« Reply #1 on: March 05, 2008, 05:52:59 am »
Hello Mazzmn..
I had this same problem while trying to run a program I made from Glaunch.
I found that you had to kill glaunch first, then restart Glaunch after your program ends.
Here is how I did it:

I take it you are running your pc games from glaunch's misc folder.
In glaunch/config folder, edit misc.cfg to this:

If these two lines are not in misc.cfg, add them, if they are there, make sure they read like this: (without the quote marks)

"pre_command = taskkill /f /im glaunch.exe"
"post_command = start/w c:\glaunch\glaunch"

These two lines need to go right after the "global_options =" line.
The pre command kills glaunch.
The post command runs it again after your pc game quits.
The path in your post command line needs to be the path to glaunch.exe that is on your computer.
This will work if you are using winxp.
if you are using win95 or 98 you will probably need to download a program called process.exe.
This is a utility to kill programs in early editions of windows.
If you are using dos, the taskill /f /im might work, im not sure. I may have to do a little research on it.
Let me know if you need more help.

Here is a forum for Glaunch that may help you:

http://sourceforge.net/mailarchive/forum.php?forum_name=glaunch-public

If you are using Glaunch on a windows machine, you might want to check out my menumaker for glaunch.

http://skennys_outpost.tripod.com/MenuMaker.html

This is a favorites list maker for glaunch. Only works with windows and mame.

Good luck..
--Ken

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation
« Reply #2 on: March 05, 2008, 11:47:33 pm »
Thanks for the pointers Man

I am running this on windows/2000 so I had to search around for a taskkill substitute...the first thing I found was the process command from beyondlogic.org
http://www.beyondlogic.org/solutions/processutil/processutil.htm
This does kill gamelauncher but then I have to Ctl c out of it before gamelauncher restarts....so getting close...I will have to play around some more...possibly try pskill instead of this command

Also I plan to try your menu creation program, I was looking for something like that !!   :)

gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: Game Launcher Hang situation
« Reply #3 on: March 06, 2008, 01:14:52 am »
Can you launch any program with the pre and post commands? If so
why not use Autoit? You can make a small script and then convert it into an .exe

The first script (pre_command) would go something like this
Code: [Select]
ProcessClose("gamelauncher.exe")
The 2nd script would go something like this
Code: [Select]
Run("C:\gamelauncher\gamelauncher.exe")

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation
« Reply #4 on: March 11, 2008, 05:42:06 pm »
Using the pre and post commands should run any bat or exe file, as far as I know.
There could be a problem of the game starting before the pre command ends, unless you use start /w in the pre command line.

I may have to try this...

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation
« Reply #5 on: March 12, 2008, 12:02:45 am »
Sorry guys, I was gone for the weekend.
I did get to try this out a bit before I left, but only now did I get a working solution

I started out as suggested with a Pre_command who's duty it was to kill the glaunch.exe, it would start my program, but I couldn't get the post command to re start glaunch. (I suspect the post command never gets to run because the precommand kills glaunch before it can call the post command)

So now I have two a post_command entries, one that kills the glaunch.exe and another that starts glauncher...like this:

post_command = c:\gamelauncher\config\noglaunch.au3
post_command = start /w "c:\gamelauncher\config\startglaunch.bat"

noglaunch.au3 simply contains
ProcessClose("glaunch.exe")

startglaunch.bat was necessary because it seemed I needed to be in the glaunch directory to start glaunch...so it contains simply:

cd "c:\gamelauncher"
glaunch.exe

I don't know yet if this is too convoluted of a solution, but hey at least it works!!

thanks for all the good advice folks!

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation
« Reply #6 on: March 12, 2008, 09:02:51 am »
Hey what ever works for you..
Im glad you got it figured out.
In my case (winxp and win98), using one pre command worked (I had to use process.exe to terminate glaunch in my win98 machine), I never thought about using autoit. thats a good idea.
On my post command simply typing the full path after the start worked on both machines.
post command =start c:\glaunch\glaunch.exe
I know glaunch is very picky about being started in its home directory.
I wonder if two post commands would work?
post command = cd\glaunch
post command = start glaunch.exe

Oh well, stuff like this is what makes it really hard for programmers. What works fine on one OS or even one computer setup may not work on the next OS or computer setup.

Thanks for sharing this info.
If you are going to use menumaker for glaunch you will probably need the same setup.
Also take a look at The Launcher, it may interest you.
Running The launcher will require yet another step. Not really that bad though.
Feel free to contact me if you need help.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation
« Reply #7 on: March 12, 2008, 09:30:57 am »
I just tried some test with my glaunch mame.cfg.
looks like it is only processing the first post_command and the first pre_command lines.
Any other lines I add are ignored.
After studying your setup, I think glaunch is not being killed in your first pre command.
You can test this buy running a mame game from glaunch then use ctrl+Alt+del to bring up your task manager.
See if you have two gl_32 programs running in the processes.
If you do, this is not a good thing.
Since I can only get one post command to work on mine, it appears that you may be killing the one glaunch in the foreground with that first post_command.
This is very interesting. Please keep us posted if you try anything.
You can still go with process.exe. its as simple as using the dos command, after you place process.exe in the misc folder.

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation
« Reply #8 on: March 12, 2008, 08:35:10 pm »
looks like it is only processing the first post_command and the first pre_command lines.
 

Well, it looks like you should change your tag line to simply DaMan cause You Da Man :-)
I agree, 2 post_commands doesn't work....I'm still stuck however
I changed things to
pre_command = c:\gamelauncher\config\noglaunch.au3
post_command = c:\gamelauncher\config\startglaunch.bat

This manages to kill the gamelauncher while starting the selected game (tested using Taskmanager as you suggested)
But it won't restart gamelauncher...when I exit the game I see a blank dos box c:\winnt\system32\cmd.exe in the title

An interesting side note is that if I turn debug on in the glaunch.cfg file, then the post_command runs as expected and restarts glaunch ...weird

I guess I will dig around the glaunch forum a bit, but thought I would post here for other ideas (I suspect this is all due to the fact I am running Win2000 instead of XP)

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation
« Reply #9 on: March 12, 2008, 09:10:00 pm »
Thanks for the comment..

Try this:
pre_command=start /w c:\gamelauncher\config\noglaunch.au3
post_command =start c:\gamelaucher\glaunch.exe

You may have to change the start /w command to start /wait
(seems to me like it had to be wait in win98)

Also, make sure your au3 file is actually shutting down glaunch.
PM me if you want the process.exe, I can send it to you if youd like to try that.

You can put the process.exe file in your gamelauncher\config folder
The pre command you would use would be
pre_command = start /w (or wait) process.exe -k glaunch.exe

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation
« Reply #10 on: March 12, 2008, 09:37:29 pm »
Ah Ha, the program that starts my game is a bat file that I wrote...
I think I found the enemy and he is us....
the last statement in my bat file was "exit"  works much better when I remove that line

I'm going to reboot and test again (last night I thought I had things working too :-) )

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation
« Reply #11 on: March 12, 2008, 10:19:04 pm »
seems to work, thx for the help

MazzMn

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:March 19, 2013, 12:38:19 am
  • chicken, fight like a robot
    • The IceBox Oak Cocktail Table
Re: Game Launcher Hang situation (solved)
« Reply #12 on: March 12, 2008, 10:42:09 pm »
P.S. I tried out MenuMaker for GLaunch and it works like a charm. I used it to create a Fav list...thanks! I'm doing a presentation on mame and will include a pointer to this handy tool

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Game Launcher Hang situation (solved)
« Reply #13 on: March 13, 2008, 05:35:03 pm »
Thats good, Im glad you liked MenuMaker.
It turned out pretty good, except it only works with mame.
I have been putting off re-doing it to work with other emuls.
Maybe that will be next project after I get over this rotating monitor gig Im on now..
 :angel: