Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard Unreal Editor crash when attempting to connect (UE 5.0.2) #20

Open
ralphkok opened this issue Jun 20, 2022 · 9 comments
Open

Hard Unreal Editor crash when attempting to connect (UE 5.0.2) #20

ralphkok opened this issue Jun 20, 2022 · 9 comments

Comments

@ralphkok
Copy link

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.

Screenshot 2022-06-20 at 16 04 46

@tustanivsky
Copy link
Member

Hi @ralphkok, do you experience this issue on Mac with Apple Silicon?

@ralphkok
Copy link
Author

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.

@jiadevr
Copy link

jiadevr commented Jun 24, 2022

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.

@ralphkok
Copy link
Author

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.

@tustanivsky
Copy link
Member

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

@ralphkok
Copy link
Author

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.

Screenshot 2022-07-19 at 09 51 19

Screenshot 2022-07-19 at 09 51 30

@tustanivsky
Copy link
Member

@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

@ralphkok
Copy link
Author

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.

@markusloffler
Copy link

markusloffler commented Nov 13, 2023

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: #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants