Error requested GameplayTag in editor-time code

Hello everyone ! First of all thanks for reading this message and trying to contribute ! :grinning:

Context: I’m currently trying to create a custom blueprint node using the Kismet Uk2Node class. All my code is in a plugin submodule which is of type UncoockedOnly with the loading phase set to PostDefault.

My node has an input pin of type FGameplayTag declared like this :

LogProfilePin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, GetLogProfilePinName());
	LogProfilePin->PinToolTip = LOCTEXT("LogProfilePinToolTip", "The log profile to use for this log node.").ToString();
	LogProfilePin->PinType.PinSubCategoryObject = FGameplayTag::StaticStruct();
	LogProfilePin->PinType.bIsReference = false;
	LogProfilePin->PinType.bIsConst = true;
	LogProfilePin->DefaultValue = FGameplayTag::EmptyTag.ToString();

When the tag change i need to fetch the new value of the pin to search an object in porject’s settings. To do so i need to get the Pin value as string (because kismet work like that) and then i try to convert it as a FGameplayTag using :


FGameplayTag LogProfileTag = FGameplayTag::RequestGameplayTag(FName(*ProfilePin->DefaultValue));

But here is the problem…

Problem: When the tag change my callbacks run the code shown above ant it run into this error :

LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: false  [File:D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\GameplayTags\Private\GameplayTagsManager.cpp] [Line: 1965] 
LogOutputDevice: Error: Requested Gameplay Tag (TagName="BULogProfiles.Default") was not found, tags must be loaded from config or registered as a native tag
LogOutputDevice: Error: Stack: 
LogOutputDevice: Error: [Callstack] 0x00007ff9a337e7e6 UnrealEditor-GameplayTags.dll!UGameplayTagsManager::RequestGameplayTag() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\GameplayTags\Private\GameplayTagsManager.cpp:1965]
LogOutputDevice: Error: [Callstack] 0x00007ff8d4a8ad4d UnrealEditor-LogSystem.dll!UK2BULogNode::PinDefaultValueChanged() [D:\Perforce\UnrealEngine-Angelscript\PluginSandboxProject\Plugins\BlueprintUtilities\Source\LogSystem\Private\BULogNode.cpp:399]
LogOutputDevice: Error: [Callstack] 0x00007ff950533acc UnrealEditor-BlueprintGraph.dll!UEdGraphSchema_K2::TrySetDefaultValue() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Editor\BlueprintGraph\Private\EdGraphSchema_K2.cpp:5008]
LogOutputDevice: Error: [Callstack] 0x000001b3b85ef915 UnrealEditor-GameplayTagsEditor.dll!SGameplayTagGraphPin::OnTagChanged() [D:\Perforce\UnrealEngine-Angelscript\Engine\Plugins\Editor\GameplayTagsEditor\Source\GameplayTagsEditor\Private\SGameplayTagGraphPin.cpp:38]
LogOutputDevice: Error: [Callstack] 0x000001b3b8580979 UnrealEditor-GameplayTagsEditor.dll!TBaseSPMethodDelegateInstance<0,SGameplayTagGraphPin,1,void __cdecl(FGameplayTag),FDefaultDelegateUserPolicy>::Execute() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:281]
LogOutputDevice: Error: [Callstack] 0x000001b3b85f38c7 UnrealEditor-GameplayTagsEditor.dll!SGameplayTagCombo::OnTagSelected() [D:\Perforce\UnrealEngine-Angelscript\Engine\Plugins\Editor\GameplayTagsEditor\Source\GameplayTagsEditor\Private\SGameplayTagCombo.cpp:251]
LogOutputDevice: Error: [Callstack] 0x000001b3b858ae40 UnrealEditor-GameplayTagsEditor.dll!TBaseSPMethodDelegateInstance<0,SGameplayTagCombo,1,void __cdecl(TArray<FGameplayTagContainer,TSizedDefaultAllocator<32> > const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:298]
LogOutputDevice: Error: [Callstack] 0x000001b3b84ceb66 UnrealEditor-GameplayTagsEditor.dll!TDelegate<void __cdecl(TArray<FGameplayTagContainer,TSizedDefaultAllocator<32> > const &),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:570]
LogOutputDevice: Error: [Callstack] 0x000001b3b85efd8e UnrealEditor-GameplayTagsEditor.dll!SGameplayTagPicker::OnTagChecked() [D:\Perforce\UnrealEngine-Angelscript\Engine\Plugins\Editor\GameplayTagsEditor\Source\GameplayTagsEditor\Private\SGameplayTagPicker.cpp:809]
LogOutputDevice: Error: [Callstack] 0x000001b3b85ef9ab UnrealEditor-GameplayTagsEditor.dll!SGameplayTagPicker::OnTagCheckStatusChanged() [D:\Perforce\UnrealEngine-Angelscript\Engine\Plugins\Editor\GameplayTagsEditor\Source\GameplayTagsEditor\Private\SGameplayTagPicker.cpp:768]
LogOutputDevice: Error: [Callstack] 0x000001b3b858cef5 UnrealEditor-GameplayTagsEditor.dll!TBaseSPMethodDelegateInstance<0,SGameplayTagPicker,1,void __cdecl(enum ECheckBoxState),FDefaultDelegateUserPolicy,TSharedPtr<FGameplayTagNode,1> >::ExecuteIfSafe() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:298]
LogOutputDevice: Error: [Callstack] 0x00007ff9763b7127 UnrealEditor-Slate.dll!TDelegate<void __cdecl(enum ECheckBoxState),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:570]
LogOutputDevice: Error: [Callstack] 0x00007ff97643a1ef UnrealEditor-Slate.dll!SCheckBox::ToggleCheckedState() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Widgets\Input\SCheckBox.cpp:391]
LogOutputDevice: Error: [Callstack] 0x00007ff97641d899 UnrealEditor-Slate.dll!SCheckBox::OnMouseButtonUp() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Widgets\Input\SCheckBox.cpp:248]
LogOutputDevice: Error: [Callstack] 0x00007ff976173a43 UnrealEditor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,`FSlateApplication::RoutePointerUpEvent'::`8'::<lambda_3> >() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:442]
LogOutputDevice: Error: [Callstack] 0x00007ff9761dddb5 UnrealEditor-Slate.dll!FSlateApplication::RoutePointerUpEvent() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5206]
LogOutputDevice: Error: [Callstack] 0x00007ff9761cb0b6 UnrealEditor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5775]
LogOutputDevice: Error: [Callstack] 0x00007ff9761bde7a UnrealEditor-Slate.dll!FSlateApplication::OnMouseUp() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5740]
LogOutputDevice: Error: [Callstack] 0x00007ff9a45378f9 UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2231]
LogOutputDevice: Error: [Callstack] 0x00007ff9a451b54f UnrealEditor-ApplicationCore.dll!FWindowsApplication::DeferMessage() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2738]
LogOutputDevice: Error: [Callstack] 0x00007ff9a453a5bb UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessMessage() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1907]
LogOutputDevice: Error: [Callstack] 0x00007ff9a4513053 UnrealEditor-ApplicationCore.dll!FWindowsApplication::AppWndProc() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:937]
LogOutputDevice: Error: [Callstack] 0x00007ff9f8d08961 USER32.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ff9f8d08421 USER32.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ff9a453bc96 UnrealEditor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:148]
LogOutputDevice: Error: [Callstack] 0x00007ff6229c73a2 UnrealEditor.exe!FEngineLoop::Tick() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5749]
LogOutputDevice: Error: [Callstack] 0x00007ff6229ec9f0 UnrealEditor.exe!GuardedMain() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
LogOutputDevice: Error: [Callstack] 0x00007ff6229ecada UnrealEditor.exe!GuardedMainWrapper() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
LogOutputDevice: Error: [Callstack] 0x00007ff6229eff94 UnrealEditor.exe!LaunchWindowsStartup() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
LogOutputDevice: Error: [Callstack] 0x00007ff622a05f44 UnrealEditor.exe!WinMain() [D:\Perforce\UnrealEngine-Angelscript\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
LogOutputDevice: Error: [Callstack] 0x00007ff622a0910a UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
LogOutputDevice: Error: [Callstack] 0x00007ff9f899257d KERNEL32.DLL!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ff9fa84aa48 ntdll.dll!UnknownFunction []

I’m very confused because my tags are valid and loaded in the editor (i can see and manage them in settings + I can select them in the pin GameplayTag selector). I also tried to replace all my GameplayTag with native tag but same problem occur.

More confusing information is that when i run my game, the node execution is perfect and use the tag with no error at all (not even a warning!).

I write this post after two day of debugging and today I’m asking for help because i have no more idea to fix this.

Thanks again for reading and/or helping :grin:

I finally found the problem and it was right in front of me all the time…

The problem was that the string i used to request the GameplayTag was not formatted.
I used “TagName=“BULogProfiles.Default”” instead of just “BULogProfiles.Default” so that’s why the GameplayTagManager can’t find it… I feel a little bit dumb but I’m happy that my bug is now fixed ! :star_struck:

1 Like