doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.3k stars 857 forks source link

Bully scholarship edition Crash while loading the game #2623

Open emanuelect opened 2 years ago

emanuelect commented 2 years ago

I can get to the main menu of the game, starting the game during loading the game crashes. The movies of the rockstar logos are opened in window mode with a lot of stuttering.

Software information

Bully Scholarship Edition resolution: 1920x1080 Antialiasing 8x Vsync On

System information

Apitrace file(s)

Log files

K0bin commented 2 years ago

Please add an apitrace.

emanuelect commented 2 years ago

I tried, even following the guide, but I can't figure out how apitrace works.

Blisto91 commented 2 years ago

Just download apitrace from https://github.com/apitrace/apitrace/releases and from x86/lib/wrappers extract d3d9.dll (I'm assuming this is a 32 bit dx9 game) into the same folder as the games main .exe file. Then start the game as normal and get to or just past the point where the issue occurs and shut down the game. A .trace file should have been created on your desktop.

After that compress (zip or other) the file and upload it to a common file sharing site.

Also @K0bin isn't DxvkMemoryAllocator: Memory allocation failed maybe a 32 bit memory issue? Even tho the allocated seem low.

emanuelect commented 2 years ago

I have done so, but no file is created. I noticed that the error that appears, is a conflict between dxvk and the silent patch for bully, which I had to apply to the game to fix bugs and crashes.

Blisto91 commented 2 years ago

Is it the steam version you are using? Does the crash also happen without the silent patch?

emanuelect commented 2 years ago

Yes, I use the steam version, the crashes are there even without the silent patch. With the silent patch when starting logos I get an error that I can ignore, movies are skipped and during loading the game crashes. Without the silent patch the game crashes before the movies. If instead from steam I enter this string: -force-d3d10 I can start the game, but upon exiting the dormitory, it starts having some freezes and then crashes.

Blisto91 commented 2 years ago

I will see if i can reproduce later and make a apitrace.

Looking at comments online this seems to be a pretty crappy port.

emanuelect commented 2 years ago

Thanks

Blisto91 commented 2 years ago

Could you try and see if the issue is also present with the latest gpu driver? Which windows version do you use.

emanuelect commented 2 years ago

I use windows 10, unfortunately I can't test with the latest version of video drivers, I had to remove them because they had a bug with video recording. However i don't think it's a problem with the drivers, because i tried dxvk with half life 2 deathmatch and sitting ducks. they worked perfectly, also having an increase of fps in both.

Blisto91 commented 2 years ago

Ye it crashes on windows 10 on my amd setup too. With both the standard steam version and silent patch. Also it seems to have issues grabbing onto the window or something as the screen might show black until you do a quick alt tab. Made apitraces with and without the silent patch. https://mega.nz/file/UxIiySzQ#jKMsKLofr_CdVefbw2o4NVkivDZd7dZuv2S-5Atqf-g

It seems to work on linux tho.

emanuelect commented 2 years ago

so can it be fixed?

Blisto91 commented 2 years ago

I'm not a dev, so dunno. I just tried to help gather some data 😁

emanuelect commented 2 years ago

ah ok, thank you very much.

K0bin commented 2 years ago

Also @K0bin isn't DxvkMemoryAllocator: Memory allocation failed maybe a 32 bit memory issue? Even tho the allocated seem low.

Yes. That indicates it's just #1318 again. That would also explain why the Steam version works on Linux. Proton automatically enables LAA, so the game gets another gigabyte of address space.

Try using an LAA patcher with the exe.

On the other hand, it's a bit weird that it happens when we've only used 145MB of system memory for Vulkan allocations.

The apitrace replays just fine, so there's not a lot I can do.

Blisto91 commented 2 years ago

I will try to take a peek at it again on windows. Tho i don't have much technical insight into dxvk or debugging stuff like this.

emanuelect commented 2 years ago

I tried LLA patcher, initially I got a steam error and the game would not start, So I thought I would try using a crack on the game and it started. Also msi afterburner which wasn't working before, now works. I have noticed improvements in the performance of the game, before I could play it in 2k maximum, now I can play it in 4k. The only problem is that the game seems to block randomly and looking at msiafterburner, when it crashes for a few moments the writing d3d9 pops up, as if trying to replace the vulkan.

Blisto91 commented 2 years ago

When i try to LAA patch it then it just refuses to launch 😁

emanuelect commented 2 years ago

It does not work because there is a conflict between steam and LLA patcher, I wrote it above, you need a crack to disable steam.

Blisto91 commented 2 years ago

Oh yea. Misread that part.

Edit: Could you post new logs?

emanuelect commented 2 years ago

Bully_d3d9.log

emanuelect commented 2 years ago

I've played a few games and I think the freezes are caused by the shaders, because walking into areas that have already been visited, the game doesn't freeze. I also tried restarting the game after long games. I noticed that the game has its own folder called shader-binaries, maybe vulkan can't use it.

Blisto91 commented 2 years ago

You could try to add dxvk.enableStateCache = False to the conf file and see if it makes a difference.

I still plan on testing this more at some point when i get a crack to i can run it with LAA without steam complaining. Unless you figure everything out beforehand ofc.

emanuelect commented 2 years ago

I was reading that the configuration file is called dxvk.conf and that it should be in the game folder, but it's not there.

emanuelect commented 2 years ago

Sorry, I didn't think it couldn't be done having the original game.

Blisto91 commented 2 years ago

I was reading that the configuration file is called dxvk.conf and that it should be in the game folder, but it's not there.

You have to create one yourself. Make sure the file extension is .conf and you aren't creating a text file called dxvk.conf.txt. You can put the hud in there dxvk.hud = 1 also to verify it picks it up.

Sorry, I didn't think it couldn't be done having the original game.

Wdym

emanuelect commented 2 years ago

Bully Scholarship Edition Screenshot 2022 04 23 - 20 16 50 23 The hud works. I moved the cache file and tried the string: dxvk.enableStateCache = False Unfortunately I didn't notice any difference. However it doesn't matter, because the game freezes are now almost completely gone. When I complete the game, maybe it would be useful to share the bully.dxvk-cache file.

Blisto91 commented 2 years ago

On linux they are shared through the steam shader downloads (afaik) so it would mostly be useful for windows users. Also i think the other person need to have a similar gpu and driver and dxvk. Else i think it will just generate new cache anyway. Tho i'm not sure about it.

emanuelect commented 2 years ago

I had read on reddit a page dedicated to apex, where users were sharing the file to not have freezes. https://www.reddit.com/r/linux_gaming/comments/t5xrho/dxvk_state_cache_for_fixing_stutter_in_apex/

Blisto91 commented 2 years ago

Can you check if K0bin's new PR https://github.com/doitsujin/dxvk/pull/2663 helps with the crashes/freezes with and without a LAA patch or probably more important without a cache if this was your issue. Link to latest version as of this moment: https://github.com/doitsujin/dxvk/actions/runs/2570371500

Edit: Updated. K0bin has further improved it and fixed some crash issues introduced in the branch

K0bin commented 2 years ago

This should be fixed now. Please reopen if it's not.

LethalManBoob commented 21 hours ago

For me, its still borked with dxvk

K0bin commented 21 hours ago

Then please make an apitrace so I can look into it. https://github.com/doitsujin/dxvk/wiki/Using-Apitrace

LethalManBoob commented 21 hours ago

Okay as completly strange, random and annoying as this is. Somewhere long the lines this began working again with no issue. It might have somthing to do with the mods I installed that improve the games compatability. I will try later with an un modded build.