Access violation - code c0000005

I was coding in Visual, and after the last build the project crashed giving me this error, can someone explain its meaning?

Its seems to be a problem with playerpawn.cpp on line 16, but it still crash if i coment/delete those lines.

Access violation - code c0000005
(first/second chance not available)

“”

UE4Editor_MonsterCard!APlayerPawn::APlayerPawn()
[c:\users\jshell\documents\unreal
projects\monstercard\source\monstercard\playerpawn.cpp:16]
UE4Editor_CoreUObject!UClass::CreateDefaultObject()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\class.cpp:2657]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:658]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:752]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance cdecl(void)>::ExecuteIfSafe() [d:\buildfarm\buildmachine++depot+ue4-releases+4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate::Broadcast()
[d:\buildfarm\buildmachine
++depot+ue4-releases+4.10\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:809]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\modules\modulemanager.cpp:426]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
UE4Editor_Projects!FProjectManager::LoadModulesForProject()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\projects\private\projectmanager.cpp:53]
UE4Editor!FEngineLoop::LoadStartupModules()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:1989]
UE4Editor!FEngineLoop::PreInit()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:1495]
UE4Editor!GuardedMain()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain()
[d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh()
[f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32 ntdll

Thanks.

Hey Jshell,

At “playerpawn.cpp on line 16” you are trying to use a pointer that doesn’t have a value, resulting in the Access Violation.

Feel free to update your post with whatever is in your player pawn class, at line 16, and I can help.

Hello.

I was trying to read an empty Xml, but with your advice I could fix it, thanks for the assistance :stuck_out_tongue:

I got this error in all my projects now… for no reason. All of a sudden all my games broke… ■■■■ my life.

Totally forgot to select the answered :stuck_out_tongue:

yes, I found my problem long ago (dont even remember which project was…) hope this guys discover wheres their soon :stuck_out_tongue:

I have the exact same error happening. It happens after I’ve been playtesting my game for a few minutes. It points to a line of code that runs several hundred times in those first few minutes and works fine obviously. And then it decides to stop working and crashes the whole editor. It points to a line of code that pulls a variable from a object pointer. on the lines above, I test to make sure that object is not null. I don’t know if it is actually null or not but it shouldn’t reach that line if it is!

I’m becoming more and more certain that it is a problem with the engine. I made all sorts of changes, renaming things, constructing things differently… Still get the same error and still only after I use the mechanic liberally without problem.

For the guys still stumbling upon this Post. Access Violation means exactly what it says → Accessing a Pointer that Points to nothing. Thats not a Engine Bug at all thats something that is blame on the Dev itself (you)

If you have a Pointer correctly set up to refference something does not mean it will stay that way forever. The thing you pointing to can be Destroyed at any point and if you try to access it afterwards your Code does not know what todo with that thing that does not exist anymore and crashes out.

Also the Debuger is a Powerfull Tool and I encourage everyone to learn how to use it.

Good Luck everyone.