xan1242 / hp2wsfix

Need for Speed: Hot Pursuit 2 PC - Widescreen fix
MIT License
43 stars 2 forks source link

Exception Error #19

Closed erfansvsh closed 1 year ago

erfansvsh commented 1 year ago

Even though that I've copied your latest release (HUD Offset release) to the game directory, but still I get the following error and I can't launch the game:


Need For Speed Hot Pursuit 2 (exception error)

(Hit Cntrl-C to copy this info to the clipboard)

The thread attempted to read from or write to a virtual address for which it does not have the appropriate access.

Version: 242 EIP = 0x6D0358F3 ESP = 0x0019F594 EBP = 0x0019F700 EAX = 0x00000000 EBX = 0x0019F70C ECX = 0x2EF64478 EDX = 0x2EF647C0 ESI = 0x2EF64468 EDI = 0x2EF634E8

OK

image

Screenshot (506)

xan1242 commented 1 year ago

OK now that you pinged me...

The exception handler of HP2 isn't very helpful. All I know from this message in particular is that the error is happening somewhere in the memory area of some DLL.

The only way we could debug this is with ASI loader's exception handler, but I don't think the game will launch with them. Worth a try anyway.

Do the following:

  1. Make a folder called "CrashDumps" in the game directory
  2. go to global.ini and add this: DisableCrashDumps=0 (right under [GlobalSets])
  3. Launch the game
  4. Check the CrashDumps folder and send any .log file it generates there

In any case, I'm not developing this WS Fix as it is in this form anymore. Instead, my plan is to integrate this into the ThirteenAG's WS fixes pack.

erfansvsh commented 1 year ago

Here you are:

NFSHP2.exe.20230620201843.log

xan1242 commented 1 year ago

Yep it crashes because it tries to make an exception handler, just as I anticipated.

Please put this ASI in the scripts folder and then launch again, and send log again. NFSHP2_NukeExceptionHandler.zip

erfansvsh commented 1 year ago

Thanks for you co-operation:

NFSHP2.exe.20230620204706.log

xan1242 commented 1 year ago
    Backtrace (may be wrong):
        =>0x6CA06198 SetAppCompatData+0x16f48 in d3d9on12.dll (+0x26198) (0x3028FEB4) 
          0x6CA05325 SetAppCompatData+0x160d5 in d3d9on12.dll (+0x25325) (0x3028FF2C) 
          0x6CC3E9EA Direct3DShaderValidatorCreate9+0x4954a in d3d9.dll (+0x13e9ea) (0x3028FF54) 
          0x6CC3F888 Direct3DShaderValidatorCreate9+0x4a3e8 in d3d9.dll (+0x13f888) (0x3028FF74) 
          0x76107D59 BaseThreadInitThunk+0x19 in KERNEL32.DLL (+0x17d59) (0x3028FF84) 
          0x7745B74B RtlInitializeExceptionChain+0x6b in ntdll.dll (+0x6b74b) (0x3028FFDC) 
          0x7745B6CF RtlClearBits+0xbf in ntdll.dll (+0x6b6cf) (0x3028FFEC) 

This should tell you what's going on. I assume you're on an Intel (Xe/Arc) GPU since they're the only ones enforcing d3d9on12.

