Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06146 Crash/Freeze Critical (emulator) Random Mar 3, 2016, 14:18 Apr 24, 2016, 17:25
Tester Darkfalz View Status Public Platform MAME (Official Binary)
Assigned To Resolution Won't fix OS Windows Vista/7/8 (64-bit)
Status [?] Closed Driver
Version 0.170 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 06146: cps3 stv: Random CTD since 0.170
Description It happens on multiple drivers, I have included two that is confirmed.

It can run for long periods fine and then randomly crash, or it will crash within a few minutes.

This only happens in last two versions. I don't believe I experienced it with 0.169 or earlier.
Steps To Reproduce Running a game. I am using hlsl with basic settings. You get a looping sound freeze and then exit - sometimes the Windows error dialog box comes on, sometimes does not.

Happens on both my laptop and main PCs, both Ivy Bridge.
Additional Information Problem signature:
  Problem Event Name: APPCRASH
  Application Name: mame64.exe
  Application Version: 0.171.0.0
  Application Timestamp: 00000000
  Fault Module Name: mame64.exe
  Fault Module Version: 0.171.0.0
  Fault Module Timestamp: 00000000
  Exception Code: c0000094
  Exception Offset: 00000000020e3b3f
  OS Version: 6.1.7601.2.1.0.256.48
  Locale ID: 3081
  Additional Information 1: aac5
  Additional Information 2: aac5c21d1e6de803cff778e16cc02624
  Additional Information 3: 2c46
  Additional Information 4: 2c46fbf8554c8af73ceb687a6dafdb75

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
-----------------------------------------------------
Exception at EIP=00000000024E3B3F (device_t::clocks_to_attotime(unsigned long lo
ng) const+0x001f): INTEGER DIVIDE BY ZERO
-----------------------------------------------------
RAX=00000000FFFFFFFE RBX=000000000E2F2410 RCX=000000000C8CF6F0 RDX=00000000FFFFF
FFF
RSI=000000000C8CF790 RDI=00000000125087A0 RBP=000000000C8CF6C0 RSP=000000000C8CF
6C0
 R8=FFFFFFFFFFFFFFFE R9=0000000000AC4400 R10=000000000E2F2230 R11=0000000006E7F
A9B
R12=0000000000000001 R13=000000000CF201C0 R14=000000000842F950 R15=0000000000000
000
-----------------------------------------------------
Stack crawl:
  000000000C8CF6C0: 00000000024E3B3F (device_t::clocks_to_attotime(unsigned long
 long) const+0x001f)
  000000000C8CF710: 00000000024E7A98 (device_execute_interface::local_time() con
st+0x0078)
  000000000C8CF750: 00000000025D5D9D (device_scheduler::time() const+0x003d)
  000000000C8CF850: 00000000015684F8 (shaders::post_pass(d3d_render_target*, int
, poly_info*, int, bool)+0x0328)
  000000000C8CF900: 0000000001569171 (shaders::render_quad(poly_info*, int)+0x05
01)
  000000000C8CF970: 0000000001553DD8 (renderer_d3d9::primitive_flush_pending()+0
x00c8)
  000000000C8CF9D0: 00000000015594F5 (renderer_d3d9::draw(int)+0x00b5)
  000000000C8CFA30: 000000000152DAE7 (win_window_info::draw_video_contents(HDC__
*, int)+0x0057)
  000000000C8CFB20: 00000000015317FE (win_window_info::video_window_proc(HWND__*
, unsigned int, unsigned long long, long long)+0x059e)
  000000000C8CFB50: 000000000153200D (winwindow_video_window_proc_ui(HWND__*, un
signed int, unsigned long long, long long)+0x000d)
  000000000C8CFC10: 0000000076D59C11 (TranslateMessageEx+0x029d)
  000000000C8CFC60: 0000000076D53BD4 (CallWindowProcW+0x009c)
  000000000C8CFCA0: 0000000076D53B50 (CallWindowProcW+0x0018)
  000000000C8CFD10: 000007FEE99435D3 (Direct3DShaderValidatorCreate9+0x58f7)
  000000000C8CFDD0: 0000000076D59C11 (TranslateMessageEx+0x029d)
  000000000C8CFE60: 0000000076D5992A (TranslateMessage+0x01ea)
  000000000C8CFEF0: 0000000001530563 (win_window_info::thread_entry(void*)+0x00f
3)
  000000000C8CFF20: 000007FEFE7E415F (srand+0x0093)
  000000000C8CFF50: 000007FEFE7E6EBD (ftime64_s+0x01dd)
  000000000C8CFF80: 0000000076C359ED (BaseThreadInitThunk+0x000d)
  000000000C8CFFD0: 0000000076E6B371 (RtlUserThreadStart+0x0021)
