Crash :: Access violation - code c0000005 after opening PlayerController

I’m having this issue where when I open my custom PlayerController in blueprints the editor crashes immediately. This happened after I started adding new Run On Server RPC events to my “Bootstrap / Initialization” custom event graph in my PlayerController. I belive the offending code in the PlayerController is a class variable that is named BPIGameState of type BPI_GameState (interface type).

You can download my project from here Dropbox - Error - Simplify your life

When you open the project if you try to edit Content/RTS/Core/Player/BP_CameraPawnController the editor crashes before it can open the blueprint.

Download logs here

MachineId:
EpicAccountId:

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

UE4Editor_Engine!UKismetSystemLibrary::SetInterfacePropertyByName()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\kismetsystemlibrary.cpp:799]
UE4Editor_Engine!UKismetSystemLibrary::execSetInterfacePropertyByName()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\classes\kismet\kismetsystemlibrary.h:62]
UE4Editor_CoreUObject!UFunction::Invoke()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4474]
UE4Editor_CoreUObject!UObject::CallFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:700]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2139]
UE4Editor_CoreUObject!UObject::ProcessInternal()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:925]
UE4Editor_CoreUObject!UObject::CallFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:824]
UE4Editor_CoreUObject!UObject::execVirtualFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2245]
UE4Editor_CoreUObject!UObject::ProcessInternal()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:925]
UE4Editor_CoreUObject!UObject::CallFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:824]
UE4Editor_CoreUObject!UObject::execVirtualFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2245]
UE4Editor_CoreUObject!UObject::ProcessInternal()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:925]
UE4Editor_CoreUObject!UObject::CallFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:824]
UE4Editor_CoreUObject!UObject::execVirtualFunction()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2245]
UE4Editor_CoreUObject!UObject::ProcessInternal()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:925]
UE4Editor_CoreUObject!UFunction::Invoke()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4474]
UE4Editor_CoreUObject!UObject::ProcessEvent()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1308]
UE4Editor_Engine!AActor::ProcessEvent()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\actor.cpp:649]
UE4Editor_Engine!AActor::ReceiveTick()
[d:\build++ue4+release-4.14+compile\sync\engine\intermediate\build\win64\ue4editor\inc\engine\engine.generated.1.cpp:2851]
UE4Editor_Engine!AActor::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\actor.cpp:852]
UE4Editor_Engine!APlayerController::TickActor() [d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:4061]
UE4Editor_Engine!FActorTickFunction::ExecuteTick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\actor.cpp:113]
UE4Editor_Engine!FTickFunctionTask::DoTask()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:256]
UE4Editor_Engine!TGraphTask::ExecuteTask()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:868]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:932]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:679]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1776]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:525]
UE4Editor_Engine!FTickTaskManager::RunTickGroup()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1437]
UE4Editor_Engine!UWorld::RunTickGroup()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:730]
UE4Editor_Engine!UWorld::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1340]
UE4Editor_Kismet!FSCSEditorViewportClient::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\editor\kismet\private\scseditorviewportclient.cpp:202]
UE4Editor_UnrealEd!UEditorEngine::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1490]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:371]
UE4Editor!FEngineLoop::Tick()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2859]
UE4Editor!GuardedMain()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\launch.cpp:152]
UE4Editor!GuardedMainWrapper()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain()
[d:\build++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__scrt_common_main_seh()
[f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32 ntdll

Bump. I really need help with this, i can’t work on my project until this is figured out…

An access violation is triggered by your software trying to read memory which has not be allocated – typically if you are accessing a property of a class that was never assigned or if you index beyond the end of the array. UE4Editor_Engine!UKismetSystemLibrary::SetInterfacePropertyByName() is the last item in the stack trace so I would suggest setting a breakpoint in the source code here and then querying the properties in use to see which one throws the exception and then debug it back from there.

Thanks for your insight on this, and that makes a lot of sense.

However, you said that “UE4Editor_Engine!UKismetSystemLibrary::SetInterfacePropertyByName()” is causing the problem, but that’s not my code, that is code that is in the UE4 engine/compiler/editor that Epic wrote.

So far all of my code is in blueprints. Also another important note, I can’t open up my blueprint without it immediately crashing the editor so I can’t set a break point because milliseconds after I open the blueprint, the editor crashes :frowning:

I’m already suspecting that the crash is caused because my PlayerController has a private property of type BPI_GameState (one of my BP interfaces).

I believe the UE4 editor is actually executing the PlayerController blueprint when I open it even though I did not launch PIE. I suspect the editor is executing the PlayerController blueprint because when I open the BP I get log messages that are logged to VisualLogger when my PC tries to get the player’s pawn.

Bump.

Anyone at Epic able to help me with this? Still can’t work on my game game until this is figured out. Opening the project succeed, but trying to edit my PlayerController results in an editor crash.

When you open the editor you actually load the engine in the background which is what is giving you your preview. Therefore the editor will call the constructors and kick off any appropriate events when it opens your project. What i meant by the reference to UE4Editor_Engine!UKismetSystemLibrary::SetInterfacePropertyByName() is not that there is a problem with this method but that the problem (which likely is due to something in your own code) manifests itself at this point in the editor execution. To find you problem you need to stop the editor load before this method is called then work backwards to find where your own code feeds the editor (or not) and passes the issue on.

If you have a C++ solution associated with your level you should be able to see the “Editor” or “Engine” project in there in which you can put a breakpoint in and trace things back through the stack trace. If you want to stick to blueprints I would remove all elements of my BPI_GameState blueprint and then add them back in one at a time until the problem re-appears to try locate the issue.

If all else fails I could download your project and take a look but try this first.

i have the exact same problem but instead it is my player Blueprint that is causing the issue, when i moved the player blueprint out of the Content folder the project was fine , while the Player Blueprint was still in the Content Folder anything that had a reference to the Player Blueprint would crash upon trying to open it, but after moving the Player Blueprint out of the Content folder they were open normally.
Note:
I tried replacing the Player Blueprint with multiple older versions from the Backup Folder, it still acted the same way…
Which made me think the Actual file is not Corrupted, instead the ready of it is the problem since older versions still crashed the project.

link text