question

Chad Reddick avatar image
Chad Reddick asked

UE 5.3: GetMatch Crashes on request

Hello! For some odd reason, after when two clients match during matchmaking, then calling 'GetMatch' it seems to crash on the GetMatch request.

 [2023.11.27-22.09.30:988][886]LogTemp: Matchmaking ticket created!
 [2023.11.27-22.09.36:151][349]LogTemp: Matchmaking in progress...
 [2023.11.27-22.09.42:075][695]LogTemp: Matchmaking in progress...
 [2023.11.27-22.09.47:660][379]LogTemp: Match found!
 [2023.11.27-22.09.47:896][423]LogOutputDevice: Warning: 
    
 Script Stack (0 frames) :
    
 [2023.11.27-22.09.47:906][423]LogWindows: Error: appError called: Assertion failed: IsValid() [File:F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1139] 
    
    
 [2023.11.27-22.09.47:906][423]LogWindows: Windows GetLastError: The operation completed successfully. (0)
 [2023.11.27-22.09.50:424][423]LogWindows: Could not start crash report client using ../../../Engine/Binaries/Win64/CrashReportClient-Win64-Debug.exe
 [2023.11.27-22.09.50:424][423]LogMemory: Platform Memory Stats for Windows
 [2023.11.27-22.09.50:425][423]LogMemory: Process Physical Memory: 946.47 MB used, 949.98 MB peak
 [2023.11.27-22.09.50:425][423]LogMemory: Process Virtual Memory: 3214.95 MB used, 3220.08 MB peak
 [2023.11.27-22.09.50:425][423]LogMemory: Physical Memory: 42355.57 MB used,  22921.42 MB free, 65276.99 MB total
 [2023.11.27-22.09.50:426][423]LogMemory: Virtual Memory: 74873.14 MB used,  8667.29 MB free, 83540.44 MB total
 [2023.11.27-22.09.50:426][423]Message dialog closed, result: Ok, title: The UE-PlayFabTut Game has crashed and will close, text: Assertion failed: IsValid() [File:F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1139] 
    
    
    
    
 [2023.11.27-22.09.50:426][423]LogWindows: Error: === Critical error: ===
 [2023.11.27-22.09.50:426][423]LogWindows: Error: 
 [2023.11.27-22.09.50:427][423]LogWindows: Error: Assertion failed: IsValid() [File:F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1139] 
 [2023.11.27-22.09.50:427][423]LogWindows: Error: 
 [2023.11.27-22.09.50:427][423]LogWindows: Error: 
 [2023.11.27-22.09.50:427][423]LogWindows: Error: 
 [2023.11.27-22.09.50:427][423]LogWindows: Error: [Callstack] 0x00007ff67208b8fb PlayFabTut.exe!TBaseUObjectMethodDelegateInstance<0,UPlayFabSubsystem,void __cdecl(PlayFab::MultiplayerModels::FGetMatchResult const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:667]
 [2023.11.27-22.09.50:428][423]LogWindows: Error: [Callstack] 0x00007ff671944db7 PlayFabTut.exe!PlayFab::UPlayFabMultiplayerAPI::OnGetMatchResult() [F:\PlayFabTut\PlayFabTut\Plugins\PlayFabSDK\Source\PlayFabCpp\Private\Core\PlayFabMultiplayerAPI.cpp:983]
 [2023.11.27-22.09.50:428][423]LogWindows: Error: [Callstack] 0x00007ff671933949 PlayFabTut.exe!TBaseRawMethodDelegateInstance<0,PlayFab::UPlayFabMultiplayerAPI,void __cdecl(TSharedPtr<IHttpRequest,1>,TSharedPtr<IHttpResponse,1>,bool),FDefaultDelegateUserPolicy,TDelegate<void __cdecl(PlayFab::MultiplayerModels::FGetMatchResult const &),FDefaultDelegateUserPolicy>,TDelegate<void __cdecl(PlayFab::FPlayFabCppError const &),FDefaultDelegateUserPolicy> >::ExecuteIfSafe() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:534]
 [2023.11.27-22.09.50:428][423]LogWindows: Error: [Callstack] 0x00007ff66bac87ff PlayFabTut.exe!TDelegate<void __cdecl(TSharedPtr<IHttpRequest,1>,TSharedPtr<IHttpResponse,1>,bool),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:570]
 [2023.11.27-22.09.50:428][423]LogWindows: Error: [Callstack] 0x00007ff66badddbb PlayFabTut.exe!FCurlHttpRequest::FinishRequest() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Online\HTTP\Private\Curl\CurlHttp.cpp:1261]
 [2023.11.27-22.09.50:429][423]LogWindows: Error: [Callstack] 0x00007ff66bb09824 PlayFabTut.exe!FHttpManager::Tick() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Online\HTTP\Private\HttpManager.cpp:434]
 [2023.11.27-22.09.50:429][423]LogWindows: Error: [Callstack] 0x00007ff66a03e015 PlayFabTut.exe!TBaseRawMethodDelegateInstance<0,FTSTickerObjectBase,bool __cdecl(float),FDefaultDelegateUserPolicy>::Execute() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:518]
 [2023.11.27-22.09.50:429][423]LogWindows: Error: [Callstack] 0x00007ff66a03f8a2 PlayFabTut.exe!FTSTicker::FElement::Fire() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Private\Containers\Ticker.cpp:157]
 [2023.11.27-22.09.50:429][423]LogWindows: Error: [Callstack] 0x00007ff66a05c818 PlayFabTut.exe!FTSTicker::Tick() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Private\Containers\Ticker.cpp:110]
 [2023.11.27-22.09.50:429][423]LogWindows: Error: [Callstack] 0x00007ff66a02c100 PlayFabTut.exe!`FTSBackgroundableTicker::FTSBackgroundableTicker'::`2'::<lambda_1>::operator()() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Private\Containers\BackgroundableTicker.cpp:29]
 [2023.11.27-22.09.50:430][423]LogWindows: Error: [Callstack] 0x00007ff66a03df8e PlayFabTut.exe!TBaseFunctorDelegateInstance<bool __cdecl(float),FDefaultDelegateUserPolicy,TFunction<bool __cdecl(float)> >::Execute() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:863]
 [2023.11.27-22.09.50:430][423]LogWindows: Error: [Callstack] 0x00007ff66a03f8a2 PlayFabTut.exe!FTSTicker::FElement::Fire() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Private\Containers\Ticker.cpp:157]
 [2023.11.27-22.09.50:430][423]LogWindows: Error: [Callstack] 0x00007ff66a05c818 PlayFabTut.exe!FTSTicker::Tick() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Core\Private\Containers\Ticker.cpp:110]
 [2023.11.27-22.09.50:430][423]LogWindows: Error: [Callstack] 0x00007ff671437754 PlayFabTut.exe!FEngineLoop::Tick() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:6073]
 [2023.11.27-22.09.50:431][423]LogWindows: Error: [Callstack] 0x00007ff67144bebe PlayFabTut.exe!GuardedMain() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
 [2023.11.27-22.09.50:432][423]LogWindows: Error: [Callstack] 0x00007ff67144bf9a PlayFabTut.exe!GuardedMainWrapper() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
 [2023.11.27-22.09.50:432][423]LogWindows: Error: [Callstack] 0x00007ff67144ee35 PlayFabTut.exe!LaunchWindowsStartup() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
 [2023.11.27-22.09.50:433][423]LogWindows: Error: [Callstack] 0x00007ff67145ea04 PlayFabTut.exe!WinMain() [F:\UE5\UE5_3_2\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:299]
 [2023.11.27-22.09.50:433][423]LogWindows: Error: [Callstack] 0x00007ff6755f225a PlayFabTut.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
 [2023.11.27-22.09.50:434][423]LogWindows: Error: [Callstack] 0x00007ffe3fff257d KERNEL32.DLL!UnknownFunction []
 [2023.11.27-22.09.50:434][423]LogWindows: Error: 
 [2023.11.27-22.09.50:440][423]LogExit: Executing StaticShutdownAfterError
 [2023.11.27-22.09.50:442][423]LogWindows: FPlatformMisc::RequestExit(1, LaunchWindowsStartup.ExceptionHandler)
 [2023.11.27-22.09.50:445][423]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, LaunchWindowsStartup.ExceptionHandler)
 [2023.11.27-22.09.50:445][423]LogCore: Engine exit requested (reason: Win RequestExit)