Github Commit
Flags
Regression Version
Affected Sets / Systems cps3 stv
Attached Files
? file icon mame.ini (9,648 bytes) Mar 4, 2016, 16:11 Uploaded by Darkfalz
[Show Content]
Relationships
child of 05898Closed Multithreading causes innumerable problems 
Notes
16
User avatar
No.12415
Darkfalz
Tester
Mar 3, 2016, 14:42
I have tried a few runs with hlsl disabled and so far no crashes. I will update if otherwise.
User avatar
No.12416
B2K24
Senior Tester
Mar 3, 2016, 15:44
What's the GPU's of your main rigs and what drivers are installed for them? Also, please attach your mame.ini so we can see with what settings you're running with.
User avatar
No.12417
Haze
Senior Tester
Mar 3, 2016, 17:34
edited on: Mar 3, 2016, 17:34
sure this isn't a heat problem on your PC? the report / backtrace looks very strange and unexpected, not something I'd expect to just randomly happen.
User avatar
No.12418
NekoEd
Senior Tester
Mar 3, 2016, 17:44
Changed version to 0.170 to mesh with report body.
User avatar
No.12420
Darkfalz
Tester
Mar 4, 2016, 06:17
edited on: Mar 4, 2016, 06:21
Intel HD4000 (or 740M) on Laptop, same crash. 980 on main PC. GPU usage is in single digits so it's not overheating. I confirmed this is a hlsl issue for me - I also tried with a fresh, default MAME install and same random crash when hlsl is enabled. There's a thread on emuchat with same crash described.

Not an NVIDIA issue as happens with Intel too.
User avatar
No.12421
B2K24
Senior Tester
Mar 4, 2016, 08:15
I played 3rd Strike for over 30 minutes and didn't encounter any problems here. Are you running with cheats enabled? Can you attach or link your mame.ini?
User avatar
No.12423
Darkfalz
Tester
Mar 4, 2016, 16:12
It's random, I can play for an hour and then it will crash, or it can crash in attract mode after a minute or two. I have cheats enabled but they don't need to be any activated.

Try Final Fight revenge and just leave it running in attract mode. It crashes most of the time for me.

I uploaded my mame.ini
User avatar
No.12424
B2K24
Senior Tester
Mar 4, 2016, 18:21
Thanks for providing your mame.ini as this helps to possibly diagnose problems. At first glance I see you have multithreading enabled which could possibly be the cause of this issue. It's been recommended to have that disabled.

I'll continue to run some tests with my setup to see if I can trigger the issue and then copy over your mame.ini to see if this reported issue can be reproduced.
User avatar
No.12425
B2K24
Senior Tester
Mar 4, 2016, 22:21
Confirmed. It's the multithreading that causes the crash. I ran with defaulted mame.ini settings only inserting my HLSL settings and perhaps a couple small other things.
Disable the multithreading in mame.ini and you should be good.

mame64 ffreveng -mt

-----------------------------------------------------
Exception at EIP=00000000024E3B3F (device_t::clocks_to_attotime(unsigned long lo
ng) const+0x001f): INTEGER OVERFLOW
-----------------------------------------------------
RAX=00000000FFFFFFFE RBX=000000000A50F8C0 RCX=000000000E9DF400 RDX=00000000FFFFF
FFF
RSI=000000000E9DF4A0 RDI=000000000A492BF0 RBP=000000000E9DF3D0 RSP=000000000E9DF
3D0
 R8=FFFFFFFFFFFFFFFE  R9=0000000000AC4400 R10=000000000A50F6E0 R11=0000000006E7F
