RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.33k stars 1.91k forks source link

Vulkan always crash #4756

Closed 0-Satanael closed 6 years ago

0-Satanael commented 6 years ago

In Persona 5 The Game open normally but after skipping the intro movie the emulator crash OS: Windows 7 x64 SP1 CPU: Ryzen 1600x @3.8GHZ Rams: 16GB @3200mhz GPU: Radeon HD 7730 1GB i know its sort of old but it supports Vulkan. all drivers and bios are updated i know this isn't for support but i believe its an issue since other games on my PC such as doom run normally with Vulkan Thanks for your Great Efforts untitled2 RPCS3.log

AniLeo commented 6 years ago

There is nothing in the log related to the crash. You need Thread Scheduler On for better performance, not that it should matter for that crash.

Issue needs more information though, with what error does it die, or does it just freeze?

0-Satanael commented 6 years ago

it stays on the black screen with no sign of anything and the window title info just freeze but the application seem to be responsive. is there any other logs i can provide? enabling Thread Scheduler make the game audio stutter a little bit

Bitr0t-Zygzz commented 6 years ago

Could it be related to my amdvlk64.dll crash issue. I cant really pinpoint it either for now but im willing to do testing.

System: Ryzen 1700 GPU RX 580 RPCS3 Build: 6940

Error Replication: Enter Persona Skill menu. Crash 100% of the time. Only when using Vulkan vulkan error Can also happen in other parts of the game. Complete crash it just shows that error and then closes both game and rpcs3 menu

Fixed by using Farseer(unoffical build).

Edit: steps already done.

Edit2: Insider and 1709 both replicates

kd-11 commented 6 years ago

The issue reported by OP might have nothing to do with vulkan. Does OGL work? Does it work with interpreters? If the renderer actually freezes without throwing a fatal error the emulator cannot be closed, you have to end the process via task manager. Is this what happens? @Buzing I can investigate your issue in a bit, hopefully it also affects older gcn. I am curious if you are using custom config, there are some AMD driver bugs that have workarounds that can be disabled in config.yml and will result in such a crash.

Bitr0t-Zygzz commented 6 years ago

@kd-11 ah no not really using a custom config. Ogl works nicely for me so I've been using it for now

As for my testing i've reset the config before reswitching back to vulkan. I might have forgotten to reset the actual emulator config and only the game. I shall try to clean all configs tomorrow.

Edit: Tested with clean configs and only setting swapped is vulkan Edit 2: replaced image with debug images. vulkan

Force crashed

MSuih commented 6 years ago

I am unable to reproduce that crash on my RX 480. Tested on 6953 as well as KD's PR.

Bitr0t-Zygzz commented 6 years ago

@MSuih interesting hmmm are you using an Intel cpu and what version is your game. Us or eu ?

MSuih commented 6 years ago

Ryzen 5 1600 and NPEB02436

Bitr0t-Zygzz commented 6 years ago

Same. I'll try recinding my bios to default. Other than that I'm using the latest windows insider hmm.. maybe that's why . I'll go download the non insider asap.

0-Satanael commented 6 years ago

@kd-11 yea exactly it just stay black and when i try to close it .it freezes and i have to end it by task manager i don't use DLC OR Any types of mods so is there anyway around to fix it? like manipulating config.yml?

Bitr0t-Zygzz commented 6 years ago

@amateur-tester can you answer the rest of the questions though like does other modes work

Update: Windows 10 Insider' latest' and 1709 replicates the crash. Under driver of 18.6.1

If it doesn't happen to older gens I wonder what's wrong with the 580 hmmm

Update 2: Changes in 6638 is causing the crashes. Builds before 'seem' to not have the same immidiate crash.

0-Satanael commented 6 years ago

@Buzing other modes are working everything works fine except Vulkan that's the only problem i face i want Vulkan for a good reason OGL FPS drop real badly in some scenes which contain many details and as i mentioned above Vulkan is working perfectly when i play doom. tried many options but nothing worked with Vulkan do you recommend me a combination of options? maybe i missed something

Bitr0t-Zygzz commented 6 years ago

@amateur-tester trythe farseer build just in case. and or clearing the shader cache if you havent. it might just be a conflict.

farseer unoffical build: (backup your save file if you have one) https://ci.appveyor.com/project/rpcs3/rpcs3/build/0.0.4-7799/artifacts

MSuih commented 6 years ago

There is a sligtly newer version of Farseer's build on the RPCS3 Discord, in a pinned message on #help channel.

Edit: Or at least I think it is newer, can't remember which version was which anymore.

0-Satanael commented 6 years ago

@Buzing farseer build seem to be working flawlessly but i have question when the fix is going to be implemented in the official build of RPCS3? thank you all for the big help

kd-11 commented 6 years ago

Tried with 7870/R9 270 card with the build from my latest work (https://github.com/RPCS3/rpcs3/pull/4752) and everything works just fine with these settings: image Due to technical reasons I was forced to make rpcs3 use some very unsafe methods recently. Its probably why there are crashes on some cards/drivers and not others. I'll add correct path for it if it crashes things, only trade-off will be loss of performance.

Bitr0t-Zygzz commented 6 years ago

Ah. Thanks for the update! Take your time :)

