Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08118 Crash/Freeze Critical (emulator) Always Oct 27, 2021, 13:46 Nov 12, 2021, 10:39
Tester VasiliyFamiliya View Status Public Platform MAME (Official Binary)
Assigned To cuavas Resolution Fixed OS Windows 10/11 (64-bit)
Status [?] Resolved Driver
Version 0.237 Fixed in Version 0.238 Build 64-bit
Fixed in Git Commit 5c8e06b Github Pull Request #
Summary 08118: Core: The emulator freezes even before the launch of emulation process by itself.
Description The GUI/menus is still workable yet, but every time I tried to launch a game, I couldn't pass to loading screen even. Even MAME icon on the according taskbar button wasn't able to be loaded.
Steps To Reproduce Windows build, video d3d (it's the default)
Start MAME by double clicking the exe, not from cmdline.
Just select any random game or system.
Additional Information
Github Commit
Flags
Regression Version 0.237
Affected Sets / Systems Core
Attached Files
png file icon error mame.PNG (20,340 bytes) Oct 29, 2021, 12:47 Uploaded by MetalGod
MetalGod
Relationships
related to 07565Acknowledged If MAME started from Windows Explorer, it can crash depending on circumstances 
Notes
23
User avatar
No.19381
B2K24
Senior Tester
Oct 27, 2021, 14:41
Can you describe in better detail what the issue is you're experiencing?

I also have Windows 10 (64-Bit) and using the official 237 release binary, I can't reproduce anything wrong by running random machines with or without a SL.
User avatar
No.19383
VasiliyFamiliya
Tester
Oct 28, 2021, 02:57
That's how it looks: https://disk.yandex.ru/i/kHxUA4d7bsFFmg
User avatar
No.19384
MetalGod
Senior Tester
Oct 29, 2021, 08:24
edited on: Oct 29, 2021, 08:40
I'm suffering the same problem with mame 0.237. The new MAME just doesn't work.
No problem in mame 0.236. Both version with clean installs.

I'm using a laptop with Windows 10, intel core i7 , 2 graphic cards: Intel UHD Graphics 630 and the other is NVIDIA GeForce GTX 1050.
User avatar
No.19385
hap
Developer
Oct 29, 2021, 12:40
Is any error shown in the cmdline window?
User avatar
No.19386
MetalGod
Senior Tester
Oct 29, 2021, 12:46
edited on: Oct 29, 2021, 12:47
it works when running it in command line... but it shows this error message after closing the game (see attached).
User avatar
No.19387
hap
Developer
Oct 29, 2021, 13:12
Does it work if you disable hlsl?
@VasiliyFamiliya do you get the same error?

The cause of that error message was fixed with https://github.com/mamedev/mame/commit/11f7c24c2eabbcb08e422e9ca0947b9848a9d484
User avatar
No.19388
hap
Developer
Oct 29, 2021, 13:18
I just tried it myself, had to fiddle with Windows 10 settings that I described over here: https://github.com/mamedev/mame/issues/8755
and MAME 0.237 locks up no matter if hlsl is enabled or not.

My local build(includes vas's bugfix) works fine though.
User avatar
No.19389
hap
Developer
Oct 29, 2021, 13:21
edited on: Oct 29, 2021, 13:28
@MetalGod are you on github?
Try this build https://github.com/mamedev/mame/actions/runs/1385642925

Or, try changing video from d3d to bgfx, that should also work
User avatar
No.19391
MetalGod
Senior Tester
Oct 29, 2021, 15:00
Works changing it to bgfx
User avatar
No.19392
Robbbert
Senior Tester
Oct 29, 2021, 17:26
I tried the release build and there were no errors, no lockups, all worked fine, using default video (d3d I assume).
User avatar
No.19393
hap
Developer
Oct 29, 2021, 17:59
It's related to system locale. People with non-English Windows OS settings are likely affected.
User avatar
No.19394
M.A.S.H.
Senior Tester
Oct 30, 2021, 00:29
I have other problems with the locale settings with Windows 10 (German) and the official 64bit MAME 0.237 version.
I generate different -listxml outputs:
mame -listxml >0237.txt
mame -listxml >0237-1.txt
mame -listxml >0237-2.txt

When compare the files with WDiff i saw that MAME set a comma to refresh rate instead fo a point.
refresh="50,080128" <-> refresh="50.080128"


If i remove the line 290 in src\osd\windows\winmain.cpp
std::setlocale(LC_ALL, "");
to
//std::setlocale(LC_ALL, "");
the problem with listxml output disappears!


Possibly similar problems are everywhere in MAME with the locale setting :(
User avatar
No.19395
VasiliyFamiliya
Tester
Oct 30, 2021, 02:04
Where to load an intermediate builds?
User avatar
No.19396
Osso
Moderator
Oct 30, 2021, 04:53
Nightly builds are here: https://ashura.mameworld.info/nightlybuilds/builds.html
Or if you're registered at GitHub you can get artifacts build there.
User avatar
No.19398
hap
Developer
Oct 30, 2021, 11:25
edited on: Oct 30, 2021, 12:29
I'm going to reopen this.
While the error message doesn't happen anymore, the crash still happens if you do this modification in d3dhlsl.cpp(line 1977)
osd_printf_error is called at an invalid time? too early?

if (bad||1)
{
if (report_error)
osd_printf_error("Illegal %d-item vector value = %s\n", count, data);
return;
}


*edit*
it crashes with the win_message_box_utf8 call
in that function, return MessageBox(NULL, NULL, NULL, type); still doesn't work
User avatar
No.19405
Robbbert
Senior Tester
Oct 30, 2021, 14:00
Hap, could that be related to MT7565 ?
User avatar
No.19406
hap
Developer
Oct 30, 2021, 14:29
Maybe? I'm running in windowed mode though, and the lockup happens with MessageBox, not with winwindow_toggle_full_screen.
if I set mame.ini window to 0, MAME simply crashes, which is like MT7565.
User avatar
No.19407
hap
Developer
Oct 30, 2021, 19:29
edited on: Oct 30, 2021, 19:35
This may have been it: https://github.com/mamedev/mame/commit/c6993affc6fd77115fcf2a45ee6d8f97414f6cda

*edit* nope, still locks up/crashes
User avatar
No.19421
MetalGod
Senior Tester
Nov 6, 2021, 10:48
It seems fixed.
Tested in the last WIP version from
https://ashura.mameworld.info/nightlybuilds/builds.html


https://www.mediafire.com/file/o1hie9h4e47yaxa/05112021-19.17_mame.7z/file
05/11/2021-19:17 - MAME™ ver 0.237
User avatar
No.19422
hap
Developer
Nov 6, 2021, 13:34
The string parse issue was fixed yes. But the underlying crash problem is still there, that's why I reopened this bug report.
User avatar
No.19423
hap
Developer
Nov 7, 2021, 14:19
Pinpointed the lockup further, it's in osd/windows/window.cpp

- SendMessage(platform_window(), WM_USER_REDRAW, 0, (LPARAM)primlist);
- start draw_video_contents()
- std::lock_guard<std::mutex> lock(m_render_lock);
- MessageBox, which will halt the main process
- some winproc messages still get through
- a WM_PAINT starts draw_video_contents() again before WM_USER_REDRAW finished
- locks up at std::lock_guard<std::mutex> lock(m_render_lock);
User avatar
No.19447
cuavas
Administrator
Nov 12, 2021, 07:47
For whatever reason, I still couldn’t get it to crash, even if I modified the source to force an error. There seems to be some race condition in when the WM_PAINT actually happens. For people who reliably get crashes, can you see if 5c8e06be77c7d7ee72b8eaa3d2dc2bfee427ea1c fixes it? It also aggregates error messages making it a bit less irritating if there are several in a row.

The code is less than ideal in a couple of ways:

  • If the first error arrives before the main window appears, the main window will appear over the message box meaning you can end up with an exclusive fullscreen or borderless fullscreen hiding the message box altogether.

  • This would be better suited to an always-on-top dialog than a message box, which would also allow errors to be added to the text of the existing dialog as they arrive rather than creating new message boxes.

User avatar
No.19448
hap
Developer
Nov 12, 2021, 10:39
edited on: Nov 12, 2021, 10:46
It doesn't lock up anymore

2 things different:
- main process continues (so, attract mode of game starts)
- like you said, error messages are combined. In the case of the d3dhlsl messages, instead of 19 messageboxes, it's 2 with:

(1)
Illegal 2-item vector value = 0.0,0.0
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 3-item vector value = 0.0,0.0,0.0

(2)
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 3-item vector value = 1.0,0.0,0.0
Illegal 3-item vector value = 0.0,1.0,0.0
Illegal 3-item vector value = 0.0,0.0,1.0
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 3-item vector value = 1.0,1.0,1.0
Illegal 3-item vector value = 1.0,1.0,1.0
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 3-item vector value = 0.0,0.0,0.0
Illegal 2-item vector value = 0.64,0.33
Illegal 2-item vector value = 0.30,0.60
Illegal 2-item vector value = 0.15,0.06
Illegal 3-item vector value = 0.299,0.587,0.114
Illegal 3-item vector value = 0.2126,0.7152,0.0722
Illegal 3-item vector value = 1.0,1.0,1.0

https://mametesters.org/view.php?id=7565 still happens when in fullscreen mode.