A9B
R12=0000000000000001 R13=000000000F2E2160 R14=000000000A4BCCA0 R15=0000000000000
000
-----------------------------------------------------
Stack crawl:
  000000000E9DF3D0: 00000000024E3B3F (device_t::clocks_to_attotime(unsigned long
 long) const+0x001f)
  000000000E9DF420: 00000000024E7A98 (device_execute_interface::local_time() con
st+0x0078)
  000000000E9DF460: 00000000025D5D9D (device_scheduler::time() const+0x003d)
  000000000E9DF560: 00000000015684F8 (shaders::post_pass(d3d_render_target*, int
, poly_info*, int, bool)+0x0328)
  000000000E9DF610: 0000000001569171 (shaders::render_quad(poly_info*, int)+0x05
01)
  000000000E9DF680: 0000000001553DD8 (renderer_d3d9::primitive_flush_pending()+0
x00c8)
  000000000E9DF6E0: 00000000015594F5 (renderer_d3d9::draw(int)+0x00b5)
  000000000E9DF740: 000000000152DAE7 (win_window_info::draw_video_contents(HDC__
*, int)+0x0057)
  000000000E9DF830: 00000000015317FE (win_window_info::video_window_proc(HWND__*
, unsigned int, unsigned long long, long long)+0x059e)
  000000000E9DF860: 000000000153200D (winwindow_video_window_proc_ui(HWND__*, un
signed int, unsigned long long, long long)+0x000d)
  000000000E9DF950: 00007FFAC37C1169 (DispatchMessageW+0x0689)
  000000000E9DF9A0: 00007FFAC37C0ABA (CallWindowProcW+0x010a)
  000000000E9DFA40: 00007FFAAE04EBE4 (Direct3DCreate9+0x7fb4)
  000000000E9DFB30: 00007FFAC37C1169 (DispatchMessageW+0x0689)
  000000000E9DFB80: 00007FFAC37C0ABA (CallWindowProcW+0x010a)
  000000000E9DFBE0: 00007FFAB7A94AE2 (DllUnregisterServer+0x0bd2)
  000000000E9DFC30: 00007FFAB7A94C20 (DllUnregisterServer+0x0d10)
  000000000E9DFC90: 00007FFAB7A94AE2 (DllUnregisterServer+0x0bd2)
  000000000E9DFCF0: 00007FFAB7A94ECA (DllUnregisterServer+0x0fba)
  000000000E9DFDE0: 00007FFAC37C1169 (DispatchMessageW+0x0689)
  000000000E9DFE60: 00007FFAC37C0C97 (DispatchMessageW+0x01b7)
  000000000E9DFEF0: 0000000001530563 (win_window_info::thread_entry(void*)+0x00f
3)
  000000000E9DFF20: 00007FFAC3DDB097 (beginthreadex+0x0137)
  000000000E9DFF50: 00007FFAC3DDB16C (endthreadex+0x00ac)
  000000000E9DFF80: 00007FFAC3528102 (BaseThreadInitThunk+0x0022)
  000000000E9DFFD0: 00007FFAC5ECC5B4 (RtlUserThreadStart+0x0034)

J:\MAME>
User avatar
No.12426
B2K24
Senior Tester
Mar 4, 2016, 22:25
I'm unsure how to mark or clean up this report because it's recommend to run with MT disabled.

Someone else help please :)
User avatar
No.12431
NekoEd
Senior Tester
Mar 5, 2016, 22:09
This should be suspended and linked to the catchall bug for multithreading issues. I'll take care of that.
User avatar
No.12434
B2K24
Senior Tester
Mar 6, 2016, 09:46
Thank you Ed.
User avatar
No.12437
Darkfalz
Tester
Mar 7, 2016, 05:17
Seems to be a combination of both HLSL and multithreading but as I understanding it most of MAME multithreading is putting the video render under a separate thread so I suppose it shouldn't be too surprising.

I am 99% sure it was stable as of 0.169 though? I never had these crashes before and have had MT on for the last few years.
User avatar
No.12438
NekoEd
Senior Tester
Mar 7, 2016, 16:19
MAME's multithreading has been getting progressively more and more broken, unfortunately. This is likely just part of the decline. The entirety of the multithreading code seems to need a major revisit/rewrite.
User avatar
No.12439
Tafoid
Administrator
Mar 7, 2016, 20:38
With the eventual progression of BGFX as the primary video driver which I'm told has MT type behavior built into it - -mt will likely be done away with as an option sooner or later.
User avatar
No.12554
Tafoid
Administrator
Apr 24, 2016, 17:24
With MT forcibly removed, this is no longer an issue. Closing.