ThirteenAG / WidescreenFixesPack

Plugins to make or improve widescreen resolutions support in games, add more features and fix bugs.
https://thirteenag.github.io/wfp
MIT License
2.26k stars 215 forks source link

Splinter Cell: Pandora Tomorrow Cutscene Crashes #943

Open edbarber opened 3 years ago

edbarber commented 3 years ago

When playing Splinter Cell: Pandora Tomorrow, the cutscenes randomly cause the game to crash. Upon removing the widescreen fix, this doesn't seem to happen. This can easily be reproduced by starting a new profile and playing the first cutscene after that.

georgeli94 commented 3 years ago

I can confirm this problem as well, however the main culprit is due to running the game in widescreen. Removing the widescreen pack but hex-editing the Core.dll file (which was the old way to get widescreen working) to run in 1920x1080 also causes the same issue.

georgeli94 commented 3 years ago

I can confirm this problem as well, however the main culprit is due to running the game in widescreen. Removing the widescreen pack but hex-editing the Core.dll file (which was the old way to get widescreen working) to run in 1920x1080 also causes the same issue.

With more testing, I can definitely confirm it's due to widescreen. If I force a 4:3 aspect ratio, whether through the widescreen patch or even creating a custom 1440x1080 resolution for my PC, the cutscenes don't crash. Only in widescreen (at least in 16:9 which is what I tested) does it happen.

edbarber commented 3 years ago

I can confirm this problem as well, however the main culprit is due to running the game in widescreen. Removing the widescreen pack but hex-editing the Core.dll file (which was the old way to get widescreen working) to run in 1920x1080 also causes the same issue.

With more testing, I can definitely confirm it's due to widescreen. If I force a 4:3 aspect ratio, whether through the widescreen patch or even creating a custom 1440x1080 resolution for my PC, the cutscenes don't crash. Only in widescreen (at least in 16:9 which is what I tested) does it happen.

Interesting. I certainly don't remember it crashing with the Core.dll hack in the past. I wonder if it's a compatibility issue with a Windows 10 update or something.

georgeli94 commented 3 years ago

I can confirm this problem as well, however the main culprit is due to running the game in widescreen. Removing the widescreen pack but hex-editing the Core.dll file (which was the old way to get widescreen working) to run in 1920x1080 also causes the same issue.

With more testing, I can definitely confirm it's due to widescreen. If I force a 4:3 aspect ratio, whether through the widescreen patch or even creating a custom 1440x1080 resolution for my PC, the cutscenes don't crash. Only in widescreen (at least in 16:9 which is what I tested) does it happen.

Interesting. I certainly don't remember it crashing with the Core.dll hack in the past. I wonder if it's a compatibility issue with a Windows 10 update or something.

Definitely a Windows 10 Update, I think. The widescreen patch also had no problems with crashing before I tested recently.

I had done more testing, though, and noticed I didn’t crash if I set my RAM back down to 2133 MHz. At least for all the tests I’ve done, it never happened. I have no idea why. My RAM is rated for 3600 MHz, and if I set it back to that, it crashes. I, for the life of me, can’t figure out why. A friend thinks it may be some of the lingering DRM that the crack was imperfect on, and it doesn’t work well with recent Windows 10. Either way, it didn’t happen in the past, I can definitely say that.

georgeli94 commented 3 years ago

I can confirm this problem as well, however the main culprit is due to running the game in widescreen. Removing the widescreen pack but hex-editing the Core.dll file (which was the old way to get widescreen working) to run in 1920x1080 also causes the same issue.

With more testing, I can definitely confirm it's due to widescreen. If I force a 4:3 aspect ratio, whether through the widescreen patch or even creating a custom 1440x1080 resolution for my PC, the cutscenes don't crash. Only in widescreen (at least in 16:9 which is what I tested) does it happen.

Interesting. I certainly don't remember it crashing with the Core.dll hack in the past. I wonder if it's a compatibility issue with a Windows 10 update or something.

Definitely a Windows 10 Update, I think. The widescreen patch also had no problems with crashing before I tested recently.

I had done more testing, though, and noticed I didn’t crash if I set my RAM back down to 2133 MHz. At least for all the tests I’ve done, it never happened. I have no idea why. My RAM is rated for 3600 MHz, and if I set it back to that, it crashes. I, for the life of me, can’t figure out why. A friend thinks it may be some of the lingering DRM that the crack was imperfect on, and it doesn’t work well with recent Windows 10. Either way, it didn’t happen in the past, I can definitely say that.

Okay, I don't know why it happened, but it seems like setting CPU Affinity to a single CPU fixed the problem for me. I haven't had a crash with any of the cutscenes yet when I did that. Can you test to see if that fixed it for you?

georgeli94 commented 2 years ago

I would like to provide another update on this issue as while setting CPU Affinity to a single CPU does fix the cutscene crashing problem, it is not an ideal solution as the game stutters a lot due to the one CPU core maxing out. Attempting to run the game with just two CPU cores still elicits the crash. It's definitely to do with the widescreen mod (or just custom resolutions in general) as setting the game's resolution to the standard ones in the game without the mod doesn't seem to crash. I wonder if it would be possible to limit the cutscene resolution to them like cutscenes in Splinter Cell 1 which were all 640x480 only.

