protonscr

[D3D9 x32] Sonic Adventure 2 - Crash when loading main action stages/levels

dxvkopen d3d9windows
doitsujin/dxvk#4903 · opened 2025-05-08 by LordZodz · updated 2025-05-14 · 12 comments · github
LLordZodz 2025-05-08 github

When using DXVK the game boots up to the title screen. The menus can be navigated, and some levels and cutscenes can be loaded with no issues (e.g. Sonic V.S Shadow second fight on the A.R.K, Hero Story Intro cutscene). However, whenever I try to load one of the main action stages (e.g. City Escape, Radical Highway, Metal Harbour, etc.) the game crashes with the following error message (image of full error message also attached below):

"SA2 has crashed at 5588b5ca (d3d9.dll)."

I've never been able to get SA2 fully working using DXVK; when using previous versions, such as DXVK 2.4, I couldn't boot the game up. Instead, I would immediately get a similar error related to d3d9.dll. The current version 2.6.1 allows me to get into the game, which is an improvement at least. DXVK works completely fine on several other games I've played, so as far as I'm aware there's no issue on the hardware/driver side affecting all my other games.

Mods don't have an impact on this issue either; the same problem occurs with or without mods. The only slight discrepancy is using 'SA2 Render Fix', where when I try loading an action stage some of the UI elements can load before the same error/crash occurs.

No mods were enabled when I generated the logs and apitrace files below. I did use the SA2 Mod Manager's test spawn functionality to load directly into selected levels/scenes to speed up testing.

If there is anything missing or anything else I can provide I'll do my best to assist.

Software information

  • Game: Sonic Adventure 2 (Steam)
  • Other Software: SA Mod Manager

System information

  • OS: Windows 11
  • GPU: AMD Radeon RX 7900 XTX
  • Driver: AMD Software: Adrenalin Edition 25.3.1
  • Wine version: N/A
  • DXVK version: 2.6.1

Apitrace file(s)

https://drive.google.com/file/d/1tIPeeL-THYyr1ZI3Ms3ERkPglXHl6crS/view?usp=drive_link

Log file(s)

sonic2app_d3d9.log

Other file(s)

SA2 crash dump file:
02_32_23_Dump__.dmp
SA2 mod list file:
02_32_23_ModList__.json
SA2 text file:
02_32_23_extra_info__.txt

Screenshot of error:
Image

WWinterSnowfall 2025-05-09 github

https://drive.google.com/file/d/1tIPeeL-THYyr1ZI3Ms3ERkPglXHl6crS/view?usp=drive_link

Tried grabbing this, but it's asking me for login. Can you please make it public?

LLordZodz 2025-05-09 github

Apologies! I've changed the file access. You should have permission to view and download the file now.

WWinterSnowfall 2025-05-09 github

Thank you! Got the trace now, but it replays just fine with dxvk. Is this a trace of the crash itself, because it seems to end rather abruptly (though with nothing that would indicate a d3d problem)?

LLordZodz 2025-05-10 github

Yes, this was an attempt to trace the crash which happens as soon as the game tries to load one of the main stages. It ends abruptly because I Alt+F4'd the game a few seconds after the level loaded, trying to follow along the instructions for using Apitrace where it mentions reproducing the issue as fast as possible before exiting the game, which I assumed meant quitting out of the game ASAP once you get past the problematic area of the game. The game works fine when using the standard rendering API, which as far as I'm aware is 32-bit DirectX 9 as that's the .dll file from DXVK that works with the game. The issue only crops up when using DXVK.

Shall I do a longer Apitrace instead? Loading from the title screen rather than directly into the action stage via the Mod Manager? What would you suggest?

WWinterSnowfall 2025-05-10 github

Capturing some of the gameplay would be nice, yes... the instructions are there to ensure you don't get an extremly large trace (think in excess of 1 GB), however your trace is fairly small, so you could capture more without worries.

