Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Death end re;Quest (990050)

Open trenton4k opened this issue 6 years ago • 26 comments

Compatibility Report

  • Name of the game with compatibility issues: Death end re;Quest
  • Steam AppID of the game: 990050

System Information

  • GPU: NVIDIA Corporation GeForce GTX 1070 Ti/PCIe/SSE2
  • Driver/LLVM version: NVIDIA 418.56
  • Kernel version: 5.0.0-15-generic
  • Link to full system information report as https://gist.github.com/trenton4k/300c294e4d8b13988b81c5e45f73fe2a
  • Proton version: 4.2.4

I confirm:

  • [y ] that I haven't found an existing compatibility report for this game.
  • [y ] that I have checked whether there are updates for my system available.

steam-990050.log Application_dxgi.log

Symptoms

crashes on startup

Reproduction

-Go to the game tab -Force the game to be played via proton 4.2-4 -Download -Click play

trenton4k avatar May 18 '19 10:05 trenton4k

This should at least fix the crashes:

https://github.com/FNA-XNA/FAudio/commit/6c950f6f2e0367f9c5231b59ec6e3e4e50394dc8

That said, the only reason this would happen is because engine parsing failed... will look into this next.

flibitijibibo avatar May 20 '19 18:05 flibitijibibo

Another fun thing: They check for renderers before doing anything else, which for FACT means making sure the audio subsystem is initialized:

https://github.com/FNA-XNA/FAudio/compare/6c950f6...d86fa1a

This covers all the obvious stuff, though this doesn't get everything... in addition to using XACT (which I'm guessing means xWMA data, but I haven't checked) they also appear to have a custom ReadFile/GetOverlappedResult implementation, which we're supposed to be able to support but it looks like my use of the callbacks confuses the engine and returns error codes. Worse, whenever the engine fails to initialize they appear to just start the engine over and over again, which is convenient for me and anyone looking at this with a debugger but extremely annoying for everyone else.

flibitijibibo avatar May 20 '19 19:05 flibitijibibo

One last discovery before I call it for the day: The reason reading fails is because they're using asynchronous file reading, so after calling ReadFile we have to check for STATUS_PENDING and wait until the return code is valid:

https://github.com/FNA-XNA/FAudio/commit/f8745c84ee9340470e6d297d9d33402e737f72cd

(Annoying sidenote: They had the sense to make ReadFile/GetOverlappedResult customizable, but they didn't have the sense to allow for custom manual reset events, so we can't cleanly use events like the Win32 API allows, but instead sleep(0) a whole bunch until we get the code...)

Something still seems to be wrong though, as the game never hits a point where it sets Internal to 0, so it's just pending forever. Our new behavior is AFAIK more correct but for this title it'll deadlock, unless something magical happens that I haven't seen yet.

flibitijibibo avatar May 20 '19 21:05 flibitijibibo

so how to fix the start up issue?

maqip avatar May 22 '19 16:05 maqip

The easy version: Wait until FACT supports the custom file I/O callbacks. This might be a while.

The hard version: Someone needs to find out why their callbacks never let us leave this loop:

https://github.com/FNA-XNA/FAudio/blob/master/src/FACT_internal.c#L85

flibitijibibo avatar May 22 '19 16:05 flibitijibibo

could you help me? the game doesnt start up i have even reinstalled the game . no good anyway to fix it? sorry for saying it here. the game work before. just getting a black window of death

maqip avatar May 22 '19 17:05 maqip

Apparently by "a while" I meant a couple hours... I read the XACT spec more carefully and noticed this line:

The file that is referenced by this handle must be opened with the following CreateFile flags: FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING.

So when we asked for data based on unaligned sizes, ReadFile would bail on us and give us an irrelevant error code, causing a deadlock. This fixes the game completely for me:

https://github.com/FNA-XNA/FAudio/commit/1dbe3ca25935003709bec9fb396ecd08a2efddbd

I don't think the next Proton release will have the latest FAudio, but maybe the release after that will (by then 19.06 should be out).

flibitijibibo avatar May 22 '19 18:05 flibitijibibo

help https://www.youtube.com/watch?v=C_k4PBYs5-o

maqip avatar May 26 '19 02:05 maqip

I'm having a slightly different issue with 4.2-7. The first issue is that the opening cutscene after starting a new game gets stuck when the main character gets stabbed which forces you to progress through the game by skipping the rest of the cutscene. The second one is that some of the audio cuts out after a bit when playing.

None of these issues happen on 3.16-9.

System Info

I did not record any logs of the issues, but I can do so if you want.

EnderShadow avatar Jun 26 '19 03:06 EnderShadow

the game keeps randomly crashing sometimes as soon as 15 minutes other times it will take as long as 3 hours to crash. steam-990050.log sysinfo

zany130 avatar Feb 08 '20 01:02 zany130

Death end re;Quest (990050), Crashes in-game

Issue transferred from https://github.com/ValveSoftware/Proton/issues/3933. @CygnusTerminal posted on 2020-06-03T14:31:18:

Compatibility Report

  • Name of the game with compatibility issues: Death end re;Quest
  • Steam AppID of the game: 990050

System Information

  • GPU: RX 480
  • Driver/LLVM version: Mesa 20.0.7
  • Kernel version: 5.6.15-arch1-1
  • Link to full system information report as Gist: https://gist.github.com/CygnusTerminal/b7198c3f50dd887eeb42aac4643d9a6c
  • Proton version: 5.0-7

I confirm:

  • [ ] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

LOG: steam-990050.log Line of interest: 1356.376:00c0:00c4:trace:seh:RtlRestoreContext returning to 7b475ca6 stack 32de60 1519.584:00c0:00fc:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 00fc, blocked by 00c4, retrying (60 sec) 1519.833:00c0:018c:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 018c, blocked by 00c4, retrying (60 sec) 1529.905:00c0:0150:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 0150, blocked by 00c4, retrying (60 sec)

Symptoms

Game freezes and never recovers. Sometimes is instantly, sometimes takes a good while

Reproduction

Launch the game with Proton 5.0 Play until the freeze Kill the .exe

kisak-valve avatar Jun 03 '20 14:06 kisak-valve

Death end re;Quest (990050), Crashes in-game

Issue transferred from #3933. @CygnusTerminal posted on 2020-06-03T14:31:18:

Compatibility Report

* Name of the game with compatibility issues: Death end re;Quest

* Steam AppID of the game: 990050

System Information

* GPU: RX 480

* Driver/LLVM version: Mesa 20.0.7

* Kernel version: 5.6.15-arch1-1

