mqtt-utilities-unreal
mqtt-utilities-unreal copied to clipboard
Hard Unreal Editor crash when attempting to connect (UE 5.0.2)
I can successfully load and use this plugin in Unreal Engine 5.0.2, but as soon as I add a Connect node, the editor will crash when I try to run. The crash report summary is quite unhelpful:
Caught signal
Unknown() Address = 0x0 (filename not found) [in ???] FRunnableThreadPThread::Run() Address = 0x110d5f034 (filename not found) [in UnrealEditor-Core.dylib] FRunnableThreadPThread::_ThreadProc(void*) Address = 0x110cbf4b4 (filename not found) [in UnrealEditor-Core.dylib] _pthread_start Address = 0x7ff8067d94f4 (filename not found) [in libsystem_pthread.dylib] thread_start Address = 0x7ff8067d500f (filename not found) [in libsystem_pthread.dylib]
Some interesting bits I found in the crash log:
LogPackageName: Display: FPackageName: Mount point added: '../../../../../Projects/Unreal/Studio_Lab/Plugins/mqtt-utilities-unreal/MqttUtilities/Content/' mounted to '/MqttUtilities/' LogOnline: OSS: Created online subsystem instance for: NULL LogOnline: OSS: TryLoadSubsystemAndSetDefault: Loaded subsystem for module [NULL] LogInit: Build: ++UE5+Release-5.0-CL-20280985
And:
[2022.06.20-14.03.31:712][ 0]LogClass: Display: BoolProperty FMqttMessage::Retain is not initialized properly. Module:MqttUtilities File:Public/Entities/MqttMessage.h [2022.06.20-14.03.31:712][ 0]LogClass: Display: IntProperty FMqttMessage::Qos is not initialized properly. Module:MqttUtilities File:Public/Entities/MqttMessage.h [2022.06.20-14.03.31:712][ 0]LogClass: Display: IntProperty FMqttClientConfig::Port is not initialized properly. Module:MqttUtilities File:Public/Entities/MqttClientConfig.h [2022.06.20-14.03.31:712][ 0]LogClass: Display: 3 Uninitialized script struct members found including 0 object properties
And finally:
[2022.06.20-14.07.05:509][159]LogTemp: Warning: MQTT => Creating MQTT client... [2022.06.20-14.07.05:509][159]PIE: Server logged in [2022.06.20-14.07.05:572][159]LogMac: === Critical error: === SIGSEGV: invalid attempt to access memory at address 0x0
[2022.06.20-14.07.05:572][159]LogMac: 0x10d5f034 UnrealEditor-Core.dylib!FRunnableThreadPThread::Run() [UnknownFile]) 0x10cbf4b4 UnrealEditor-Core.dylib!FRunnableThreadPThread::_ThreadProc(void*) [UnknownFile]) 0x067d94f4 libsystem_pthread.dylib!_pthread_start() [UnknownFile]) 0x067d500f libsystem_pthread.dylib!thread_start() [UnknownFile])
Attached is the MQTT section of my level blueprint. Note that the same happens when I leave out the error and message callbacks. Further note that I can run it fine with everything except the Connect node. As soon as I add that and run, this crash occurs.
Any insights on where to look or what to try would be highly appreciated.
Hi @ralphkok, do you experience this issue on Mac with Apple Silicon?
Hi @tustanivsky,
I am running it on a MacBook Pro with an Intel Core i9 processor and a Radeon Pro Vega 20 4GB graphics card.
Have you try to generate a sln file? I use Rider with UE4.27.2 and had similar problem today .Once I call my connect,my editor crash. I generated the sln file and tried to compile, then received Error: "MyprojectName.vcxproj target does not exist in the project" and failed.Google shows MSBuild bug for VS2019(Ref:https://youtrack.jetbrains.com/issue/RIDER-63446). I upadated my VS2019 and created new project in cpp, reconnected my BP Nodes. It works, no crash until now.
I am on MacOS, so am not using Visual Studio. I do have an Xcode workspace setup for the project though, and can build it without any issues.
I've faced similar issues on Mac as well. For some reason native mosquito libraries which are used in this plugin under the hood can't be loaded when starting the editor. Apparently, something has changed in UE5 or with the recent MacOS update that breaks the dylib's loading
I have re-downloaded to try again afresh with UE 5.0.3, and am now getting the attached messages, saying that the dylib files cannot be opened because the developer cannot be verified. It looks like it might be a code signing issue then, but I'm not sure if/how I can tell my OS to trust the files. I can open them manually to do so, but not in the context of UE loading them.


@ralphkok Try to open System Preferences
> Security&Privacy
window and re-launch the UE project - it should present a button allowing to enable .dylibs loading then
Thank you for the pointer @tustanivsky. I was able to whitelist the dylib files, but unfortunately that has not resolved the crash.
What I have found so far is that disabling the line where the thread is created in UMqttClient::Connect() prevents it from crashing. I can see a subsequent log message, but of course no actual connection is made:
LogBlueprintUserMessages: [Lab_C_1] MQTT connection attampted
I will continue to investigate, to see if I can narrow it down any further.
I had a similar problem on Apple Silicon, where the crash was caused by a missing libssl and libcrypto: Please check out my comment here: https://github.com/NinevaStudios/mqtt-utilities-unreal/issues/25