edbarber commented 2 years ago

I would like to provide another update on this issue as while setting CPU Affinity to a single CPU does fix the cutscene crashing problem, it is not an ideal solution as the game stutters a lot due to the one CPU core maxing out. Attempting to run the game with just two CPU cores still elicits the crash. It's definitely to do with the widescreen mod (or just custom resolutions in general) as setting the game's resolution to the standard ones in the game without the mod doesn't seem to crash. I wonder if it would be possible to limit the cutscene resolution to them like cutscenes in Splinter Cell 1 which were all 640x480 only.

Honestly, I just resorted to downloading VLC media player and playing the cutscenes from the video folder after skipping them.

georgeli94 commented 2 years ago

I just want to provide another update for this: I attempted to convert the cutscenes to something else and then back to Bink files, and they crash less albeit at noticeably lower resolution. So far, the best solution to this problem I've found involves using Process Lasso:

If I actually want to watch cutscenes is at the end of every level, I Alt Tab out of the game, go into Process Lasso, switch the CPU affinity to only 1 core, watch the cutscene, then when I'm at the loading screen for the next level, I Alt Tab back out and switch the CPU affinity to 2 cores. 2 cores is enough to run the game completely smoothly in my experience and then I can watch the cutscenes without crashing with one CPU core and then play the game with two cores. Alt Tabbing out and back into the game won't cause you to miss anything as the game will only start into the next level when you Alt Tab back. You can also attempt to watch a cutscene, and then switch CPU affinity to 1 core if it crashes, as the error message is still part of the application so you can set the CPU affinity before closing and restarting.

I still feel like the truly best solution, if at all possible, is to force the cutscenes to be played in 640x480 resolution. That did not cause any crashes when I forced the game to run in that resolution, but anything else higher cause it to crash. But I don't know if the Widescreen patch could be updated to do that.

ThirteenAG commented 2 years ago

Install latest dev build, create CrashDumps folder, reproduce said crash and post all content of that folder here. I still can't reproduce such crash.

ThirteenAG commented 2 years ago

Once that's done, try asi: SplinterCellPandoraTomorrow.WidescreenFix.asi.zip

georgeli94 commented 2 years ago

Where should I create the CrashDumps folder? I will record a video reproducing the crash, though.

georgeli94 commented 2 years ago

https://ufile.io/dpyy3or7

Here's an upload of that video. I was starting level 5 and it crashes on the Osprey cutscene.

I do want to reiterate that it's a General Protection Fault where the game application crashes. Would a CrashDumps folder pick that up? I'm also on Windows 11 if that makes any difference, as I did only notice this problem relatively recently as cutscene crashing didn't seem to occur that often before.

ThirteenAG commented 2 years ago

Where should I create the CrashDumps folder? I will record a video reproducing the crash, though.

Where the exe is located, video is not helping in any way. What about the build I posted above?

georgeli94 commented 2 years ago

I tried creating a CrashDumps folder in system where the SplinterCell2.exe is located, but every time it crashes, no log is created there. I must be doing something wrong.

I did use the build you posted above and it still has the issue. The only way to resolve the issue right now is still either to limit the CPU core strictly to 1 or run the cutscene in 640x480 resolution. I do think a detailed log would be very helpful but I still can't seem to get one to occur anytime the game crashes with a General Protection Fault.

ThirteenAG commented 2 years ago

Then sorry, I can't provide more assistance than that.

I did use the build you posted above and it still has the issue. The only way to resolve the issue right now is still either to limit the CPU core strictly to 1

That's what that build is supposed to do.

georgeli94 commented 2 years ago

What OS are you using? Also what settings are you using in Nvidia Control Panel? I wonder if something there could cause some issues.

ThirteenAG commented 2 years ago

I doubt it.

georgeli94 commented 2 years ago

I don't want to jinx anything, but seems like if I set V-Sync setting in Nvidia Control Panel to "Fast Sync" rather than On or Off, the problem doesn't seem to be occurring. I've went through several cutscenes fully now without any General Protection Faults. I have no idea why this works or if it'll help anyone else having this issue, so I'm just writing it here for now so anyone else can try it. If the crashes return, I'll provide another update.

Another method I was attempting before, albeit not perfect, is setting the CPU core limit to 1, then limiting the game's framerate to 60FPS to reduce the load on the single CPU core as much as possible, and then set the Maximum Pre-rendered Frames to 8. That seems to smooth out a lot of the stuttering that comes from the one CPU core spiking to 100% usage, but it'll still have stutters fairly regularly. It's not an ideal solution, but it works if this one doesn't.

The other thing I wonder is if Fast Sync is working in conjunction with the Developer build files you sent, as I overwrote the old files so I only tested Fast Sync vs. normal V-Sync with the new files. It's odd, but it seems to be working and the game also functions smoothly at the moment. Again, I'll update if the crashes return and this was just some temporary fix, and I'd also like to see if anyone else having this problem could also try it out.