0-Satanael commented 6 years ago

@kd-11 i tried your latest build (0.0.0.6-6958) still the game doesn't go past the intro movie while the old farseer build worked fine

KMGuertena commented 6 years ago

I'm having the same issue in both the latest master and the farseer build with an R9 390. It only happens when using Vulkan as the renderer. I've tried the settings above and it still crashes, with the same error as both screenshots above. I've tried reinstalling the drivers twice. I'm using driver version 18.6.1 RPCS3.log

Edit: It happens when: A) Using the Persona menu B) Switching scenes through a loading screen C) Exiting a cutscene

CPU: i5 4690K RAM: 16 GB GPU: R9 390

Bitr0t-Zygzz commented 6 years ago

@KMGuertena did you clear the shade cache Everytime you switched builds(when you tried farseer) ? And yeah agreed it crashes on those parts.

KMGuertena commented 6 years ago

@Buzing Yup, it would usually just delay the crashing for a bit.

Yukonz commented 6 years ago

Can confirm Persona 5 100% crash with Vulkan on latest master build (6956) right after loading the first save. Shader cache is cleared. All settings is set by default. GPU: RX Vega 64, driver 18.6.1 Piccy.info - Free Image Hosting RPCS3.log

TristisOris commented 6 years ago

v6956, Nier Replicant, win10 1803, ryzen 2600, rx 580.

on error emulator is hangs up.

default

RPCS3.log

Bitr0t-Zygzz commented 6 years ago

After sifting through 20 builds I have concluded that Build 0.0.5 6590 https://github.com/RPCS3/rpcs3/pull/4312

is possibly related to the crash. as build 6579 works ok (further testing needed)

@MSuih can you test it with build 6579

kd-11 commented 6 years ago

I have 18.5.1, maybe thats why it doesn't crash for me?

MSuih commented 6 years ago

@Buzing Tested, 6590 works fine on 6.1

@kd-11 You're correct, I downgraded to that version and crashes are gone.

Bitr0t-Zygzz commented 6 years ago

I have a feeling 18.5.2 is also affected since that was the driver I first tested with

@MSuih thanks for the discovery

KMGuertena commented 6 years ago

I can confirm it's gone for me as well (at least so far) with 18.5.1. I did figure it had something to do with the driver version. I guess I was just kinda lazy and decided not to downgrade.

kd-11 commented 6 years ago

Thank you for confirming. I'll try to isolate the bug and devise a workaround since AMD doesn't seem to care about bug reports.

kd-11 commented 6 years ago

Turns out its worse than I thought. On my card even the official cube sample crashes immediately on launch with a nullptr dereference. There exists an alternative swapchain implementation that will work around this issue if enabled (usually only kicks in if you run rpcs3 without an active display) but its very slow and not a real solution, so I will not add a config option to forcefully enable it. AMD will have to fix this one.

kd-11 commented 6 years ago

https://community.amd.com/message/2866277

kd-11 commented 6 years ago

@amateur-tester Install lunarG SDK from https://vulkan.lunarg.com/ and run the cube sample from C:\VulkanSDK\1.1.73.0\Bin\Cube.exe and see if it crashes immediately for you as well.

For a bit of extra info, there is nothing that precedes the crash, just swapchain creation and image clearing followed by an attempted present with no drawing in between. I'm surprised this driver shipped in this state.

0-Satanael commented 6 years ago

oh i forgot to tell you i never install optional drivers i only install recommended drivers and my current driver is 18.5.1. cube.exe was crashing with error message "failed to load textures" but it was fixed after installing runtime files but persona 5 still can't go past intro movie untitled

Bitr0t-Zygzz commented 6 years ago

@amateur-tester Meaning we have two separate problems ? is your crash still "amdvlk63" or something else? and the other being the one with 18.6.1

can you check your vulkan version in radeon panel image

waere00 commented 6 years ago

18.5.2 driver - Unnamed 5 crashes during save loading (or exactly after? - when it starts compiling shaders) https://i.imgur.com/kUKIxY9.png - crash error; https://i.imgur.com/LUfYxwa.png - AMD Settings panel shot. OpenGL renderer is working fine AND Cube.exe is working fine (or at least without crashing) (both 32bit and 64bit). RPCS3-crashvulkan.log.gz 18.5.1 driver works as expected; Cube.exe too of course. - https://i.imgur.com/ZQCaWBi.png - AMD settings panel shot; i5-4670K 4.5GHz, 16GB 2133MHz RAM, R7 260X 2GB GPU, Windows 10 1607 x64.

kd-11 commented 6 years ago

How can we all have different issues? For me all vulkan applications crash instantly upon starting if they try to use the AMD card. I do have an nvidia card also installed, but then again 18.5.1 works flawlessly and only 18.6.1 crashes.

Bitr0t-Zygzz commented 6 years ago

@kd-11 it seems amateur tester is the only one experiencing vulkan crash on 18.5.1 . Everyone else agrees it works well on 18.5.1 including me

kd-11 commented 6 years ago

