Description

Trying to access a Game Instance in a Blueprint's Construction Script results in a crash in 4.8 and 4.9. No crash occurred in 4.7.6 with the same Blueprint.

This crash only seems to happen if the variables created in the repro steps are of type Random Stream. Using Integer variables did not produce a crash.

Steps to Reproduce
  1. Create a new code project using the First Person template.
  2. Build the project in Visual Studio.
  3. Open the project in the Editor.
  4. Create a new Game Instance Blueprint.
  5. Add a Random Stream variable inside the new game instance.
    • Name the variable Random Stream.
  6. Set the project to use the new Game Instance Blueprint.
  7. Create a new Actor Blueprint.
  8. Inside the new Actor Blueprint, add a Random Stream variable.
    • Name the variable Local Random Stream.
  9. In the Construction Script for the Actor Blueprint, get the Game Instance and cast to the new Game Instance created in step 4.
  10. Promote the resulting Game Instance pin to a variable.
    • Name the newly promoted variable Promoted Game Instance.
  11. Get the Promoted Game Instance variable, then get the Random Stream variable and set this value into Local Random Stream.
  12. Connect the Blueprint nodes to look like the attached image (47411-ue48crash.jpg).
  13. Compile the Blueprint.

RESULT:
The Editor crashes.

EXPECTED:
The Editor continues running, and perhaps displays a warning/error that Game Instance is not available when the Construction Script is being run.

Callstack

[Link Removed]

MachineId:926CC4CD4DE75FA30341E2895D619D6E
EpicAccountId:2c96fbce8ce344c99520cc9b8922f191

Unknown exception - code 00000001 (first/second chance not available)

"Assertion failed: !TTraits::WithZeroConstructor [Link Removed] [Line: 869]

UE4Editor_Core!FDebug::AssertFailed() [d:\main-builds\ue4\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_CoreUObject!UScriptStruct::TCppStructOps<FRandomStream>::Construct() [d:\main-builds\ue4\engine\source\runtime\coreuobject\public\uobject\class.h:872]
UE4Editor_CoreUObject!UScriptStruct::ClearScriptStruct() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:2334]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1651]
UE4Editor_CoreUObject!UObject::execLet() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1417]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4166]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1050]
UE4Editor_Engine!AActor::ProcessEvent() [d:\main-builds\ue4\engine\source\runtime\engine\private\actor.cpp:520]
UE4Editor_Engine!AActor::ProcessUserConstructionScript() [d:\main-builds\ue4\engine\source\runtime\engine\private\actorconstruction.cpp:520]
UE4Editor_Engine!AActor::ExecuteConstruction() [d:\main-builds\ue4\engine\source\runtime\engine\private\actorconstruction.cpp:468]
UE4Editor_Engine!AActor::FinishSpawning() [d:\main-builds\ue4\engine\source\runtime\engine\private\actor.cpp:2453]
UE4Editor_Engine!AActor::PostSpawnInitialize() [d:\main-builds\ue4\engine\source\runtime\engine\private\actor.cpp:2444]
UE4Editor_Engine!UWorld::SpawnActor() [d:\main-builds\ue4\engine\source\runtime\engine\private\levelactor.cpp:354]
UE4Editor_Kismet!FBlueprintEditor::UpdatePreviewActor() [d:\main-builds\ue4\engine\source\editor\kismet\private\blueprinteditor.cpp:7352]
UE4Editor_Kismet!FBlueprintEditor::Tick() [d:\main-builds\ue4\engine\source\editor\kismet\private\blueprinteditor.cpp:6331]
UE4Editor_UnrealEd!FTickableEditorObject::TickObjects() [d:\main-builds\ue4\engine\source\editor\unrealed\public\tickableeditorobject.h:15]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\main-builds\ue4\engine\source\editor\unrealed\private\editorengine.cpp:1115]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\main-builds\ue4\engine\source\editor\unrealed\private\unrealedengine.cpp:364]
UE4Editor!FEngineLoop::Tick() [d:\main-builds\ue4\engine\source\runtime\launch\private\launchengineloop.cpp:2379]
UE4Editor!GuardedMain() [d:\main-builds\ue4\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\main-builds\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\main-builds\ue4\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 - Blueprint
Affects Versions4.84.9
Target Fix4.9
Fix Commit2600299
CreatedJun 23, 2015
ResolvedJun 25, 2015
UpdatedApr 27, 2018