Snippet of When the match is found and when it calls GetMatch

 void UPlayFabSubsystem::CheckMatchmakingTicket(FString& TicketId)
 {
     PlayFab::MultiplayerModels::FGetMatchmakingTicketRequest request;
     request.TicketId = TicketId;
     request.QueueName = TEXT("QuickMatch");
     multiplayerAPI->GetMatchmakingTicket(request,
         PlayFab::UPlayFabMultiplayerAPI::FGetMatchmakingTicketDelegate::CreateLambda([this, TicketId](const PlayFab::MultiplayerModels::FGetMatchmakingTicketResult& Result)
         {
             if (Result.TicketId == TicketId)
             {
                 if (Result.Status == "Matched")
                 {
                     UE_LOG(LogTemp, Log, TEXT("Match found!"));
                     bIsMatchmaking = false;
                     MatchmakingTimerHandle.Invalidate();
                     ProcessMatchmakingTicket(Result.MatchId);
                 }
                 else if (Result.Status == "Canceled")
                 {
                     UE_LOG(LogTemp, Log, TEXT("Matchmaking canceled!"));
                     bIsMatchmaking = false;
                     MatchmakingTimerHandle.Invalidate();
                 }
                 else
                 {
                     UE_LOG(LogTemp, Log, TEXT("Matchmaking in progress..."));
                     GetWorld()->GetTimerManager().SetTimer(MatchmakingTimerHandle, MatchmakingDelegate, 5.f, false);
                 }
             }
         }),
         PlayFab::FPlayFabErrorDelegate::CreateLambda([](const PlayFab::FPlayFabCppError& Error)
         {
             UE_LOG(LogTemp, Error, TEXT("Something went wrong with your first API call.\nHere's some debug information:\n%s"), *Error.GenerateErrorReport());
         }));
 }
    
 void UPlayFabSubsystem::ProcessMatchmakingTicket(const FString& TicketId)
 {
     PlayFab::MultiplayerModels::FGetMatchRequest request;
     request.QueueName = TEXT("QuickMatch");
     request.MatchId = TicketId;
     request.ReturnMemberAttributes = true;
     request.EscapeObject = true;
     if (multiplayerAPI)
     {
         multiplayerAPI->GetMatch(request,
             PlayFab::UPlayFabMultiplayerAPI::FGetMatchDelegate::CreateUObject(this, &ThisClass::OnGetMatchSuccess),
             PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &ThisClass::OnGetMatchError));
     }
 }

Is there a reason why the Assertion is failing with GetMatch?

Matchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Infer Wang avatar image
Infer Wang answered

Is this issue 100% reproduceable? It looks like the memory usage in the error log is big, you may check if it’s a memory usage issue.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chad Reddick avatar image Chad Reddick commented ·

I managed to resolve this issue quite quickly. It was a combination of two things:

  1. I forgot to re-checkbox the 'Enable server allocation' in the Matchmaking queue.

  2. Since matching was working, I also needed to provide the Latencies and region to the MM ticket.

0 Likes 0 ·
Infer Wang avatar image Infer Wang Chad Reddick commented ·

Thanks for your sharing. I’m glad you solved the problem.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.