Error when Packaging on Mac OS - M1 Plus

I know that there are some issues when Packaging, but none of the related issues on the forum are the same as the problem I’m finding.

I’m using Cesium for Unreal in the Editor without any issue (3D buildings and map working just fine). But when I try to pack the solution into an executable, the process fails. I’ve already include support for Cpp17, as someone suggested, but still failing.

I’m getting errors compiling the NativizedAssets package.

overridden virtual function is here ~UScreenCreditsWidget();
declared private here UScreenCreditsWidget(const FObjectInitializer& ObjectInitializer);

and

declared private here ~UScreenCreditsWidget();

I’m using last version of UE4.27, and last update of Cesium for Unreal, as well. Compiling on Mac M1 Plus.

Any idea? Thank you very much.

Based on the mention of NativizedAssets, are you trying to use Blueprint Nativization? We haven’t tried to use that ourselves, but from what I understand it is unreliable in general and doesn’t work with Cesium for Unreal in particular. It has also been deprecated in UE5, so we’re unlikely to invest the engineering effort into improving Cesium’s support for it. From the UE5 release notes:

Removed underlying framework and support for the Blueprint nativization feature and all related code modules from the engine.

If my guess is right that you have it enabled, can you try disabling it and see if that helps with the packaging? You should be able to disable it in your project settings:

Kevin

1 Like

Thanks! That made it. Now is crashing on runtime, after packaging, but I think is a different issue.
Best.

OK, I’ve some updates. I’m using another plugin in the same project (SocketIO-Client), and seems like Cesium for Unreal and this particular comm. plugin are not compatible.

If I remove SocketIO, Cesium for Unreal packs just fine. On the other hand, using only SocketIO, works OK. Project fails to pack when combined…

Here is the traced error:

