RealDocs

FTimerManager::OnCrash

function Engine Since 4.0
#include "TimerManager.h"
Access: public Specifiers: ENGINE_APIvirtual

Description

Called by the crash handler to dump diagnostic information about the current state of all timers to the log. Helps diagnose crashes that occur inside timer callbacks.

Caveats & Gotchas

  • This method is invoked from the crash reporter, which runs in an unsafe context — do not add any allocations or heavy operations to an override of this method.
  • The output goes to the engine log (and the crash callstack), not to the screen. You must look at the saved log file or the Unreal crash reporter to see the timer dump.

Signature

ENGINE_API virtual void OnCrash()

Return Type

void

Example

Overriding OnCrash in a derived manager C++
class FMyTimerManager : public FTimerManager
{
public:
    virtual void OnCrash() override
    {
        Super::OnCrash(); // dumps built-in timer info first
        UE_LOG(LogTemp, Error, TEXT("MyTimerManager: custom crash state info here"));
    }
};

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.