You have a few options:

  1. Launch game on another GPU if you have it (laptop's dGPU)
  2. Update Intel video drivers - they've recently switched to dxvk AFAIK
  3. Use dxvk yourself - grab the latest release here and put the d3d9.dll in your game: https://github.com/doitsujin/dxvk/releases + put this in global.ini UseD3D8to9=1
  4. Lastly, the only other thing I can suggest, unironically and only if you're crazy enough for this game - launch it in Linux under Wine/Proton.
erfansvsh commented 1 year ago

No man, unfortunately it didn't work.

However, at the very first try, the game opened that I could hear "EA Challenge Everything" but with a black screen. Then after about 4-5 minutes waiting, I ended its task via Task Manager. After that when I try to launch the game, the same exception error happens like nothing has changed at all 😅

By the way my GPU is not Intel, it's Nvidia GT 730 but my CPU is a 13th Gen Intel. And even further. I have a Surface Go 2 tablet too which has Intel Graphics, and the game runs very well on it.

Look at this combination again:

(My desktop) 13th Intel Gen CPU + Nvidia GT 730 GPU = Doesn't Run (My tablet) 8th Gen Intel CPU + Intel GPU = Runs without any error

So I assume it's nothing about GPU but rather, it's some CPU stuff. It's not about Intel GPU at all. Clearly it's about the difference between 8th Gen and 13th Gen Intel CPUs.

It seems that we should give up...

But thanks for keeping up 🌹🙏

AeroWidescreen commented 1 year ago

So I assume it's nothing about GPU but rather, it's some CPU stuff.

But why would you assume this? Not only is the Nvidia GT 730 not really meant for gaming, but its last driver update was over 3 years ago for Windows 10. It's not supported anymore, there could be compatibility issues and bugs.

For your Intel processor, as long as you're using Windows 11 for the new scheduler then you should be fine. It's x86 architecture, full backwards compatibility. If your 13th gen CPU has an iGPU then you could always try that and see if it works.

AeroWidescreen commented 1 year ago

The GeForce GT 730 was a graphics card by NVIDIA, launched on June 18th, 2014. Built on the 28 nm process, and based on the GK208B graphics processor, in its GK208-302-B1 variant, the card supports DirectX 12. Even though it supports DirectX 12, the feature level is only 11_0, which can be problematic with newer DirectX 12 titles.

Found this online. If your system was using d3d9on12 for some reason, then that could be a problem as well since your GPU does not fully support DirectX 12. And depending on the exact model you have, it may not support Vulkan either.

erfansvsh commented 1 year ago

Thanks for keep updating this thread.

Yes my Intel Core i3 13100 has an iGPU and I forced the game to open by using it (monitor is connected to motherboard no to Nvidia GPU also in Nvidia Control Panel I set Intel iGPU as default and then set the game exe to be run with Intel iGPU) but unfortunately the exact same problem still exist.

In the mean time I asked my brother to try to run the game on his two Surface Pro 4&6 tablets.

The outcome ensured me that it's a CPU issue.

Surface Pro 4 which has 6th Gen Intel CPU ran the game properly but Surface Pro 7 that has 10th Gen Intel CPU faced with the exact same exception error that I have. Worth noting that both of them use Intel iGPU too.

So now I'm totally sure about that it's not a problem nor with Nvidia nor with Intel GPUs but it's certainly an issue with maybe 10th Gen Intel CPUs and later (Because on my Surface Go 2 with 8th Gen Intel CPU game ran properly).

Tomorow I'll go to one of my friend's house that have a desktop with 7th Gen Intel CPU and I'll take my GT 730 with myself to see if it's a problem with GPU or CPU.

I'll inform you immediately.

xan1242 commented 1 year ago

GT730 should never resort to using D3D12 by itself under any circumstance. NVIDIA drivers don't use that on their 700 series.

I am not entirely sure but I suspect your iGPU is playing a bigger role than you think.

I'd nuke the iGPU out of the picture entirely and check if it works. To me it seems like Intel's driver for iGPU is causing issues for you and forcing d3d9on12 when it shouldn't.

Also try running the game in D3D8 directly, that also might fix the problem.

In any case, this is out of my hands now that we know what the issue is. The game wouldn't have even ran natively anyway.

AeroWidescreen commented 1 year ago

I'd nuke the iGPU out of the picture entirely and check if it works. To me it seems like Intel's driver for iGPU is causing issues for you and forcing d3d9on12 when it shouldn't.

Sounds like a plausible theory. It's always a good idea to disable your iGPU in the bios if you already have a graphics card. There's no reason to use both on a desktop computer because battery life is not an issue. After that, you'll probably need to reinstall your drivers as well. Go into Safe Mode and use DDU to wipe the Intel and Nvidia drivers. Then reinstall your Nvidia drivers.

erfansvsh commented 1 year ago

Hi there dear friends. I'm here to tell you the final results.

When I was writing my last message here in this thread, I totally forgot that I never tried to run the game on my another desktop PC which is equipped with 12th Gen Core i5 12600K and RTX 3080. Well it was unsuccessful too 🙂 the exact same "exception error" happens.

Then I went to my friend's house who has a 7th Gen Core i7 7700T and I installed my GT 730 on his motherboard.

Well the game ran without any problem 😍

I list here devices that I had tested the game with:

Obviously, the GPU here is not important at all. But the CPU actually is the main reason why we get exception error.

So as a final conclusion, now I'm pretty sure that maybe on 10th Gen and later Intel CPUs the game face with this exception error.

*note: (If anyone gets a different result, I mean that if you can run the game on 10th Gen or later Intel CPU please let us know in the comments)

Plut0nio commented 3 months ago

@erfansvsh Those are some interesting findings. However, have you ever considered testing the game out on any systems with AMD CPUs? My rig is running a Ryzen 7 3700X CPU with a Radeon RX 5700 XT for graphics, and I still can't get my 242-patched game to run with this Widescreen Fix. I should note that Zen 2 (3000 series) came out less than 2 months before Intel's 10th-gen CPUs, so I wonder if there's some sort of CPU feature or architecture extension that was introduced in either 10th or 9th-gen Intel CPUs that was also introduced in Zen+ or Zen 2 that's causing this issue.