Hello,
I’m seeing a rare crash caused by an assertion in Slate code. Here is the stack:
[FONT=Courier New]> libc.prx!abort + 4 bytes C++
mygame.self!FPS4Misc::RequestExit(bool Force) Line 414 + 5 bytes C++
mygame.self!FOutputDeviceAnsiError::Serialize(const TCHAR* Msg, enum ELogVerbosity::Type Verbosity, const FName& Category) Line 1457 + 10 bytes C++
mygame.self!FOutputDevice::Logf(const TCHAR* Fmt) Line 94 + 290 bytes C++
mygame.self!FDebug::AssertFailed(const ANSICHAR* Expr, const ANSICHAR* File, int32 Line, const TCHAR* Format) Line 421 + 122 bytes C++
mygame.self!FHittestGrid::FindNextFocusableWidget(const FArrangedWidget& StartingWidget, enum class EUINavigation const Direction, const FNavigationReply& NavigationReply, const FArrangedWidget& RuleWidget) Line 532 + 536 bytes C++
mygame.self!FSlateApplication::AttemptNavigation(const FNavigationEvent& NavigationEvent, const FNavigationReply& NavigationReply, const FArrangedWidget& BoundaryWidget) Line 5601 + 59 bytes C++
mygame.self!FSlateApplication::ProcessReply(const FWidgetPath& CurrentEventPath, const FReply TheReply, const FWidgetPath* WidgetsUnderMouse, const FPointerEvent* InMouseEvent, uint32 UserIndex) Line 2999 + 29 bytes C++
mygame.self!FEventRouter::ProcessReply(FSlateApplication* Application, const FWidgetPath& RoutingPath, const FReply& Reply, const FWidgetPath* WidgetsUnderCursor, const FInputEvent* PointerEvent) Line 234 + 299 bytes C++
mygame.self!FSlateApplication::ProcessKeyDownEvent(FKeyEvent& InKeyEvent) Line 4515 + 97 bytes C++
mygame.self!FSlateApplication::OnControllerButtonPressed(FGamepadKeyNames::Type KeyName, int32 ControllerId, bool IsRepeat) Line 5638 C++
mygame.self!FPS4Controllers::SendControllerEvents(int32 UserIndex, TSharedRef<FGenericApplicationMessageHandler,(ESPMode)0>& MessageHandler) Line 336 C++
mygame.self!FPS4InputInterface::SendControllerEvents() Line 172 + 29 bytes C++
mygame.self!FEngineLoop::Tick() Line 2845 C++
mygame.self!tchar_main(int32 ArgC, TCHAR** ArgV) Line 182 C++
mygame.self!main(int32 ArgC, ANSICHAR** Utf8ArgV) Line 82 + 433 bytes C++
mygame.self!_start + 63 bytes C++
Debugging a bit, the assertion is:
check(CurrentIndex < WidgetsCachedThisFrame->Num());
Knowing little about this code, I started poking around but to find root causes but am curious if there’s any chance this could occur due to something on my end? It would seem like the issue is that the key was pressed before everything was properly initialized, but I’m not sure if my code should be preventing that. Is there a best practice that could avoid such a crash or is this in fact a bug?