UE v5.2.1
Cesium for Unreal v2.0.0
Also crashed in the Cesium for Unreal Samples.
When I play the level with “Selected Viewport” or “New Editor Window” mode, it run successfully.
It still runs successfully after packaging
The problem only appears in standalone game mode,
Crash Reporter:LoginId:e82792cf4dd995cf4a5ad498cdbd365d
EpicAccountId:440ec9869f2a48b6bffaeca6d40c657e
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000001db8
UnrealEditor_UnrealEd
UnrealEditor_CesiumRuntime!ACesium3DTileset::PostLoad() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:2090]
I tried to modifying the code:
// Only fixup flags in the editor, when not in play mode
if (!IsValid(GEditor) || GEditor->IsPlaySessionInProgress())
return false;
It doesn’t work
This problem happened on another computer either.
How to solve this problem?
We have an active issue for this problem here,
opened 05:03AM - 07 Nov 23 UTC
bug
good first issue
## Environment
OS windows 10
UE v5.3.1
Cesium for Unreal v2.0.0
It can be re… produced in the Cesium for Unreal Samples.
## Reproduce
It can be reproduced in the Cesium for Unreal Samples. Just Open Map 01_CesiumWorld and run it in standalone mode.
## Error Message
```
LoginId:8a8c83a3480311a4b6e32c92b291485b
EpicAccountId:6c7d257aacaa497daf4dbab23bdfbad3
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000002100
UnrealEditor_CesiumRuntime!ACesium3DTileset::PostLoad() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:2090]
UnrealEditor_CoreUObject!UObject::ConditionalPostLoad() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp:1269]
UnrealEditor_CoreUObject!EndLoad() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:2211]
UnrealEditor_CoreUObject!`LoadPackageInternal'::`102'::<lambda_2>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1751]
UnrealEditor_CoreUObject!LoadPackageInternal() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1853]
UnrealEditor_CoreUObject!LoadPackage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:2014]
UnrealEditor_CoreUObject!LoadPackage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1987]
UnrealEditor_Engine!UEngine::LoadMap() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:15001]
UnrealEditor_Engine!UEngine::Browse() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:14390]
UnrealEditor_Engine!UGameInstance::StartGameInstance() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameInstance.cpp:644]
UnrealEditor_Engine!UGameEngine::Start() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameEngine.cpp:1211]
UnrealEditor!FEngineLoop::Init() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4855]
UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:168]
UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
UnrealEditor!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
```
I guess it may caused by `CesiumActors::shouldValidateFlags` function.
```cpp
bool CesiumActors::shouldValidateFlags(UObject* object) {
#if WITH_EDITOR
// Only fixup flags in the editor, when not in play mode
if (GEditor->IsPlaySessionInProgress())
return false;
// In addition, don't fix when loading from an asset file, which sets the
// RF_ClassDefaultObject and RF_ArchetypeObject flags.
if (object->HasAnyFlags(RF_ClassDefaultObject) ||
object->HasAnyFlags(RF_ArchetypeObject))
return false;
else
return true;
#else
return false;
#endif
}
```