The problem is replaying the trace works on dxvk, so whatever causes the crash can't be reproduced with a trace. Unless it happens somewhat later and the current trace doesn't capture it (which you're saying is not the case).

Think someone will have to try and reproduce with the game directly, maybe @Blisto91 has it around.

LLordZodz 2025-05-10 github

Ok I'm with you now. I have created a longer Apitrace file which can be found at the link below, which may or may not be useful but it's there just in case:

https://drive.google.com/file/d/1Um2fM9RHnGY1RVy68jcVGUk74X-AZhLG/view?usp=drive_link

LLordZodz 2025-05-10 github

Ok! Breakthrough on my end:

I managed to get SA2 working with DXVK by changing the resolution from my native 2160p (4K) to something lower like 1080p or 1440p. I typically play in borderless fullscreen, which is what I had set in the mod manager's graphics settings. Here's what I discovered:

  • Borderless fullscreen/windowed mode at 1080p or 1440p works fine with DXVK
  • Borderless fullscreen/windowed mode at 4K causes the game to crash, as described in the original post
  • Exclusive fullscreen works fine at all resolutions, including 4K

So, the issue appears specifically when using DXVK + 4K + borderless fullscreen/windowed mode. Lowering the resolution or switching to exclusive fullscreen resolves it.

Does this sound like a DXVK limitation with SA2? Could it be driver-related? Or something else? Is there a setting in the dxvk.conf file that can fix this?

WWinterSnowfall 2025-05-10 github

Ok I'm with you now. I have created a longer Apitrace file which can be found at the link below, which may or may not be useful but it's there just in case:

https://drive.google.com/file/d/1Um2fM9RHnGY1RVy68jcVGUk74X-AZhLG/view?usp=drive_link

Thank you, however it also replays just fine with dxvk here. Was this traced without any mods?

Does this sound like a DXVK limitation with SA2? Could it be driver-related? Or something else? Is there a setting in the dxvk.conf file that can fix this?

I'll let @Blisto91 comment, since he has the game, but so far we haven't been able to reproduce the crash you're seeing.

LLordZodz 2025-05-11 github

Thank you, however it also replays just fine with dxvk here. Was this traced without any mods?

The second Apitrace was traced with two mods enabled; an input mod utilizing modern APIs for better controller support (so I could use my Xbox Series X controller for easier navigation and play), and the 'SA2 Render Mod' that fixes and enhances the graphical presentation in the game to be closer to the Dreamcast release. The crashes occur regardless of whether mods are enabled or disabled from the troubleshooting I've conducted, and as mentioned in my previous comment the crashes seem tied with the game's resolution being set to 4K in borderless fullscreen mode or windowed mode.

KK0bin maintainer 2025-05-11 github

If fullscreen/borderless fullscreens makes a difference I'm inclined to blame the AMD Windows Vulkan driver because it has had a lot of problems related to that recently.

Make sure you don't have Vulkan presentation through DXGI (or whatever the AMD variant is called) enabled in your driver settings.

BBlisto91 2025-05-11 github

I tried reproducing it yesterday on my rdna2 iGPU with the same driver, but was unable. That is both with and without mods and trying to match your settings in the mod manager.
I only have a 1080p monitor so i had to fake a 4k virtual resolution via the AMD Adrenalin software, but the game still seemed fine with it

LLordZodz 2025-05-14 github

Just tried the new AMD driver v25.5.1, but the SA2 issue with DXVK still persists. In general, I'm seeing more problems overall with this driver compared to the previous one, so I might roll back until AMD fixes things.

Make sure you don't have Vulkan presentation through DXGI (or whatever the AMD variant is called) enabled in your driver settings.

I couldn’t find any such option in the AMD Adrenalin software. The only related setting I found was “Optimisations for windowed games” in Windows Graphics settings, which I disabled — no change. Is the Vulkan/DXGI toggle buried somewhere else?

I only have a 1080p monitor so i had to fake a 4k virtual resolution via the AMD Adrenalin software, but the game still seemed fine with it

Did you use AMD’s FSR feature for that? I tried enabling borderless fullscreen upscaling, and the max I could get SA2 to upscale to was 3200x1800 — not full 4K. Same limit across other games too. Is it normal for the slider to cap out there, or should it go all the way to 4K?

I also tested custom resolutions via the SA2 Mod Manager (no upscaling). I found that 3328x1872 works in borderless fullscreen, but the game sometimes crashes after finishing stages or transitioning scenes. Above this, the game crashes the same way as when playing at 4K borderless. At 3200x1800, it seems stable.

What’s your take on this? Like K0bin said, it might be an AMD Vulkan driver issue, but Blisto91’s setup works fine — so maybe something’s off on my end, either software or hardware?

I could try playing the game via my CPU's iGPU to see if there's any difference. It's an AMD Ryzen 7, so maybe there's a conflict between the iGPU and dGPU?

DLLs