SocketIOClient-Unreal icon indicating copy to clipboard operation
SocketIOClient-Unreal copied to clipboard

Crash on UE5(5.0.3) editor and game (Assertion failed: IsValid()) (plugin version 2.3)

Open LiXiaoRan opened this issue 1 year ago • 7 comments

When I close the editor, I will have this problem, Especially when the Socketio's blueprint window is closed, there may be a probability that it will collapse, The error info as: `LoginId:8e90977b421e9c397349c687519750d6 EpicAccountId:47510f2cf5d240aca889bdd388c10c6f

Assertion failed: IsValid() [File:C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1074]

UnrealEditor_SocketIOClient!USocketIOClientComponent::Disconnect() [C:\Users\liran23\baidu\personal-code\mapopen-unreal-gd\mapopen_unreal_gd\Plugins\SocketIOClient\Source\SocketIOClient\Private\SocketIOClientComponent.cpp:438] UnrealEditor_CoreUObject!UFunction::Invoke() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5912] UnrealEditor_CoreUObject!UObject::CallFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1012] UnrealEditor_CoreUObject!UObject::ProcessContextOpcode() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2871] UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1082] UnrealEditor_CoreUObject!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:912] UnrealEditor_CoreUObject!ProcessLocalFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1143] UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1082] UnrealEditor_CoreUObject!UObject::ProcessInternal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1170] UnrealEditor_CoreUObject!UFunction::Invoke() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5912] UnrealEditor_CoreUObject!UObject::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2003] UnrealEditor_Engine!AActor::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:1030] UnrealEditor_Engine!AActor::Destroyed() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:2628] UnrealEditor_Engine!UWorld::DestroyActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:866] UnrealEditor_Engine!UWorld::EditorDestroyActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:770] UnrealEditor_Kismet!FBlueprintEditor::DestroyPreview() [D:\build++UE5\Sync\Engine\Source\Editor\Kismet\Private\BlueprintEditor.cpp:9807] UnrealEditor_Kismet!FBlueprintEditor::~FBlueprintEditor() [D:\build++UE5\Sync\Engine\Source\Editor\Kismet\Private\BlueprintEditor.cpp:2633] UnrealEditor_Kismet!FBlueprintEditor::vector deleting destructor'() UnrealEditor_UnrealEd!FAssetEditorToolkit::CloseWindow() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\Toolkits\AssetEditorToolkit.cpp:448] UnrealEditor_UnrealEd!UAssetEditorSubsystem::CloseAllAssetEditors() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\Subsystems\AssetEditorSubsystem.cpp:275] UnrealEditor_UnrealEd!UAssetEditorSubsystem::OnEditorClose() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\Subsystems\AssetEditorSubsystem.cpp:94] UnrealEditor_UnrealEd!TBaseUObjectMethodDelegateInstance<0,UAssetEditorSubsystem,void __cdecl(void),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:611] UnrealEditor_Engine!TMulticastDelegate<void __cdecl(void),FDefaultDelegateUserPolicy>::Broadcast() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:967] UnrealEditor_MainFrame!FMainFrameHandler::ShutDownEditor() [D:\build\++UE5\Sync\Engine\Source\Editor\MainFrame\Private\Frame\MainFrameHandler.cpp:28] UnrealEditor_MainFrame!TBaseRawMethodDelegateInstance<0,FMainFrameHandler,void __cdecl(TSharedRef<SWindow,1> const &),FDefaultDelegateUserPolicy>::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:453] UnrealEditor_SlateCore!SWindow::RequestDestroyWindow() [D:\build\++UE5\Sync\Engine\Source\Runtime\SlateCore\Private\Widgets\SWindow.cpp:1362] UnrealEditor_Slate!SWindowTitleBar::CloseButton_OnClicked() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Public\Framework\Application\SWindowTitleBar.h:535] UnrealEditor_Slate!TBaseSPMethodDelegateInstance<0,SWindowTitleBar,1,FReply __cdecl(void),FDefaultDelegateUserPolicy>::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:290] UnrealEditor_Slate!SButton::ExecuteOnClick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SButton.cpp:464] UnrealEditor_Slate!SButton::OnMouseButtonUp() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SButton.cpp:389] UnrealEditor_Slate!<lambda_51e270ca99ea7ce852539efd04dd453f>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4959] UnrealEditor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_51e270ca99ea7ce852539efd04dd453f> >() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:405] UnrealEditor_Slate!FSlateApplication::RoutePointerUpEvent() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4945] UnrealEditor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5493] UnrealEditor_Slate!FSlateApplication::OnMouseUp() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5458] UnrealEditor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2210] UnrealEditor_ApplicationCore!FWindowsApplication::DeferMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2699] UnrealEditor_ApplicationCore!FWindowsApplication::ProcessMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1078] UnrealEditor_ApplicationCore!FWindowsApplication::AppWndProc() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:916] user32 user32 InkObj atlthunk user32 user32 UnrealEditor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:138] UnrealEditor!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5139] UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183] UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147] UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283] UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330] UnrealEditor!__scrt_common_main_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] kernel32 InfraCore64 ntdll

These is log files. logs.log

LiXiaoRan avatar Sep 19 '22 08:09 LiXiaoRan

Based on the line that's being referenced (https://github.com/getnamo/SocketIOClient-Unreal/blob/v2.3.0/Source/SocketIOClient/Private/SocketIOClientComponent.cpp#L438) it appears your NativeClient pointer is invalid at the time that the disconnect call happens. Check that you're not releasing the native client twice somehow.

getnamo avatar Sep 20 '22 00:09 getnamo

Thank U very much for your answer, Excuse me, how to do it as "releasing the native client"?is socketioclient.Connect? I have the interact of control connect and disconnected, that can be disconnected and connect multiple times.

LiXiaoRan avatar Sep 20 '22 06:09 LiXiaoRan

Based on the line that's being referenced (https://github.com/getnamo/SocketIOClient-Unreal/blob/v2.3.0/Source/SocketIOClient/Private/SocketIOClientComponent.cpp#L438) it appears your NativeClient pointer is invalid at the time that the disconnect call happens. Check that you're not releasing the native client twice somehow.

Excuse me, how to do it as "releasing the native client"?is socketioclient.Connect? I have the interact of control connect and disconnected, that can be disconnected and connect multiple times.

LiXiaoRan avatar Sep 21 '22 02:09 LiXiaoRan

What's the context of the component, is it added to and actor or placed in a different class?

getnamo avatar Sep 21 '22 06:09 getnamo

What's the context of the component, is it added to and actor or placed in a different class?

I added it to an Actor blueprint class and closed auto-connect. Through the blueprint for manual control at the right time to connect and disconnect. Please can you tell me should how to change it? image image

LiXiaoRan avatar Sep 22 '22 02:09 LiXiaoRan

It's possible you're calling the disconnect incorrectly, try using SyncDisconnect (only available in c++ atm)

are you running this in an editor context (e.g. within editor functions) or in a play mode (e.g. PIE)?

getnamo avatar Sep 25 '22 06:09 getnamo

It's possible you're calling the disconnect incorrectly, try using SyncDisconnect (only available in c++ atm)

are you running this in an editor context (e.g. within editor functions) or in a play mode (e.g. PIE)?

I use editor context because I use blueprint to develop a game. Did I add an valid judgment at the C++ Source code (https://github.com/getnamo/SocketIOClient-Unreal/blob/v2.3.0/Source/SocketIOClient/Private/SocketIOClientComponent.cpp#L438)?

LiXiaoRan avatar Sep 25 '22 09:09 LiXiaoRan