Description

User reports hitting an assertion due to invalid FTickTaskManager state when game is attempting to unregister a tick function that was previously disabled dynamically.

Failed assertion is in FTickTaskLevel::RemoveTickFunction(), in the 'FTickFunction::ETickState::Enabled' case:

else
{
	verify(AllEnabledTickFunctions.Remove(TickFunction) == 1); // otherwise you changed TickState while the tick function was registered. Call SetTickFunctionEnable instead.
}
Steps to Reproduce
  1. Launch the editor and open the project contained in the attached archive (it's a 4.18 project, so choose to open a copy in later versions of the editor).
  2. Double-click the 'TickTestMap' asset to open it.
  3. PIE, and wait for the "Disabled Tick" message to appear in the log/console.
  4. Press ESC (or click Stop) to attempt to exit PIE. A crash will result due to a failed assertion:
    [2018.03.23-15.43.11:907][  7]LogWindows: Error: === Critical error: ===
    [2018.03.23-15.43.11:909][  7]LogWindows: Error: 
    [2018.03.23-15.43.11:910][  7]LogWindows: Error: Assertion failed: AllEnabledTickFunctions.Remove(TickFunction) == 1 [File:D:\dev\Epic\UE4\Dev-Framework\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp] [Line: 1202] 
    [2018.03.23-15.43.11:912][  7]LogWindows: Error: 
    [2018.03.23-15.43.11:914][  7]LogWindows: Error: 
    [2018.03.23-15.43.11:916][  7]LogWindows: Error: 
    [2018.03.23-15.43.11:918][  7]LogWindows: Error: 
    
Callstack

UE4Editor-Core-Win64-Debug.dll!FDebug::AssertFailed(const char * Expr, const char * File, int Line, const wchar_t * Format, ...) Line 419 C++
UE4Editor-Engine-Win64-Debug.dll!FTickTaskLevel::RemoveTickFunction(FTickFunction * TickFunction) Line 1204 C++
UE4Editor-Engine-Win64-Debug.dll!FTickTaskManager::RemoveTickFunction(FTickFunction * TickFunction) Line 1518 C++
UE4Editor-Engine-Win64-Debug.dll!FTickFunction::UnRegisterTickFunction() Line 1655 C++
UE4Editor-Engine-Win64-Debug.dll!FTickFunction::~FTickFunction() Line 1623 C++
[External Code]
UE4Editor-CoreUObject-Win64-Debug.dll!IncrementalPurgeGarbage(bool bUseTimeLimit, float TimeLimit) Line 1121 C++
UE4Editor-CoreUObject-Win64-Debug.dll!CollectGarbageInternal(EObjectFlags KeepFlags, bool bPerformFullPurge) Line 1516 C++
UE4Editor-CoreUObject-Win64-Debug.dll!CollectGarbage(EObjectFlags KeepFlags, bool bPerformFullPurge) Line 1540 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::EndPlayMap() Line 468 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1924 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 401 C++
UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 3382 C++
UE4Editor-Win64-Debug.exe!EngineTick() Line 63 C++
UE4Editor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 169 C++
UE4Editor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 199 C++

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.184.194.20
Target Fix4.19.1
Fix Commit3965154
CreatedMar 23, 2018
ResolvedMar 26, 2018
UpdatedApr 27, 2018
View Jira Issue