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 --- Bug Reports --- Site News

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


Author Topic: Unable to initialize Direct3D 9 Fatal error: Unable to complete window creation  (Read 424 times)

0 Members and 1 Guest are viewing this topic.


  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:June 19, 2019, 02:58:56 pm
I swear, MAME was running just fine with video set to d3d and HLSL and drawing fake scanlines and stuff. Suddenly, a few hours later, I get the following blob of gunk:

Code: [Select]
Unable to initialize Direct3D 9
Fatal error: Unable to complete window creation

Exception at EIP=00000000025d6171 (not found): ACCESS VIOLATION
While attempting to read memory at 0000000000000000
RAX=0000000002544873 RBX=00000000154e9c60 RCX=0000000000000000 RDX=0000000000000004
RSI=0000000015a90400 RDI=000000000ddaa1b0 RBP=0000000000000000 RSP=000000000f1f8c90
 R8=000000000c0978ce  R9=000000000f1f8c98 R10=000000000c088414 R11=0000000000230678
R12=0000000000000000 R13=0000000000000002 R14=0000000000000000 R15=0000000000000000
Stack crawl:
  000000000f1f8cd0: 00000000025d6171 (not found)
  000000000f1f8d30: 000000000258cea0 (not found)
  000000000f1f8d80: 000000000258cf82 (not found)
  000000000f1f8dc0: 000000000258d151 (not found)
  000000000f1f8e90: 0000000002554bc7 (not found)
  000000000f1f9020: 00007ffbe2ab6d41 (CallWindowProcW+0x04c1)
  000000000f1f9070: 00007ffbe2ab690b (CallWindowProcW+0x008b)
  000000000f1f9110: 00007ffbd62f1b87 (Direct3DCreate9Ex+0x06a7)
  000000000f1f92a0: 00007ffbe2ab6d41 (CallWindowProcW+0x04c1)
  000000000f1f9300: 00007ffbe2ab6a1c (CallWindowProcW+0x019c)
  000000000f1f9360: 00007ffbe2ac04d3 (IsWindowVisible+0x01a3)
  000000000f1f93e8: 00007ffbe357e6b4 (KiUserCallbackDispatcher+0x0024)
  000000000f1f93f0: 00007ffbdfe723c4 (NtUserDestroyWindow+0x0014)
  000000000f1f9460: 00000000025513b4 (not found)
  000000000f1f94a0: 0000000002551fb2 (not found)
  000000000f1f94d0: 000000000253f6f0 (not found)
  000000000f1f9510: 0000000003e937a7 (not found)
  000000000f1f95e0: 0000000003e9a950 (not found)
  000000000f1ff270: 00000000025f6118 (not found)
  000000000f1ff4e0: 0000000002669a91 (not found)
  000000000f1ff640: 0000000002669dbb (not found)
  000000000f1ff6a0: 00000000025f4127 (not found)
  000000000f1ffe50: 0000000008cd7c47 (not found)
  000000000f1fff20: 00000000004013a5 (not found)
  000000000f1fff50: 000000000040150b (not found)
  000000000f1fff80: 00007ffbe0be3034 (BaseThreadInitThunk+0x0014)
  000000000f1fffd0: 00007ffbe3553691 (RtlUserThreadStart+0x0021)

I'm running Windows 10 with an Nvidia GTX 1050Ti with current drivers. I tried reinstalling DirectX via the "June 10" redist executable, but nothing changed. If I switch to any other video method (gdi, opengl, etc.), everything works. Just no HLSL goodies.

I've rebooted a few times, just in case, but I'm at my wit's end. I've been wracking my brain trying to think if I did something in between the time it worked and the time it didn't, and I can't think of anything. That wall of mostly numbers above means nothing to me, but I'm posting here in case someone who knows what's what might be able to help. Thanks for your time!

Edit: d3d works, it's just HLSL that kills everything. what? I haven't touched my HLSL settings since I first got MAME (0.204) up and running.
« Last Edit: January 04, 2019, 09:47:56 pm by BGoulette »


  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1205
  • Last login:June 12, 2019, 09:32:04 am
  • I want to build my own arcade controls!
    • MAME Development Blog
did you actually ever have HLSL working in 0.204?

usually this kind of thing is caused by people not properly upgrading / installing MAME but instead doing the worst thing possible, just copying mame.exe and none of the required support files.


  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:June 19, 2019, 02:58:56 pm
Haha, fair point, but I actually downloaded the source and compiled .204 on my machine -- a machine that had never had mame in any flavor installed!

I can follow internet directions reasonably well (which is how I got mame compiled in the first place), but I couldn't figure out what went wrong with HLSL. After additional reading, I discovered bgfx, and that's actually working for me (d3d11, too), so I think I'm good to go. It's just really strange why vanilla HLSL just...stopped!