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: MAMEWah crashing isolation - Win7 (probably win8 too)  (Read 1919 times)

0 Members and 1 Guest are viewing this topic.

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
MAMEWah crashing isolation - Win7 (probably win8 too)
« on: November 29, 2014, 01:55:17 pm »
I've isolated the Win 7 Mamewah crash. The combination that causes problems for me is:
1. Mamewah
2. Mame
3. LCDBlinky configured for my servostik

In particular when Mamewah tries to launch a "pre_emulator_app_commandlines", Mamewah crashes, brings down the operating system and worse - wipes the mamewah config files!
I can reproduce this regularly.

I debugged the code a bit. It's been a while since I did that though. The problem seems to be when the lcdblinky executable is launched. I forget which call type that is but here are the two suspect lines of code:
Shell vstrCommandline, lngShellFlags
lngReturnVal = CreateProcessA(vbNullString, vstrCommandline, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, vbNullString, start, proc)

One of these crashes reliably. I believe mame uses CreateProcessA (because it's meant to wait). But LCDBlinky probably used Shell because it's meant to fire and forget.

My suspicion is that the need to copy windows system files from other machines is the reason for the crash. There are various system files that different people suggest copying. Among others:
dx8vb.dll
dx7vb.dll
and more.

Shell the function appears to come from the visual basic runtime library. So perhaps Shell is broken in Visual Basic on Windows 7. Some googling found this article. But no solution, and I've tried changing the compatibility modes to no avail.

Unfortunately I've moved onto Hyperspin - which I'm not really enjoying. I would like to go back to Mamewah, it was so much simpler. If I find the time I might try downgrading to Windows XP 64bit. But my computer shipped with Windows 8 and even in 7 a lot of features like wifi don't work (no drivers) - so I suspect things might be non workable in XP.
Thanks,
Joseph Elwell.

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: MAMEWah crashing isolation - Win7 (probably win8 too)
« Reply #1 on: November 29, 2014, 06:14:29 pm »
Quote from: jelwell
If I find the time I might try downgrading to Windows XP 64bit.
something to note perhaps:
http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=334590

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: MAMEWah crashing isolation - Win7 (probably win8 too)
« Reply #2 on: December 01, 2014, 10:42:16 am »
I should point out that to debug the code I had to compile it on Windows XP, after adding a slew of extra print logging statements. Then I ran it on my Win 7 box. I'll try to upload my configuration files soon, so people can reproduce. Not a trivial task since my arcade isn't on a network...
Joseph Elwell.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAMEWah crashing isolation - Win7 (probably win8 too)
« Reply #3 on: December 03, 2014, 08:17:29 am »
Do you mean LEDBlinky?

I use the Ultimarc JoyTray application for my ServoStiks - is there a reason you don't use that?

I recently tried LEDBlinky for some LED animations and it kept crashing soon after launch (Win XP). I assume you've got LEDBlinky running independently ok?

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: MAMEWah crashing isolation - Win7 (probably win8 too)
« Reply #4 on: December 03, 2014, 11:47:10 pm »
Do you mean LEDBlinky?

I use the Ultimarc JoyTray application for my ServoStiks - is there a reason you don't use that?

I recently tried LEDBlinky for some LED animations and it kept crashing soon after launch (Win XP). I assume you've got LEDBlinky running independently ok?
I do mean LEDBlinky, that was a combination of autocorrect and me only fixing half the correction. ;)
I do have LEDBlinky working independently.

I believe the last time I investigated JoyTray the xml format for identifying joysticks in mame has changed since the excellent Mamewah that you wrote was written... I did a search, yep:
http://forum.arcadecontrols.com/index.php/topic,132629.msg1377789.html#msg1377789

Are you running JoyTray as a pre_emulator_app_commandlines on Windows 7/8 or XP? I would have thought I'd bother to debug whether calling ANY program would exhibit this crash, but perhaps I overlooked that.

I would love a fix for the xml format change if you're running Mamewah with Windows7, I haven't gotten around to trying to fix it myself since LCDBlinky works - sort of. And the way the code looks I don't suspect that the program I'm calling is the issue, unless maybe it's barfing because of the retval.
Joseph Elwell.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAMEWah crashing isolation - Win7 (probably win8 too)
« Reply #5 on: December 05, 2014, 09:52:08 am »
I believe the last time I investigated JoyTray the xml format for identifying joysticks in mame has changed since the excellent Mamewah that you wrote was written... I did a search, yep:
http://forum.arcadecontrols.com/index.php/topic,132629.msg1377789.html#msg1377789

Ok makes sense what you are doing then, I had forgot all about that problem!

Quote
Are you running JoyTray as a pre_emulator_app_commandlines on Windows 7/8 or XP? I would have thought I'd bother to debug whether calling ANY program would exhibit this crash, but perhaps I overlooked that.

Sorry I'm using WinXP. I basically agree with you that in theory any program will probably crash, but I think it is still worth trying other programs (even say notepad.exe just to see what happens).

Also, I forget exactly why 'Shell' is used as well as 'CreateProcessA' used (I thought I replaced Shell with the latter), but you could try fiddling around with either {wait} or {nowait} in your pre_emulator_app_commandlines setting. Using {wait} might cause a slight delay, but it might stop the crashing...the only problem is that it might not launch Mame at all (I don't know if LEDBlinky quits once it has finished doing the ServoStik command? If it does you should be all good).

Quote
I would love a fix for the xml format change if you're running Mamewah with Windows7, I haven't gotten around to trying to fix it myself since LCDBlinky works - sort of.

It's actually the newer Mame version rather than Win7 that is the problem. What Mame version are you using btw? I couldn't find it in the other thread.

Does Mame still supply xml2dat.exe ? I have a feeling they stopped supplying/supporting it but just wondering if you can still do:

mame -listxml | xml2dat > mame.dat

...and then generate the games list from the dat file...