While I can't reproduce the crash after the intro video with the apitrace, the game seems to heavily rely on DXGI's internal COM reference counting behaviour which seems to be causing the issues when using DXVK.
This is going to be incredibly hard to figure out. I'll give it a try, but don't expect any results any time soon.
The following patch should fix the crash after the intro video. This is semi-related to #302 with some additional issues mixed in.
dxvk-ref-hack.patch.txt
Please keep in mind that this is not a proper fix and may break other games. This also will not affect any fullscreen-related issues.
With this patch the game runs as expected in windowed mode.
This patch adds another hack to allow the game to start in fullscreen mode. Note that this includes the previous patch, so if you have that applied, run git reset --hard.
Again, no proper fix as that will be a lot more involved and may require some refactoring. While DXVK's internal reference counting does differ from native D3D11/DXGI behaviour in some ways, the game doesn't do proper reference counting by itself and just deletes all references of an object when it thinks that the object is no longer needed. This is exceptionally poor coding on Sega's side.
Note that changing the resolution in game or switching to/from fullscreen mode still doesn't work. The game deadlocks during the transition, but that seems to be a general issue with wine.
Both the fullscreen crash and the crash after the intro are fixed in latest master. The solution is bad but it's the best thing I could come up with for now. This also fixes the aforementioned Unreal Engine 4 issues.
Feel free to re-open or file a new report if you run into new issues with the game (given how broken the game is, I wouldn't be surprised at all).
The game indeed does not crash when launched in full screen anymore, but it only renders the first frame and then the whole window just turns black.
I think this might actually be an issue with Wine, because with wined3d there also is a fair share of crashes on launch.
Hm, I can actually get into the game without issues, with both wined3d and dxvk. What hardware/drivers are you running?
Radeon RX560 with llvm7-git and mesa-git.
Firstly, thank you doitsujin for the workaround patches and I can confirm that the game now mostly works. Secondly, I'm actually experiencing the black screen issue as well, although it seems to only be triggered if I start the game in fullscreen, whereas launching the game and then later switching to fullscreen with Alt + Enter works fine.
As a workaround I can suggest editing:
"WINEPREFIX location"/drive_c/users/"username"/Application Data/Sega/Yakuza0/graphics.ini
And setting Windowed=1. You might want to mark the file as read-only as the game might try to save the change to fullscreen permanently.
Now that's interesting. When I launch the game in fullscreen mode, everything works fine, but when I switch to fullscreen mode from the game menu, or even when changing the resolution, it deadlocks in the Win32 function MoveWindow for no apparent reason. This doesn't look like it's my fault though.
You might be experiencing the same deadock at the start of the game.
Is there any way to verify this? perf top doesn't show anything related to MoveWindow.
It's a deadlock, so the function is not actively doing anything, but stuck waiting on an event. You can attach gdb to the process and check what the threads are doing with thread apply all bt. One of them should have MoveWindow or a similar win32 function in it's call stack.
For me, this happens with both DXVK and wined3d.
Well, once I rebuilt Wine with debugging symbols the game started crashing again in fullscreen, windowed, with wined3d and DXVK. Maybe OP will have more luck with this.
Just a quick note that this game is completely unplayable at least on AMD hardware at the moment, even with wined3d, and that I will ignore any future bug reports about it.
WINEPREFIXx1 2018-08
So there are two issues with Yakuza 0 under DXVK, which I'll split out to separate bug reports if needed.
Firstly, fullscreen and borderless mode are broken with DXVK and this game, while windowed + virtual desktop works. The game will immediately crash if launched with fullscreen or borderless, or switched to after the game is running.
The bug does not affect vanilla Wine. The bug does also affect native Windows + DXVK (but not Windows without DXVK).
Secondly, with DXVK + Wine and windowed + virtual desktop mode, the game will crash after the intro video. The bug does not affect vanilla wine, and it does not affect native Windows + DXVK. So the issue only affects Wine + DXVK, specifically.
I've attached an apitrace for native Windows (I could not successfully generate an apitrace with vanilla wine).
I also couldn't replay the trace with Linux apitrace (I'm not sure if windows apitrace is required), but it appears to have worked. DXVK traces do work so if that is useful in addition, I can also supply an apitrace for that.
Software information
Yakuza 0, windowed mode, then switched to fullscreen at the end of the trace
System information
Apitrace file(s)
Log files
d3d11.log:
Windowed mode (both fullscreen and windowed were the same here)
dxgi.log:
Windowed mode
Fullscreen mode