UnrealEditor.exe (nvwgf2umx.dll) 0xC0000005 100% reproduced crash

Hello, I have crash.
Version UE5.1. No external plugins. Cpp project. MSVS 2022 for code.
I do my things at my main project. And once, after i close game window, VS give me error message:
“An exception was thrown at 0x00007FF932B37BB7 (nvwgf2umx.dll) in UnrealEditor.exe: 0xC0000005: access violation while reading at address 0x000001F4F2580010.”
After it i have 100% repitable this error in this project (after closing game window).

I try create new project (third person), without any new code. But this problem follow me and in this new project. But in other place: Open menu “Change play mode and Play settings” → close it by click in any place → crash"
I reinstall UE and this gives no results.

Actually in MSVS i can hide this exception in Debug->Windows->Exception Params-> Win32-> 0xC0000005 (both checks) but i think its not the solution.
Because my output in MSVS, while running, fully filled errors like: “An exception was thrown at 0x00007FF932B37BB7 (nvwgf2umx.dll)…”

P.S. sometimes this error displaying in random places, while im using editor.

Try disabling any custom code or plugins in your project and see if the issue persists. Verify that the system requirements for Unreal Engine 5.1 are met and that your graphics card drivers are up to date. I would even suggest that you try reinstalling Visual Studio 2022 and the Windows C++ redistributables to see if this resolves the issue.

TY for answer i will try it.

Very highly likely that your code is using a UObject* derivative that is not protected with a UPROPERTY macro

2 Likes

Yeah, i have a lot of UObject childs.
I will try to add UPROPERTY to all props in project and do some tests.

So:

  • Add UPROPERTY to every class-prop in project
  • Reinstall engine and update it to 5.11. Why not? :slight_smile:
  • Done a lot of stuff from 1st comment
    Nothing changed :frowning:

Well it’s likely that you’ve got some sort of error occurring during garbage collection, and you’ll probably have to use the debugger to see what’s actually blowing up and how.

I think i solve the problem.
In my main proj i used ConstructorHelpers for find DataTables.
Once, i build game package with Development build. (Platforms->windows->Development)
When i tried to run game and it was crashed. On one of ConstructorHelpers calls.
Having studied stack trace, i saw smth like engine async loading function. I think this loading are problem.
I think debug mode loading step by step, not async. And dont crash.

So the solution:
Use this, against constructor helper. And use it after constructor called (i call in BeginPlay)

FSoftObjectPath dtPath= TEXT("/path/to/dt_name.dt_name");
	if (dtPath.IsValid()) {
		if (auto* dt= Cast<UDataTable>(dtPath.TryLoad())) {
			...
		}
	}

Make a Blueprint of your class, and specify the DataTable there, and use that Blueprint instead of the Class for whatever it is. Putting hard paths in code is usually bad.