* Link to full system information report as [Gist](https://gist.github.com/): https://gist.github.com/CygnusTerminal/b7198c3f50dd887eeb42aac4643d9a6c

* Proton version: 5.0-7

I confirm:

* [ ]  that I haven't found an existing compatibility report for this game.

* [x]  that I have checked whether there are updates for my system available.

LOG: steam-990050.log Line of interest: 1356.376:00c0:00c4:trace:seh:RtlRestoreContext returning to 7b475ca6 stack 32de60 1519.584:00c0:00fc:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 00fc, blocked by 00c4, retrying (60 sec) 1519.833:00c0:018c:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 018c, blocked by 00c4, retrying (60 sec) 1529.905:00c0:0150:err:ntdll:RtlpWaitForCriticalSection section 0x100a8 "../../../../proton/wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 0150, blocked by 00c4, retrying (60 sec)

Symptoms

Game freezes and never recovers. Sometimes is instantly, sometimes takes a good while

Reproduction

Launch the game with Proton 5.0 Play until the freeze Kill the .exe

Thanks @kisak-valve, i'll try Proton 3.16 and see if the crashes are reproducible.

CygnusTerminal avatar Jun 03 '20 14:06 CygnusTerminal

Update: Proton 3.16-9 Works perfectly. No freezes, no crashes.

CygnusTerminal avatar Jun 04 '20 13:06 CygnusTerminal

Hello, I've tried to plat this game with proton 5.13-6 and 6.3-1. It rendered a black window and crashed. steam-990050.log

Thanks in advance :pray:

Awlexus avatar Apr 05 '21 17:04 Awlexus

Hello @Awlexus, these look like some lines of interest from the log:

fixme:xact3:IXACT3EngineImpl_Initialize pXAudio2 parameter not supported!
fixme:xact3:IXACT3EngineImpl_Initialize pMasteringVoice parameter not supported!

kisak-valve avatar Apr 05 '21 17:04 kisak-valve

HI @kisak-valve, thanks for pointing this out, I installed xact and xact_x64 with protontricks, but that didn't help much. I also tried to enable PROTON_USE_WINED3D, but that didn't help either (Reduced the amount of fixme events). I'm new to this, is that what I was supposed to try?

new_steam-990050.log

Awlexus avatar Apr 05 '21 17:04 Awlexus

I cannot even get the game to start with 3.16, and 5.0 works, but still suffers from crashes. Anything else brings down my X server when loading into the game.

Edit: Log of 3.16 attempt

kozross avatar May 09 '21 04:05 kozross

Game still crashes with versions over 3.16, and now it also stutters and freezes for seconds with music playing in the background https://gist.github.com/CygnusTerminal/5547f809ddd8f25319aee67235d29ffa steam-990050.log

CygnusTerminal avatar Nov 16 '21 01:11 CygnusTerminal

This game now works with Proton 6.3-8 with native xact installed, but has a massive performance regression with Proton 7.X/Experimental/GE-Proton with severe stuttering and low FPS. It looks like the game itself has weird technical problems on top of that, so this isn't surprising.

aqxa1 avatar Jul 19 '22 14:07 aqxa1

Hello @aqxa1, please add PROTON_LOG=1 %command% to the game's launch options, reproduce the performance issue and attach the generated $HOME/steam-$APPID.log to this issue report as a file. (Proton logs compress well if needed.) Also, please copy your system information from Steam (Steam -> Help -> System Information) and put it in a gist, then include a link to the gist in this issue report.

kisak-valve avatar Jul 19 '22 14:07 kisak-valve

@kisak-valve Gameplay with troublesome performance happen after around line 11250. Dumps occuring every second. steam-990050.log

The same performance issue also happens in #4135 .

Here is my System Information: https://gist.github.com/Snaggly/f466b56af17c6fa5334247bac66e6128

Snaggly avatar May 28 '23 17:05 Snaggly

Hello @Snaggly, it might be interesting to test how the game behaves with the game's launch options set to WINE_CPU_TOPOLOGY=2:0,1 %command%.

kisak-valve avatar May 28 '23 18:05 kisak-valve

Hi @kisak-valve , thank you for your quick reply! Adding that launch option massively improved performance. Despite some lag spikes it's running much smoother now. Screenshot_211

Snaggly avatar May 28 '23 18:05 Snaggly

I don't know if this is the right place to report it, but I just wanted to say I had the same stuttering/performance issues in the sequel Death end re;Quest 2 (1266220) and kisak-valve's advice fixed them. Thank you!

Performance was fine in the 2D visual-novel style scenes but 3D scenes were very choppy. Strangely radeontop showed GPU clock and usage to be very low during the 3D scenes, much lower than 2D scenes.

Adding WINE_CPU_TOPOLOGY=2:0,1 %command% helped a lot. I still had a bit of stuttering so I went even further to WINE_CPU_TOPOLOGY=1:0 %command% and it's running perfectly now. Right now I'm actually using WINE_CPU_TOPOLOGY=1 %command% , my understanding is it still limits it to one thread like WINE_CPU_TOPOLOGY=1:0 %command% but doesn't pin the game to a particular core (core zero in that case). I also experimented with WINE_CPU_TOPOLOGY=4:0,1,2,3 %command% but the stuttering was horrible again.

If it helps I'm running Debian 12, Flatpak version of Steam, 5800X and 6700XT, using Proton Experimental.

poisonsnak avatar Mar 30 '24 00:03 poisonsnak

TL;DR: Set your launch options to WINE_ALERT_SIMULATE_SCHED_QUANTUM=1 %command% to fix the stuttering without the performance impact of cutting the core count.

I think we might be able to consider the stutters solved for the Idea Factory OROCHI Engine games! Setting WINE_ALERT_SIMULATE_SCHED_QUANTUM=1 in the launch options of these games seems to fix the stutters that have been plaguing them when played via Proton.

From what I can tell, WINE_ALERT_SIMULATE_SCHED_QUANTUM was initially implemented as a hack for GTA 5 (271590), and was later applied to Mary Skelter 2 (1496250) as a direct fix for its stuttering. The fact that it was applied to Mary Skelter 2 is what tipped me off to the fact that this could work for the other OROCHI engine games. The hack seems to have something to do with thread scheduling, so it does make sense that the old workaround of cutting down the core count helped alleviate things to an extent.

From my testing, it appears to be the definitive fix. I looked at a few of the games, and would appreciate it if someone went and tested the ones that I don't own.

Fix already applied:

Tested and confirmed as the solution:

  • Death end re;Quest (990050)
  • #4135
  • #1809

Likely solution, but untested

  • #3146
  • #4705

The next step is getting this information into the right hands so that patches can be made. Hopefully the right person (maybe @kisak-valve?) sees this and passes it on.

1t1t11 avatar Oct 09 '24 08:10 1t1t11

My account was restricted from any public contributions for some reason, but I cleared it up with GitHub support. Please take a look at my reply above!

1t1t11 avatar Oct 15 '24 04:10 1t1t11

Replying to https://github.com/ValveSoftware/Proton/issues/2705#issuecomment-2401699754

Mary Skelter Finale (AppID: 2357400) would probably also work with this. That doesn't have a GitHub Issues ticket, but Death end re;Quest does.

Might also be worth checking to see if Left Alive and World of Final Fantasy benefit from this tweak too.

Naitrate avatar Nov 13 '24 17:11 Naitrate

Replying to #2705 (comment)

Mary Skelter Finale (AppID: 2357400) would probably also work with this. That doesn't have a GitHub Issues ticket, but Death end re;Quest does.

Might also be worth checking to see if Left Alive and World of Final Fantasy benefit from this tweak too.

I've just submitted a PR request to hopefully get some changes merged to help these games with performance:

https://github.com/ValveSoftware/wine/pull/274

Naitrate avatar Mar 20 '25 19:03 Naitrate