Closed Gryzor1363 closed 1 year ago
I tested the official release on both Windows 7 (esr) and Windows 10 with no issue. Both machines have the latest updates.
I have seen a number of complaints about this release, such as freezing, crashing, and loss of controller settings - but only for certain people. Perhaps there's some local incompatibility now.
Just installed 0.252 on my machine as a clean install, pointed it to my ROMs, changed nothing else, and I see the same reported behavior. I can't start any machines from the UI, and I get the black screen when I exit. Also, when I run from the command-line, I see the "ACCESS VIOLATION" message. For what it's worth, 0.251 works great.
Windows 11 Pro 64-bit AMD Ryzen 9 5950X 32.0GB RAM NVIDIA GeForce RTX 4090 / 528.49 (latest)
Like the original report, using 'bgfx' works fine.
This is on Windows 10. Confirming the above reports. I cannot exit mame v0252 without using "taskkill /f /im mame.exe". I tried the following backends, each with the same result (black screen): auto / d3d / opengl / bgfx
I had to actually create a shortcut to a cmd file and put it in my start menu because I couldn't even open my task manager. No other window would open it would always flash back to the black screen. But my start menu opened so I put a shortcut in there while I tested this.
I used the default settings provided by running mame.exe -cc.
After switching back to mame v0251 and running the default settings with mame.exe -cc I was able to run and exit the game with no issues.
This is on Windows 10. Confirming the above reports. I cannot exit mame v0252 without using "taskkill /f /im mame.exe". I tried the following backends, each with the same result (black screen): auto / d3d / opengl / bgfx
That’s not confirming the above reports, that’s completely different behaviour.
This is on Windows 10. Confirming the above reports. I cannot exit mame v0252 without using "taskkill /f /im mame.exe". I tried the following backends, each with the same result (black screen): auto / d3d / opengl / bgfx
That’s not confirming the above reports, that’s completely different behaviour.
I get the same error in the original post if I alt-tab around long enough it finally dies with that same error. The only difference I have is that none of the backends worked on my system. The game starts and runs, but when attempting to exit, it goes to a black screen that is hard to get out of. You cannot open the task manager or alt-tab or anything because it just goes right back to the black screen. The first couple times I tested I managed to get out by opening the Run window and blindly typing taskkill /f /im mame.exe. After a couple times I added the shortcut to do it myself.
I get the same error in the original post if I alt-tab around long enough it finally dies with that same error. The only difference I have is that none of the backends worked on my system. The game starts and runs, but when attempting to exit, it goes to a black screen that is hard to get out of. You cannot open the task manager or alt-tab or anything because it just goes right back to the black screen. The first couple times I tested I managed to get out by opening the Run window and blindly typing taskkill /f /im mame.exe. After a couple times I added the shortcut to do it myself.
The other people are describing an issue affecting D3D only, and only when the system selection menu is displayed. That is not the same as the symptoms you are reporting. If the discussion on this issue continues to get derailed, it’s going to turn into a waste of everyone’s time and will need to be locked.
I have the same problem with the official MAME under Windows 10 (black screen and can't exit). My joystick is the problem. I have a NACON GC-100 joystick with two game modes (PC and X-Box). MAME works only in the X-Box mode. The normal PC mode does not work since MAME 0.252. If you set in the mame.ini: joystickprovider none MAME works and exit without errors!
If you set in the mame.ini: joystickprovider none MAME works and exit without errors!
This fixes the reported issues for me (though I can't use my joystick, of course). I have a RAC-J500S stick, and the black screen and memory access violations disappear if I either edit the .ini file or just unplug the joystick. For now, I'll use the aforementioned bgfx workaround, because the joystick continues to work.
Ok, after fiddling with different settings, seems the culprit is auto mode after all. But not for gamepad. For video. But it's somehow connected to autodetecting dinput gamepads. All you need to do with new MAME 0.252 setup is unplug the dinput gamepad, if you use it like myself, before starting MAME and set video mode to something else, bgfx, for example, or opengl. Save settings, close it. Then plug your gamepad, start mame again and everything should work and close properly. No further settings required here. Input is left at default (auto). If we set video mode back to auto, it will resume freezing on exit. Oh, and unplugging gamepad on freeze doesn't help to unfreeze it. Seems that mame needs the same time to auto-exit. 20 seconds or so. Can people confirm this, please? Different computers may need different stuff. But with xinput gamepads it seems ok. No freezes.
Can people confirm this, please?
Yep. This is the same as my experience.
So can everyone confirm the issues only happen with DirectInput joysticks connected?
Also, can the issues happen without joysticks connected if you use -keyboardprovider dinput -mouseprovider dinput
to use DirectInput for mouse/keyboard?
This does give some more clues as to what’s going on. I believe there’s a memory corruption issue in the Windows input code that predates 0.252, but because it seems to happen randomly, I haven’t been able to track it down. For me, it typically manifests as the -multimouse
or -multikeyboard
option getting turned on when it shouldn’t be.
Unfortunately I don’t have a memory analyser setup for Windows at the moment, and apparently the Visual Studio tools I’m using are too old to support ASAN. I’ll see what I can do.
One other thing to test – does changing the sound module affect whether it crashes? Does -sound xaudio2
stop it from crashing?
I managed to get MAME building with ASAN on Windows, and unfortunately it hasn’t turned up any errors in the DirectInput code. Whatever’s happening is a nasty intermittent bug.
Just did a bunch of tests, and yes, I only see the issue when the joystick is physically connected. When it's disconnected, everything works as-expected.
mame -keyboardprovider dinput -mouseprovider dinput
, works fine.mame -keyboardprovider dinput -mouseprovider dinput -joystickprovider dinput
, works fine.mame -sound xaudio2
, still crashes with ACCESS VIOLATION.Just did a bunch of tests, and yes, I only see the issue when the joystick is physically connected.
Thanks. I’ll keep trying to track it down. This has been bothering me for years.
I think I fixed a major source of DirectInput crashes with 42e759ade491813588fda7cb185878d80a831a05. If you can compile yourself of grab a CI build with from top-of-tree you can see if it’s fixed, otherwise you can wait for 0.253 at worst.
If you can compile yourself of grab a CI build with from top-of-tree you can see if it’s fixed, otherwise you can wait for 0.253 at worst.
Just compiled a version with your changes, and it appears to fix the issue. I no longer see the errors that are described in this issue.
So can everyone confirm the issues only happen with DirectInput joysticks connected?
Also, can the issues happen without joysticks connected if you use
-keyboardprovider dinput -mouseprovider dinput
to use DirectInput for mouse/keyboard?
Yes, for my part I can also confirm that, while the backend in mame.ini is set to d3d :
I'm getting this issue too. MAME just CRASHES and goes back to my desktop whenever I click on a ROM, and yes, I do have the newest ROMSET. I get NO ERROR message, it just CRASHES. Just solved it by unplugging my SNES style controller, and plugging my Logitech controller in instead....
MAME version
0.252
System information
Windows 7 SP1 Pro, 64 Bit Edition FX-8350 x86 AMD Processor 16 Gb RAM Nvidia GTX 1070 Video card, driver version 473.81
INI configuration details
Emulated system/software
Internal UI
Incorrect behaviour
Upon executing Mame 0.252 with video set to "d3d" in mame.ini, attempting to launch any game leads to a forceclose of Mame, with the following memory access violation error in the windows console :
Exception at EIP=000007fef8e034d0 (not found): ACCESS VIOLATION While attempting to write memory at 000007fef8e034d0
RAX=00000000001597e0 RBX=0000000000000000 RCX=00000000000513f8 RDX=0000000000000 090 RSI=0000000000000001 RDI=0000000000000000 RBP=0000000000159dd0 RSP=0000000000159 778 R8=0000000000000000 R9=0000000000000000 R10=00000000000513f8 R11=0000000000000 000 R12=0000000000000000 R13=0000000000000090 R14=0000000000000000 R15=0000000000051 3f8
Stack crawl: 0000000000159770: 000007fef8e034d0 (not found) 0000000000159830: 0000000077379861 (TranslateMessageEx+0x0291) 0000000000159890: 0000000077376f8b (SetWindowTextW+0x0277) 00000000001598f0: 00000000773764d5 (IsDialogMessageW+0x0169) 0000000000159978: 00000000774cb4ef (KiUserCallbackDispatcher+0x001f) 0000000000159980: 000000007736c93a (DestroyWindow+0x000a) 00000000001599b0: 0000000147654c36 (not found) 00000000001599e0: 000000014a1433ee (not found) 0000000000159a20: 0000000147654fe1 (not found) 0000000000159a50: 000000014766078d (not found) 0000000000159a90: 000000014764eb35 (not found) 0000000000159ac0: 0000000143da0f01 (not found) 0000000000159c20: 0000000143fc862a (not found) 000000000015f140: 000000014763c6fb (not found) 000000000015f520: 000000014a08660f (not found) 000000000015f7e0: 000000014a086c1d (not found) 000000000015f840: 0000000147636e29 (not found) 000000000015fc00: 000000014b293a09 (not found) 000000000015fcd0: 000000013f5413b1 (not found) 000000000015fd00: 000000013f5414e6 (not found) 000000000015fd30: 000000007725556d (BaseThreadInitThunk+0x000d) 000000000015fd80: 00000000774b372d (RtlUserThreadStart+0x001d)
I get an identical error when trying to exit Mame without launching anything, and when doing that, Mame sometimes hangs and process becomes unresponsive with a blackscreen.
Expected behaviour
Game launching normally, and Mame exiting normally.
Steps to reproduce
1.Start Mame. 2.Attempt to load any game. 3.Try to exit Mame.
Additional details
A workaround (as per Cuavas' advice) consists in replacing the backend parameter in Mame.ini with anything other than "d3d". Indeed, both opengl and bgfx work fine, irrespective of the setting in lower-level INIs such as Horizont.ini or Vertical.ini.
In this case, even d3d in either file works fine and HLSL functions are active and working normally as well.
This is the first ever issue of this kind I am getting on this computer, of which the system configuration has not changed in months at least, and all previous versions tested all the way to 0.251 work just fine.