Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dereferencing nullptr in dx10SamplerStateCache::SetMaxAnisotropy #468

Open
klaufir216 opened this issue Jan 13, 2024 · 5 comments
Open

Dereferencing nullptr in dx10SamplerStateCache::SetMaxAnisotropy #468

klaufir216 opened this issue Jan 13, 2024 · 5 comments
Labels

Comments

@klaufir216
Copy link

Version: 2.1.414
Commit: 4481ac0

stack trace:

[13.01.24 12:55:43.133] ***************************[ScriptCrashHandler]**********************************
[13.01.24 12:55:43.133] stack traceback:
[13.01.24 12:55:43.133] *********************************************************************************
[13.01.24 12:55:43.133] ********************************************************************************
[13.01.24 12:55:43.133] !![LogStackTrace] Thread: [X-RAY Primary thread], ExceptionCode: [c0000005]
[13.01.24 12:55:43.136] ~ current environment sound zone name [open_space]
[13.01.24 12:55:44.159] !!Unhandled exception stack trace:
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF6467AC499], Fun: [dx10SamplerStateCache::SetMaxAnisotropy()] + [137 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\Layers\xrRenderDX10\StateManager\dx10SamplerStateCache.cpp-->177] + [12 byte(s)]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF646948303], Fun: [CRender::Render()] + [1799 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\Layers\xrRenderPC_R4\r4_R_render.cpp-->346]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF6469D3F00], Fun: [CLevel::OnRender()] + [52 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xrGame\Level.cpp-->476]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF646704944], Fun: [CRenderDevice::on_idle()] + [2504 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xr_3da\device.cpp-->178] + [87 byte(s)]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF646704F6E], Fun: [CRenderDevice::Run()] + [510 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xr_3da\device.cpp-->296] + [88 byte(s)]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF6466CEC6D], Fun: [Startup()] + [1365 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xr_3da\x_ray.cpp-->203]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF6466CF211], Fun: [WinMain_impl()] + [449 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xr_3da\x_ray.cpp-->385]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF6466CF3B2], Fun: [WinMain()] + [346 byte(s)], File-->Line: [F:\Repos\OGSR-Engine\ogsr_engine\xr_3da\x_ray.cpp-->406]
! Module: [V:\Games\OGSR_GA\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF646F4AC2A], Fun: [__scrt_common_main_seh()] + [262 byte(s)], File-->Line: [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl-->288] + [33 byte(s)]
! Module: [C:\Windows\System32\KERNEL32.DLL], AddrPC.Offset: [00007FFB01487344], Fun: [BaseThreadInitThunk()] + [20 byte(s)]
! Module: [C:\Windows\SYSTEM32\ntdll.dll], AddrPC.Offset: [00007FFB017626B1], Fun: [RtlUserThreadStart()] + [33 byte(s)]

Reproduced in debugger:

OGSR-SetMaxAnisoCrash

@xrSimpodin
Copy link
Member

This is a graphics driver problem. Once when I caught this error, updating the driver helped me.
For some this error happens often, for others it does not happen at all.
The only thing I can recommend in this situation is to use DXVK. This seems to help.

@klaufir216
Copy link
Author

Thanks for the fast reply! I understand this is not an OGSR issue; but maybe it would be possible to find some workaround, like checking for null before accessing m_pState. What do you think, would you consider accepting such a workaround?

@xrSimpodin
Copy link
Member

We tried in different ways to fix this, to little avail. If you plug a problem in this code, it will start crashing in another place.

I'm wondering if dxvk will help in your case. Tell us about the test results.

@xrSimpodin xrSimpodin pinned this issue Jan 14, 2024
@xrSimpodin xrSimpodin added the bug label Jan 14, 2024
@klaufir216
Copy link
Author

Reproducing this is extremely difficult. I had a save that sometimes triggered it; but very rarely. After my initial report I have spent several hours trying to reproduce it with no success. For now I can't test whether DXVK could solve it, as I am struggling with consistent reproduction.

Haven't given up yet, I will try to dig my teeth into this issue in the coming days.

Do you have maybe some extra info from your previous encounters of this bug?

@xrSimpodin
Copy link
Member

Personally, I could repeat this crash in just one place a few years ago. Then updating the AMD video driver helped.
After that, I personally encountered this crash in isolated cases. Sometimes players send me logs with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants