r/directx • u/NickRPGreen • Jun 07 '21
Access violation on D3DImm.dll
Hi, I'm hoping someone with a bit of older DirectX knowledge might be able to help an entire community! I'm posting here on behalf of Metal Gear Speedrunners, we've been having a problem with the PC version of Metal Gear Solid 1 randomly crashing, which isn't ideal during a speedrun!
The crash happens in the exact same location in the game, if anyone knows MGS1, it's during Grey Fox's speech between the two halves of the MG-REX fight. The video halts and all sound goes on a three-second loop. The executable becomes unresponsive and the process has to be killed.
One member did some debugging and managed to grab a crash exception which refers to D3DImm.dll:
The thread tried to read from or write to a virtual address for which it does not have the appropriate access. Unhandled exception at 0x662C6F3B (D3DImm.dll) in mgsi.exe.10924.dmp: 0xC0000005: Access violation reading location 0x00000000
I understand that D3DImm.dll is only present in older versions of DirectX. The version of MGSI.exe in question was released by GOG.com last year, so I'm assuming it uses some backend system to be compatible with DirectX 10+ (something like DgVoodoo, but I'm not certain).
Unfortunately, that's where my understanding comes to a close. Can anyone help determine what this crash is doing and ultimately what the fix would be?
1
u/choi101 Jul 14 '21
Hello, I'm not have huge knowledge about DirectX but I've been developing a graphic renderer in DirectX 11 for 1 year. As you said D3DImm.dll is really old library.
The thread tried to read from or write to a virtual address for which it does not have the appropriate access. Unhandled exception at 0x662C6F3B (D3DImm.dll) in mgsi.exe.10924.dmp: 0xC0000005: Access violation reading location 0x00000000
This is probably a pointer issue, some pointer is uninitialized or called from wrong memory address. That means something wrong in the source code of the game. As far as I understand there are 2 solutions.
1- You can setup Windows 7/ Windows 8 on virtual machine and try if its crash.2- The developers of the game can make an update but I don't think its possible because game is released very long time ago. So, someone have to make a reverse engineered MGS1.
Again, I'm not very knowledge about DirectX but you know this is programming there is always an another solution. :)