I have identified another bug in the driver and updated the issue report which fixes my problem (AMD card is not usable unless display is attached to it directly). There is indeed another crash in vkCreateGraphicsPipelines, hopefully its not something we cannot work around.

kd-11 commented 6 years ago

Looks like someone else already reported something similar https://community.amd.com/thread/229446

kd-11 commented 6 years ago

Reported here https://community.amd.com/message/2866456 It is not something fixable on our end without AMD intervening. Therefore use driver 18.5.1 until we get feedback on what about the spirv is making their driver unhappy.

0-Satanael commented 6 years ago

@Buzing as i mentioned before any Vulkan app/game works just fine on my PC except RPCS3 emulator in Persona 5 after skipping the intro movie there is just blackscreen no error messages that's all this is the problem from the start i have strong believe that the issue related to RPCS3 because the old farseer version worked flawlessly and the newest version can't even go past the intro movie

Bitr0t-Zygzz commented 6 years ago

@amateur-tester if you have read it has been mainly determined that the issue lies with drivers 18.5.2 and above.

I'm not trying to invalidate your responses but rather you told us that 18.5.1 crashes on the latest build which is a separate/another issue by it's self.

I know farseer works since it's the exact version I used to use. But I rolled back my driver to 18.5.1 and the game works on the latest builds.

0-Satanael commented 6 years ago

@kd-11 Update: after alot of digging i figured that the problem is related to the official source code. this is the build which broke Vulkan render for Persona 5: https://github.com/RPCS3/rpcs3/pull/4265 or newer gives a black screen untitled1

The last Working build but it freeze when it start compiling shaders when the mission starts: from build https://github.com/RPCS3/rpcs3/pull/4011 to https://github.com/RPCS3/rpcs3/pull/4026 working but freeze the whole PC during compiling shaders and i have to restart by reset untitled2 https://github.com/RPCS3/rpcs3/pull/4061 is The Last Fully Working Build untitled

i hope this is helps in fixing the issue if you want any more info i will be glad to help

kd-11 commented 6 years ago

Your issue is unique which is unfortunate, its not possible to debug if we cannot recreate it. This happens even on 18.5.1? Maybe the amd compiler issues go back further for the 7730, but my 270 which is a rebranded 7870 should be the same in theory but it works fine. Usually driver issues will manifest like that, after some new feature is added, but I'm yet to encounter someone else with this specific issue. You said the renderer freezes ans doesnt actually segfault, which could point to a timing problem, but to debug any further you would need to set up a development environment and build rpcs3 from source on your machine.

0-Satanael commented 6 years ago

yea my driver is 18.5.1 and for the other issue yea there is no segfault or any error messages so there is no hope for sending reports or logs right? i didn't really understand the last part which you mentioned. about setting up development environment this is sounds too advanced to me but i guess i can try if that is going to help

imatrisciano commented 6 years ago

I'm having issues as well. Looks like some shaders make rpcs3 crash with a segfault in amdvlk64.dll The emulator crashes immediately after boot when using OpenGL with a segfault in atio6axx.dll

This happens when using the latest AMD driver (Adrenalin 18.6.1; Vulkan Driver version 2.0.33; Vulkan API 1.1.73)

I'm using: Windows 10 Pro Build 17134 Intel i5 3570k Ivy Bridge AMD HD 7870 Pitcairn

LunarG cube.exe test works fine for me. I'm also experiencing a crash outside rpcs3, in the PC game "A Way Out" when loading a different map. Really looks like this driver version doesn't like loading some kind of shaders.

PS: Downgrading to AMD Adrenalin 18.5.1 fixes the shader compiling problem. Both Unnamed 5 on rpcs3 and A Way Out on Origin are playable again. atio6axx.dll still segfaults when booting Unnamed 5 using OpenGL:

screenshot 2018-06-22 23 14 35

kd-11 commented 6 years ago

@amateur-tester You mentioned the emulator was responsive, something I failed to spot before. Does this mean the emulator can be closed normally? If thats the case, then it has nothing to do with graphics settings. If the renderer crashes, you get a crashbox or a VK_ERROR_DEVICE_LOST fatal error or the emulator truly freezes (cannot be closed unless you use task manager). Try removing all the cpu options (no loop detection for example, you dont need it on ryzen, auto spu threads to start with and then set to 2) and also remember to try using Null renderer. Vulkan runs faster than OpenGL internally, and this can mess up timings somewhat.

0-Satanael commented 6 years ago

@kd-11 for Vulkan Render still the same result in the newer builds gives a black screen and the older builds which i mentioned above it freeze my whole PC as soon as the mission starts so i had to press on the reset button the null render gives a white screen but it's totally responsive. such information is useless right?

Andreyogld3d commented 6 years ago

The same problem: https://community.amd.com/thread/229559 https://community.amd.com/thread/229579

0-Satanael commented 6 years ago

@Andreyogld3d i still believe it's not the driver because i got v18.5.1 and still can't get it to work with Persona 5 and RPCS3 besides all other Vulkan Apps are working on my PC here is a proof this is PPSSPP with Vulkan enabled untitled i just added more info to my previous comment https://github.com/RPCS3/rpcs3/issues/4756#issuecomment-399311251