georgeli94 commented 2 years ago

Bah, it was only a temporary fix, and now the cutscenes are crashing again on Fast Sync, too. I don't know why it temporarily fixed the issue, making me wonder if simply having different settings fixes the issue. But even then, that's kind of temporarily solving the problem at best before it manifests again. I did some scant testing where I turned off VSync entirely and that let the cutscenes I did play go through fully without crashing, but I imagine that's only temporary, too.

I imagine the best, most permanent fix would be to somehow have the cutscenes be 640x480 like Splinter Cell 1's cutscene and main menu, as I haven't had a crash with that yet.

mmillar-bolis commented 1 month ago

@georgeli94 I think you were right early on with setting affinity. It looks like the same kind of issue with dynamic hardware threads that Deus Ex: Infinity War has. To patch SplinterCell2.exe to permanently use a single processor core, you can use imagecfg.exe from the Windows 2000 Server Resource Kit (look on archive.org or winworldpc.com for it).

imagecfg.exe -a 0x02 "C:\path\to\SplinterCell2.exe"

This solves the crashing issue at any resolution with the caveat that binkw32.dll has to wait for the main thread to update, causing noticeable stuttering in some cutscenes.

georgeli94 commented 1 month ago

I have Process Lasso that can do that, though the issue is the game stutters since that single core gets maxed out on my CPU.

The fix on PCGamingWiki combined with Fast Sync seems to fix it for me, for what it’s worth.

ThirteenAG commented 1 month ago

So, renaming asi loader to binkw32.dll fixes it?

mmillar-bolis commented 1 month ago

@ThirteenAG Great suggestion! I just tried binkw32.dll from 38c04fd and renamed the original lib to binkw32Hooked.dll. Unfortunately, I still receive the general protection fault.

To be more clear, using binkw32.dll as the loader alone appears to hook too late to set the resolution, so at the very least, msvfw32.dll is still needed. But it appears that just replacing binkw32.dll has no real affect on the protection fault issue.

@georgeli94 what fix in particular are you using from PCGamingWiki? Are you using the newer Bink library they provide (1.5.7.0), or are you setting SplinterCell2.exe's compatibility mode to Windows 98 / ME, or are you doing both of those things?

EDIT: As I am using the newer Bink library they provide, but still receiving the protection faults, I'm going to guess it's setting the compatibility mode. That will restrict the process to a single processor with the downside of elevating privileges (which is why I went the imagecfg route instead).

ThirteenAG commented 1 month ago

Can you upload a crash dump?

georgeli94 commented 1 month ago

@ThirteenAG Great suggestion! I just tried binkw32.dll from 38c04fd and renamed the original lib to binkw32Hooked.dll. Unfortunately, I still receive the general protection fault.

To be more clear, using binkw32.dll as the loader alone appears to hook too late to set the resolution, so at the very least, msvfw32.dll is still needed. But it appears that just replacing binkw32.dll has no real affect on the protection fault issue.

@georgeli94 what fix in particular are you using from PCGamingWiki? Are you using the newer Bink library they provide (1.5.7.0), or are you setting SplinterCell2.exe's compatibility mode to Windows 98 / ME, or are you doing both of those things?

EDIT: As I am using the newer Bink library they provide, but still receiving the protection faults, I'm going to guess it's setting the compatibility mode. That will restrict the process to a single processor with the downside of elevating privileges (which is why I went the imagecfg route instead).

Just the newer Bink library they provided. I did mess with compatibility settings once and that didn't seem to help. For whatever reason that's beyond me, using that new .dll plus Fast Sync makes the problem go away, though only until an Nvidia driver update, then I have to switch to regular V Sync which helps for a bit until it crashes again and I switch back to Fast Sync. I honestly don't even know if Fast Sync itself is doing anything, it just seems like the problem always goes away whenever I switch after a few tests. I haven't been playing the game regularly enough these days to know for certain, though if you or @ThirteenAG can figure something out more definitively, I'm all ears.

ThirteenAG commented 1 month ago

That's not a crash dump, I need one after the crash in question. Either via asi loader's CrashDumps folder or the windows' one: http://dk22pac.blogspot.com/2013/02/how-to-enable-crash-dumps-dmp-files.html?m=1

mmillar-bolis commented 1 month ago

Unfortunately, this game does not trigger crash dumps for this error. Neither your loader (configured with the CrashDumps folder next to the loader, to be clear) nor Windows (configured in the nature that Microsoft specifies) ever catches and dumps it. The Unreal engine merely throws the error that everyone knows so well:

unreal_error

Then it exits otherwise gracefully, it would appear. Sorry I can't offer you anything more, but thanks again.

However, imagecfg works well, for anyone else looking to work around this bug.

ThirteenAG commented 1 month ago

In that case, when this window pops up, try to dump the entire process with task manager and upload somewhere. Though it might not be that useful. Is there a way to quickly and consistently reproduce that crash?