sfall-team / sfall

sfall - Engine modifications for Fallout 2
https://sfall-team.github.io/sfall/
GNU General Public License v3.0
338 stars 40 forks source link

Game permanently freezing with RPU and latest sfall #517

Closed E-Bosher closed 3 months ago

E-Bosher commented 3 months ago

What happened

I have read that "SFALL 4.4.1 is recommended for the last RPU version" so I have updated sfall dll to v4.4.3. I was having random rare occasions of game freezing dead (game not responding, have to kill process) through all game but in my third visit to Klamath they became very often and then it turned to be a stable game freeze after dialog with Dunton brothers in Klamath grazing area. You need to pass a speech check and when they run away after dialog - game freezes permanently. • sfall 4.4.0.1 is the last stable version giving no issues • sfall v4.4.1 and v4.4.2 crashes to desktop or freezes dead • sfall v4.4.3 freezes dead

Savegame

SLOT01.zip You need to pass speech check in dialog (otherwise they attack you and there is no freeze), dialog sequence is 2-1-1-2-1-1.

I don't know if it is sfall's fault or some RPU scripts incompatibility. This has nothing to do with pathnodes or anything like that, I even tried original 1.02d exe without HRP, i tried different video modes, i tried game without mods besides RPU itself.

I am running this on a Ryzen 2600 and Win 10 Pro 22H2.

NovaRain commented 3 months ago

I can reproduce the freeze, but it's random (and kinda rare) on my system. In many times it works just fine. The weird thing is after 4.4.0.1 there shouldn't be much code change that would cause this. If you can trigger the freeze consistently on your system, maybe check if 3.8.43 (only replace ddraw.dll) has the same issue?

E-Bosher commented 3 months ago

With sfall 3.8.43 there are no issues, gave it 10 attempts, works fine.

I tried to replace 4.4.3 with 4.4.0.1 temporarily to pass dialog check and saved after Duntons left. Then replaced 4.4.0.1 with 4.4.3 back and that caused game to freeze immediately after loading this save. But if I pass dialog check with 4.4.0.1 then exit this location, save, replace 4.4.0.1 with 4.4.3, load the save - it works fine.

NovaRain commented 3 months ago

My system is Intel i5-12500 and Win10 Ent 22H2. I remember I got the freeze when Duntons flee after the player kills all radscorpions, with older sfall on my previous system (Xeon E3-1231 V3 + Win7), but it's too random so I just reload my game and tried again. The cause is the whole "Duntons run away then disappear" sequence. I had the freeze happens on right before the fade-out (they should disappear) or after the fade-in (they are gone).

Could you try this script: kcdunton_dbg.zip (extract it to your data\scripts\ directory) and enable the Fallout 2 debug patch in ddraw.ini (DebugMode=2 in [Debugging] section) to reproduce the freeze? Please attach debug.log and your ddraw.ini/f2_res.ini after the freeze.

E-Bosher commented 3 months ago

No freezes with script installed. I had random freezes in Klamath eastern part too long before and after this Duntons dialog and those freezes seem to be gone too. sfall 4.4.3 logs.zip

NovaRain commented 3 months ago

Hmm, looks like you didn't add this section to fallout2.cfg, so there's no debug logs from scripts.

[debug]
mode=environment
output_map_data_info=1
show_load_info=1
show_script_messages=1
show_tile_num=1

As for the freeze, yeah, I noticed after I added debug logs it's magically gone. Could you try this script instead (and check if it's still OK in Klamath downtown)? kcdunton_test.zip

E-Bosher commented 3 months ago

To clarify: at this point I am not using f2_res.dll and fallout2.exe is original, not patched with HRP. (The game was crashing with it too, I am just tired of shuffling files and settings)

First scenario: HiResMode=1 and Mode=0 in sfall's ddraw.ini, cnc-ddraw wrapper installed, wrapper uses opengl, using the first script from https://github.com/sfall-team/sfall/issues/517#issuecomment-2053551507 Game runs just fine in all locations, logfile attached.

Second scenario: HiResMode=1 and Mode=0 in sfall's ddraw.ini, cnc-ddraw wrapper installed, wrapper uses opengl, using the second script from https://github.com/sfall-team/sfall/issues/517#issuecomment-2053666671 Game freezes everytime half a second after dialog while they run away, logfile attached.

Third scenario: HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed, using the second script from https://github.com/sfall-team/sfall/issues/517#issuecomment-2053666671 Game crashed to desktop 2 times during start of fade-in transition, one of times it showed a memory error messagebox, screenshot and logfile attached. Around 10 other run attempts there was no crash, no freeze, no issues, logfile attached.

Fourth scenario: HiResMode=0 and Mode=4 in sfall's ddraw.ini, no wrapper installed, using the second script from https://github.com/sfall-team/sfall/issues/517#issuecomment-2053666671 Same as third scenario, game randomly crashes to desktop at transition start or runs fine, logfile attached.

Couldn't find any issues with all variants in eastern Klamath area.

logs and img.zip

NovaRain commented 3 months ago

OK, thanks. Since for you 4.4.0.1 works fine and the freeze/crash happens starting from 4.4.1, here are a few builds from the commits between 4.4.0.1 and 4.4.1: sfall_4401-441.zip

Please try them and see which build starts to trigger the issue with the second kcdunton.int (or the script removed, to use the original one from rpu.dat).

EDIT: Please also check this script: kcdunton_test2.zip

E-Bosher commented 3 months ago

• With kcdunton_test2 script installed - game runs fine in all possible combinations, no freeze, no crash.

Vanilla RPU (no scripts modified): • sfall 4.4.0.1_recompile, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - no freeze, no crash. • sfall git_c6635f6, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - no freeze, no crash. • sfall git_2b8b797, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - game freezes before fade out effect. • sfall 4.4.1_recompile, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - game freezes shortly after fade out effect. some logs.zip

NovaRain commented 3 months ago

• With kcdunton_test2 script installed - game runs fine in all possible combinations, no freeze, no crash.

Good to know. I'll discuss the editing of the script with RPU author.

Vanilla RPU (no scripts modified): • sfall git_c6635f6, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - no freeze, no crash. • sfall git_2b8b797, HiResMode=1 and Mode=0 in sfall's ddraw.ini, no wrapper installed - game freezes before fade out effect.

OK, thanks for testing. Please try these two builds. This should be the last test to nail down what exactly triggers the freeze with newer sfall: sfall_test_builds.zip

E-Bosher commented 3 months ago

I had a single random freeze later with kcdunton_test2 installed on sfall 4.4.3 while exiting Klamath, sequence was: load quicksave - step on exit grid.

Please try these two builds.

Both run fine with no issues on vanilla RPU without modded script and with sfall HRP enabled, gave 10 attempts to each. Do you need logs?

NovaRain commented 3 months ago

No, logs are not needed if both run fine in all freeze/crash cases you had (Duntons run away, when you're in downtown, leaving Klamath, etc.). The array_ushort build is 4.4.1 with an experimental code fix. If you're interested in running a prolonged test during your playthrough (or even with some other mods). Here's 4.4.3 with the same experimental fix: sfall-443-testfix.zip

EDIT: now the fix is included in the 4.4.3.1 release.

E-Bosher commented 3 months ago

I'll try that, thank you.

NovaRain commented 3 months ago

If the test fix build works fine for your game so far (and previous Duntons/Klamath cases), I'll commit it and try to push a hotfix release later.

E-Bosher commented 3 months ago

I have not seen a single crash/freeze since the moment I installed the experimental fix on vanilla RPU and I have been extensively exploring all areas. I think the issue is fixed.