Dungeon Siege 2: Broken World crashes when loading a game
I tested the new 2.6 release on Windows and it works fine on Dungeon Siege 2, however when trying it on the expansion Broken World, it crashes to desktop right after the loading screen, whether it's when starting a new game or loading an existing save.
I tried with/without dxvk.allowFse = true, with/without the Rivatuner overlay and without the Steam overlay. Also had a friend try it on his computer with the same result.
Software information
Dungeon Siege 2: Broken World
System information
- GPU: Nvidia GTX 1070
- Driver: 560.94
- Wine version: N/A
- DXVK version: 2.6
Apitrace file(s)
https://mega.nz/file/5aRRwLQL#Rb4fD2EC42ghOUuVRAIKKQAvUIfC0i9VMOjBkJLw7kI
Log files
Thank you for the trace. There does indeed seem to be something problematic happening in there compared to native behavior, but it's hard to tell where things go wrong without a similar dxvk trace (up to the point of the crash).
Can you try getting one with: C:\path\to\bin\apitrace.exe trace -a d3d9 DungeonSiege2BW.exe run from the path of the game executable? Running it from the apitrace folder won't work well most of the time.
Make sure you directly target the main game executable above, not a launcher or something else, since then apitrace won't hook properly.
How do I make apitrace use the d3d9.dll from DXVK? If I do the above, I can't get a crash since it's not using DXVK. I can tell since Rivatuner is showing D3D9 is being used instead of Vulkan.
It should load it properly if you just leave the dxvk dll next to the game executable. If that actually works properly on Windows is anyone's guess.
Well, here's the new trace, though I doubt it's actually loading DXVK since I tried on a non hex-edited executable after creating the trace and the cursor wasn't showing up.
https://mega.nz/file/AH4x1QJY#jRW6eliWE-vgNX4YEzd3G0i_Uvb6PNZSd4TwBrmQ-_M
Well, here's the new trace, though I doubt it's actually loading DXVK since I tried on a non hex-edited executable after creating the trace and the cursor wasn't showing up.
Sigh. Thanks for trying... it's not a dxvk trace, as you suspected. @Blisto91 Any ideas here on how to get apitrace to capture a dxvk trace on Windows?
One way would be to create a folder, doesn't matter where, and then put the dxvk DLLs in to that while the apitrace DLL is next to the exe like normal. Then setup a environment variable named APITRACE_FORCE_MODULE_PATH with a value that is the path to the folder with the dxvk DLLs in it. Apitrace will then load those instead of the system ones for rendering.
Thanks, that worked! I've got a trace with DXVK now.
https://mega.nz/file/hTp1wYrb#sv0vnkJW-wdo4OAZYMYUFrci_PRGItVdiqtOAs9Llh8
https://mega.nz/file/hTp1wYrb#sv0vnkJW-wdo4OAZYMYUFrci_PRGItVdiqtOAs9Llh8
Hmmm... this doesn't end where I'd have expected it to end, but thank you. Can definitely try to pinpoint the problem now at least.
@GenesisFR Does the expansion perchance ship with a d3d9.dll of its own?
No it doesn't, it just ships with BINK and Miles Sound System, at least in the version that I have.
It also has its own executable.
Can you try running it with d3d9.deviceLossOnFocusLoss = True and see if that's any better? I doubt it will fix things, but it's something I noticed on the Windows trace that we're not enforcing in dxvk by default.
No change with d3d9.deviceLossOnFocusLoss = True, still crashes at the exact same spot.
I've just noticed the game doesn't crash when run in windowed mode though.
Even better, it doesn't crash in fullscreen if I use 1024x768 as a resolution, which is the hardcoded resolution of the main menu. Any other resolution makes it crash so there's something wrong when changing resolution.
Here's the corresponding trace with the game working: https://mega.nz/file/hToHxILR#b0oQDPLLSNItCvSCGufl3ckuE_IBkghaONpyzxF07OM
And the log: DungeonSiege2BW_d3d9.log
I've just noticed the game doesn't crash when run in windowed mode though.
Even better, it doesn't crash in fullscreen if I use 1024x768 as a resolution, which is the hardcoded resolution of the main menu. Any other resolution makes it crash so there's something wrong when changing resolution.
Yeah, that makes sense. To be clear, at this point I am aware of what is causing the game to crash, but not why it is happening.
The trace you've shared simply doesn't recreate the d3d9 device, which the game apparently triggers when changing resolutions. That is where the problem lies indeed and it makes sense that the crash is bypassed when this path isn't hit.
Out of curiosity, please give it a go with this build: dxvk-ds2bw.zip
It shows a black screen instead of the loading screen but it crashes all the same after a while. I see you added more traces in the log.
I see you added more traces in the log.
I did not, it's a consequence of the test I had attempted. In a way it's better that it didn't work, but the bad news is that I'm out of ideas at this point.
P.S.: @Blisto91 is graciously procuring a SH copy of the game, so we might get some insight later on, but I wouldn't get my hopes up.
Gonna add these apitraces for visibility. One of the native game, one with wined3d and one with dxvk where it crashes https://drive.proton.me/urls/88P7TCBG40#BAU2HOpk3ok3 So far the devs haven't gotten further in figuring out the issue.
@GenesisFR Do you happen to have a multi-monitor setup? If so, would be good to recheck on master, as we've had an invalidated pointer deference bug in such situations. I still have no idea what this could be caused by (other than the game relying on some form of UB/UAF).
Yes, I'm a on a multi-monitor setup. I'll test next week on master and also without a second monitor.
Btw when you mean recheck on master, you mean the latest release (aka 2.7.1), right?
Master is the code branch with the latest work that isn't necessarily in a formal release yet. You can download a build of current latest master here https://github.com/doitsujin/dxvk/actions/runs/18235500872
Alright so I'm on a new computer now and I've just rechecked with master, it crashes the same way, whether I unplug my second monitor or not. Didn't bother making a trace though.
Alright so I'm on a new computer now and I've just rechecked with master, it crashes the same way, whether I unplug my second monitor or not.
Alright, thank you for retesting. Sadly, I still can't see any reason why this would work in the base game but not the add-on. As far as I can tell we're not doing anything wrong.