Description

If a Curve Float local variable is created for a function, it will be garbage collected when garbage collection occurs. This causes the process to crash due to an null pointer error whenever it is referenced.

Regression?: No
This issue also occurred in 4.12.5 Binary (3039270)

Steps to Reproduce
  1. Download the attached project
  2. Start PIE in a Standalone Window
  3. Open the console and type the following to force garbage collection:
    obj gc
    Result: The process crashes due to the Float Curve in the function that is being called on tick being garbage collected
    Expected: The float curve should not be garbage collected and the process should not crash.

From Scratch:

  1. Create a new project
  2. Create a Curve Float asset (Context Menu > Misc > Curve)
  3. Create an actor blueprint
  4. Create a new function inside of the actor blueprint
  5. Add a local variable of the Curve Float type and then set the value of said variable to your previously created Curve Float
  6. Set up the function in the picture below
  7. Call this new function on Tick in the actor's event graph
  8. Add an instance of the actor blueprint to the level, save the level.
  9. Run the game in Standalone Game
  10. Type the following command into the console to force garbage collection:
    obj gc
Callstack
 Assertion failed: Index >= 0 [File:d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\public\uobject\UObjectArray.h] [Line: 402] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:421]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2117]
UE4Editor_CoreUObject!UObject::execLet() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1925]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:922]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:821]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:922]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:821]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:922]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4280]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1305]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\actor.cpp:646]
UE4Editor_Engine!AActor::ReceiveTick() [d:\build\++ue4+release-4.13+compile\sync\engine\intermediate\build\win64\ue4editor\inc\engine\engine.generated.1.cpp:2816]
UE4Editor_Engine!AActor::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\actor.cpp:844]
UE4Editor_Engine!AActor::TickActor() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\actor.cpp:831]
UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\actor.cpp:112]
UE4Editor_Engine!FTickFunctionTask::DoTask() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:251]
UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:868]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:932]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:679]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1776]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:520]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1426]
UE4Editor_Engine!UWorld::RunTickGroup() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:706]
UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1275]
UE4Editor_Engine!UGameEngine::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\gameengine.cpp:1057]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2834]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:156]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.13+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 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-35830 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.12.54.134.14
Target Fix4.14
Fix Commit3132383
Main Commit3152997
CreatedSep 9, 2016
ResolvedSep 20, 2016
UpdatedApr 27, 2018