doitsujin / dxvk

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

error wine c++ runtime library assertion failed "vkdestroyimageview" that occurs in the sims 4 when trying to back into the game (live mode) after being in CAS. #4360

Closed ismi-ismi closed 6 days ago

ismi-ismi commented 1 week ago

Please describe your issue as accurately as possible.

so you go to CAS, edit some stuff and click checkmark or x and then loading start (the game try to put you into live mode), game crashed (with errors below in the attachment file). it does not happen every time but it is repeatable. other people with the same problem: https://old.reddit.com/r/linux_gaming/comments/1foklrr/easy_fix_for_error_wine_c_runtime_library/ (In my case, changing to directx9 doesn't fix the problem) https://github.com/ValveSoftware/Proton/issues/4174#issuecomment-2399747835

Software information

The Sims 4 (v1.109.207.1020), Game Settings is medium and using directx11 Using Lutris 0.5.14

System information

Log files

r39bjorx0tqd1

Blisto91 commented 6 days ago

Thank you for the report. I can reproduce the loader_thunks crash with 2.4.1. With current master i haven't seen that appear as a popup or in log, but the game can still crash doing the same reproduction steps.

Likely validation layer error of interest:

err:   VUID-VkWriteDescriptorSet-descriptorType-02996: 
err:   Validation Error: [ VUID-VkWriteDescriptorSet-descriptorType-02996 ] Object 0: handle = 0x555594029b10, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x1cc3d039 | vkUpdateDescriptorSets(): pDescriptorWrites[13].pImageInfo[0].imageView Invalid VkImageView Object 0x8e81ea0000012cc3. The Vulkan spec states: If descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the imageView member of each element of pImageInfo must be either a valid VkImageView handle or VK_NULL_HANDLE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-02996)

Apitrace made on Windows that is able to reproduce the issue on my RTX 4080. The issue is racy so may take some tries on other setups. https://drive.proton.me/urls/WAZM1YAM0R#OtrndOZ8eas6

doitsujin commented 6 days ago

Haven't fully tracked it down yet but this is starting to look like another use-after-free bug in the game. This is insane, how does this garbage even work on Windows?

S1m1-oddity commented 6 days ago

I'm having same issue but I can use dx9 with no issue by selecting it in game options. With dx11 I have tried ge-proton, umu-proton (which is having issue), wine-tkg. I haven't tried wine system 9.12. I can switch to dx9 and use all them with no issue. I'm on current lutris 0.5.17. Dxvk v2.4.1 Endeavouros 6.11.1-arch 1-1 Xfce X11 650 drives Nvidia geforce rtx 3050

doitsujin commented 6 days ago

Should be fixed for real as of 35ead8592980c144dc8fb77b9d95ecc948af0814. Unfortunately, the thing that I did in an attempt to fix it in 2.4.1 gets optimized away in release builds because compilers kind of assume that freeing something means you don't intend to use it again.

But this is Sims 4, we free all our textures before using them for rendering around here.

Blisto91 commented 6 days ago

Build with the fix can be downloaded here https://github.com/doitsujin/dxvk/actions/runs/11343634899

Rain-Gayming commented 5 days ago

how does this fix work @Blisto91 do i just replace the dlls in the game im playing or is it something else?

Blisto91 commented 5 days ago

Depends on what launcher (or not) you use to play the game

Rain-Gayming commented 5 days ago

i'm using lutris & wine for it

Blisto91 commented 5 days ago

In the location that Lutris stores the dxvk versions make a folder for the dxvk version you want to use. Name it what ever. The screenshot below shows the location on my setup but it might differ when using flatpak or other.

Make folder ![image](https://github.com/user-attachments/assets/ade1bf60-b634-498d-adc0-7c8321e09eae)

Extract the x32 and x64 folders from the downloaded archive in to said folder.

Extract ![image](https://github.com/user-attachments/assets/ad610c15-e150-41de-b8de-eba72aca18b6)

Open Lutris --> right click on the game/launcher --> click "Configure" --> go to "Runner Options" --> enable "Advanced" in the top right corner --> at the DXVK option click the dropdown button and select the folder name you made in step one --> press "Save" in top right corner.

Configure Lutris ![image](https://github.com/user-attachments/assets/212cccf7-f88e-4880-9765-210988ba27dc)

When the next stable release drops (2.5) you can just use that instead. I believe Lutris auto selects latest if Advanced isn't enabled. (but don't quote me on that)

ItsCryptic commented 5 days ago

How do I do this on steam?

Blisto91 commented 5 days ago

You can use Bleeding Edge which already have it. Beware that Bleeding Edge is less tested than regular Experimental