Description

When using the Set command to change the value of a class at runtime, the game instance will crash with an access violation.

Note: This needs to be done in Standalone or a packaged version for this console command to work.

Steps to Reproduce

1. Create a new blank C++ project
2. Add a new class based off Actor and name it MyActor
3. In the .h file, add the following line on line #23

 UPROPERTY(EditAnywhere)
		int32 MyInt; 

4. Compile the project and return to the editor
5. Drag an instance of the custom actor class into the level
6. Start the game in standalone
7. Run the console command "set MyActor MyInt 5"
Result: The game instance crashes
Expected: The variable should be set and the game should continue as usual.

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

UE4Editor_Engine!AActor::PreEditChange() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\actoreditor.cpp:31]
UE4Editor_CoreUObject!GlobalSetProperty() [d:\matthew.clark_main_stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:305]
UE4Editor_CoreUObject!PerformSetCommand() [d:\matthew.clark_main_stream\engine\source\runtime\coreuobject\private\uobject\obj.cpp:2373]
UE4Editor_CoreUObject!StaticExec() [d:\matthew.clark_main_stream\engine\source\runtime\coreuobject\private\uobject\obj.cpp:2883]
UE4Editor_Engine!UEngine::Exec() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\unrealengine.cpp:2303]
UE4Editor_Engine!UGameEngine::Exec() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\gameengine.cpp:730]
UE4Editor_Engine!UGameViewportClient::Exec() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\gameviewportclient.cpp:2137]
UE4Editor_Engine!ULocalPlayer::Exec() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\localplayer.cpp:1373]
UE4Editor_Engine!UPlayer::ConsoleCommand() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\player.cpp:53]
UE4Editor_Engine!APlayerController::ConsoleCommand() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\playercontroller.cpp:363]
UE4Editor_Engine!UConsole::ConsoleCommand() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\userinterface\console.cpp:460]
UE4Editor_Engine!UConsole::InputKey_InputLine() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\userinterface\console.cpp:716]
UE4Editor_Engine!UConsole::InputKey() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\userinterface\console.cpp:1129]
UE4Editor_Engine!UGameViewportClient::InputKey() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\gameviewportclient.cpp:342]
UE4Editor_Engine!FSceneViewport::OnKeyUp() [d:\matthew.clark_main_stream\engine\source\runtime\engine\private\slate\sceneviewport.cpp:772]
UE4Editor_Slate!SViewport::OnKeyUp() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\widgets\sviewport.cpp:215]
UE4Editor_Slate!<lambda_5def90dcf3eca1df5e5b7938a921cb28>::operator()() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4143]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FKeyEvent,<lambda_5def90dcf3eca1df5e5b7938a921cb28> >() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:214]
UE4Editor_Slate!FEventRouter::RouteAlongFocusPath<FEventRouter::FBubblePolicy,<lambda_5def90dcf3eca1df5e5b7938a921cb28>,FKeyEvent>() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:196]
UE4Editor_Slate!FSlateApplication::ProcessKeyUpEvent() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4144]
UE4Editor_Slate!FSlateApplication::OnKeyUp() [d:\matthew.clark_main_stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4112]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\matthew.clark_main_stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:1328]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\matthew.clark_main_stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:1709]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\matthew.clark_main_stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:707]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\matthew.clark_main_stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:629]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\matthew.clark_main_stream\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:884]
UE4Editor!FEngineLoop::Tick() [d:\matthew.clark_main_stream\engine\source\runtime\launch\private\launchengineloop.cpp:2594]
UE4Editor!GuardedMain() [d:\matthew.clark_main_stream\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\matthew.clark_main_stream\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\matthew.clark_main_stream\engine\source\runtime\launch\private\windows\launchwindows.cpp:200] 

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.104.11
Target Fix4.11
Fix Commit2814662
Main Commit2880055
Release Commit2814670
CreatedDec 9, 2015
ResolvedJan 4, 2016
UpdatedApr 27, 2018