Open trenton4k opened 5 years ago
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.
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.
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.
so how to fix the start up issue?
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
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
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).
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.
I did not record any logs of the issues, but I can do so if you want.
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
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:
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)
Game freezes and never recovers. Sometimes is instantly, sometimes takes a good while
Launch the game with Proton 5.0 Play until the freeze Kill the .exe
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.
Update: Proton 3.16-9 Works perfectly. No freezes, no crashes.
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:
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!
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?
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
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
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.
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 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
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%
.
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.
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.
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.
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.
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!
Compatibility Report
System Information
I confirm:
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