[UE4] Fatal error: [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Mac/MacPlatformMisc.cpp

Can you share more of your log? That one line doesn’t provide much context, especially since it is only mentioning an Engine source file, not one from Cesium or SocketIO.

Sure. It doesn’t say too much:

LogPlayLevel: [2022-10-13 19:50:59] [connect] WebSocket Connection [::1]:8080 v-2 "WebSocket++/0.8.1" /socket.io/?EIO=4&transport=websocket&t=1665683459 101
LogPlayLevel: [2022-10-13 19:50:59] [connect] WebSocket Connection [::1]:8080 v-2 "WebSocket++/0.8.1" /socket.io/?EIO=4&transport=websocket&t=1665683459 101
LogPlayLevel: Warning: [2022.10.13-17.51.00:089][ 69]LogOutputDevice: Warning:
LogPlayLevel: Script Stack (0 frames):
LogPlayLevel: Error: [2022.10.13-17.51.00:089][ 69]LogMac: Error: Error reentered: Fatal error: [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Mac/MacPlatformMisc.cpp] [Line: 2380]
LogPlayLevel: FMacPlatformMisc::GenerateCrashInfoAndLaunchReporter: posix_spawn() failed (13, Permission denied)
LogPlayLevel: Error: [2022.10.13-17.51.00:089][ 69]LogMac: Error: HandleError re-entered.
LogPlayLevel: Error: 2022-10-13 19:51:00.089 VertiportSimulator-Mac-DebugGame[42572:39220722] [UE4] Fatal error: [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Mac/MacPlatformMisc.cpp] [Line: 2380]
LogPlayLevel: FMacPlatformMisc::GenerateCrashInfoAndLaunchReporter: posix_spawn() failed (13, Permission denied)
LogPlayLevel: Error: ERROR: Client exited with error code: 3
LogPlayLevel:        (see /Users/mariano/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Run Task, Time: 20.220606
LogPlayLevel: Error: RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults: Error: Launch failed! Unknown Error

The main problem:
Path: /Users/build/Build/… doesn’t exists. But nothing else. No other clue. I tried to trace the origin of the path, without luck.

The game starts, Cesium API works, building some elements (some traces are OK), and then Websocket is working as well, with some connections.

Then, it crashes, with these traces. No other clue. I’m a little worried because if plug ins are incompatible, I need to re-write the whole communication stack (which I would rather prefer not to do it).

Thank you so much for your help! I’ll keep looking around, and I’ll update the thread if I find something else.

Hmm yeah not much to go on there. Some kind of process has failed to spawn (permission denied), but it’s unclear what failed or why. Cesium isn’t spawning any processes at all AFAIK, so I don’t think it’s our spawn that is failing.

Is there any more detail in /Users/mariano/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt where it says to look for the full exception trace?

It might be worth raising it with the SocketIO folks as well, to see if they have any ideas.

Kevin

Thanks Kevin. No further information or trace on the Log files… Just same error, same traces.
I’m already talking to them. Problem is there is no trace or log, so figuring out where the code is crashing is difficult.

I’ll try to add some traces to SocketIO code. Hopefully I’ll be able to understand the issue.

Nevertheless, I’ll keep this thread updated.

Best,
Mariano.

Well, after a few weeks of testing different environments, finally I was able to test it on a Windows machine (SocketIO plugin is distributed as Windows compatible, after talking with the developer).

Bad news: these specific plug-in combination doesn’t work when compiled as stand-alone. In Editor works perfectly fine. Neither on Windows, :frowning:

Some good news: I have more traces on Windwos, when launched, than in MacOS. Seems that the problem is on rapidjson library, or when it is used, from Cesium side.

Here are the traces:

LogPlayLevel: Error: [2022.10.29-19.06.31:270][326]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000010008
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error:
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff67479699b TestPlugins.exe!rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::Malloc() [C:\Users\Mariano\Documents\Unreal Projects\TestPlugins\Plugins\SocketIOClient\Source\ThirdParty\rapidjson\include\rapidjson\allocators.h:194]
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogThreadingWindows: Error: Runnable thread TaskGraphThreadNP 0 crashed.
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff674836775 TestPlugins.exe!rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: begin: stack for UAT
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff674834ba5 TestPlugins.exe!rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseString<0,rapidjson::EncodedInputStream<rapidjson::UTF8<char>,rapidjson::MemoryStream>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjso
n::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> >() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: === Critical error: ===
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error:
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff6748345ff TestPlugins.exe!rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseObject<0,rapidjson::EncodedInputStream<rapidjson::UTF8<char>,rapidjson::MemoryStream>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjso
n::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> >() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: Fatal error!
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff6748345ff TestPlugins.exe!rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseObject<0,rapidjson::EncodedInputStream<rapidjson::UTF8<char>,rapidjson::MemoryStream>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjso
n::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> >() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error:
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: HandleError re-entered.
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff6748347d4 TestPlugins.exe!rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>::ParseStream<0,rapidjson::UTF8<char>,rapidjson::EncodedInputStream<rapidjson::UTF8<char>,rapidjson::MemoryStream>
 >() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff6748444d1 TestPlugins.exe!Cesium3DTilesSelection::IonRasterOverlay::~IonRasterOverlay() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff6748472ec TestPlugins.exe!std::_Hash<std::_Umap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Cesium3DTilesSelection::IonRasterOverlay::ExternalAssetEndpoint,std::_Uhash_compare<std::basic_string<char,std::char_traits<char>,std::allocator<
char> >,std::hash<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::equal_to<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,Cesium3DTilesSelection::IonRasterOverlay::ExternalAssetEndpoint> >,0> >::find() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff67493ef30 TestPlugins.exe!CesiumAsync::CesiumImpl::ImmediateScheduler<CesiumAsync::CesiumImpl::TaskScheduler>::SchedulerScope::~SchedulerScope() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66f79b6d6 TestPlugins.exe!TGraphTask<FAsyncGraphTask>::ExecuteTask() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66f7ac6b0 TestPlugins.exe!FTaskThreadAnyThread::ProcessTasks() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66f7ad920 TestPlugins.exe!FTaskThreadAnyThread::ProcessTasksUntilQuit() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66f7b32c5 TestPlugins.exe!FTaskThreadAnyThread::Run() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66fccce4f TestPlugins.exe!FRunnableThreadWin::Run() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ff66fcc3360 TestPlugins.exe!FRunnableThreadWin::GuardedRun() []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ffa0d247034 KERNEL32.DLL!UnknownFunction []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: [Callstack] 0x00007ffa0e9a26a1 ntdll.dll!UnknownFunction []
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error:
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: Crash in runnable thread TaskGraphThreadNP 0
LogPlayLevel: Error: [2022.10.29-19.06.31:271][326]LogWindows: Error: end: stack for UAT
LogPlayLevel: Error: ERROR: Client exited with error code: 3
LogPlayLevel:        (see C:\Users\Mariano\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+Juegos+UE_4.27\Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Run Task, Time: 59.607224
LogPlayLevel: BUILD FAILED
PackagingResults: Error: Launch failed! Unknown Error

I’ll try to invastigate it further, on Windows arch. Any idea?

Same problem on UE5/Windows.

This is unfortunately a really painful part of Unreal Engine’s compilation model. In shipping games, all the code from the engine and all active plugins are dumped together into one executable. And it’s impossible to have two different symbols (function, class, etc.) with the same name in a single executable or DLL. So if Cesium uses one version of RapidJSON, and SocketIO uses another, then when their symbols are forced by Unreal Engine to share a namespace we have a big problem. One library or the other will end up using the wrong RapidJSON version, which will fail in any number of interesting ways ranging from linker errors to runtime memory and stack corruption.

The only solution that I’m aware of is to make sure both libraries are using the exact same RapidJSON version, which will require building either Cesium for Unreal or SocketIO yourself.

Kevin

1 Like

Well, I supposed that. Symbol collision… I’ll try to use a different communication method that will not use SocketIO.
Thank you very much for your help. I’m closing the thread now.
Best,
Mariano.