오류는 언제나 그렇듯이 불현듯 찾아온다. 이 오류도 그랬다.
Fatal error!
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000018
0x00007ff8bb182df1 UnrealEditor-CoreUObject.dll!UObjectBaseUtility::GetFullName() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBaseUtility.cpp:120]
0x00007ff8bb182ee1 UnrealEditor-CoreUObject.dll!UObjectBaseUtility::GetFullName() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBaseUtility.cpp:107]
0x00007ff8bb182d2a UnrealEditor-CoreUObject.dll!UObjectBaseUtility::GetFullName() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBaseUtility.cpp:97]
0x00007ff8b8e93cde UnrealEditor-Engine.dll!`FSoundWaveLoadingBehaviorUtil::CacheAllClassLoadingBehaviors'::`3'::<lambda_1>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:631]
0x00007ff8b65e698b UnrealEditor-Engine.dll!AActor::GetWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:632]
0x0000019aebc1f7c6 UnrealEditor-Pepccine.dll!UE::Core::Private::Function::TFunctionRefCaller<`ANormalMonsterAIC::InitializeBehaviorTree'::`8'::<lambda_1>,void>::Call() [D:\Program Files\UE_5.5\Engine\Source\Runtime\Core\Public\Templates\Function.h:315]
0x00007ff8b86b5ada UnrealEditor-Engine.dll!FTimerUnifiedDelegate::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TimerManager.cpp:367]
0x00007ff8b8732153 UnrealEditor-Engine.dll!FTimerManager::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TimerManager.cpp:1065]
0x00007ff8b76f623d UnrealEditor-Engine.dll!UWorld::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1562]
0x00007ff8b3334b78 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:2140]
0x00007ff8b3fc40d6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:550]
0x00007ff6a6aa6b47 UnrealEditor.exe!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5877]
0x00007ff6a6ac57ac UnrealEditor.exe!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
0x00007ff6a6ac589a UnrealEditor.exe!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:123]
0x00007ff6a6ac9114 UnrealEditor.exe!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:277]
0x00007ff6a6adbd04 UnrealEditor.exe!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:317]
0x00007ff6a6adf0ba UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ff95ae9e8d7 KERNEL32.DLL!UnknownFunction []
Debug를 찍어보니 뜬금없이 UObjectBase.h 라는 엔진 소스에서
FORCEINLINE FName GetFName() const
{
return NamePrivate;
}
라는 코드에 에러가 발생하고 있단다.
도저히 무슨 에러인지 감이 안잡혀서 이것저것을 시도해보다가 결국 원인을 찾아냈다.
BlueprintNativeEvent
언리얼에서 선언은 C++에서 하고 블루프린트에서 구현을 하고 싶은 상황(머터리얼 설정 등)에 BlueprintNativeEvent 라는 매크로 지정자로 함수를 선언할 수 있다.
// MyClass.h
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void SomeFunction();
virtual void SomeFunction_Implementation();
이때 필자는 함수의 구현을 전적으로 블루프린트에 맡기고 싶어서
// MyClass.h
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void SomeFunction();
virtual void SomeFunction_Implementation(){};
이런식으로 SomeFunction_Implementation 함수를 깡통으로 만들었는데 이 부분에서 오류가 발생하는 것으로 보인다.
// MyClass.cpp
void ABaseDoor::SomeFunction_Implementation(){}
얌전히 구현부로 옮겨서 정의를 해주었더니 해결이 되었다.
'Unreal 5 > Troubleshooting' 카테고리의 다른 글
[Unreal 5] SaveGame 으로 stuct를 저장할때 값이 변경되는 문제. (0) | 2025.01.06 |
---|---|
[Unreal 5] C++ 클래스가 언리얼 에디터에서 보이지 않거나 삭제하고 싶을 때 (0) | 2024.12.27 |
[Unreal 5] C++ 클래스 빨간줄이 발생할 때 (0) | 2024.12.27 |