Crash on Editor startup after adding empty UObject to Plugin

Hey there,

I can’t post a lot of actual code, as it’s NDA, but I got a Plugin that has a MeshReduction Module.
In this Plugin, I recently added a UObject. I’m not using it anywhere yet, nor does it have any code.
Removing it or moving it into a different Plugin in the same Solution/Project solves the crash.
But that’s not really a solution :stuck_out_tongue:

The crash happens here:

UClass* Class = Registrant();

“Line 801” in Function “UObjectLoadAllCompiledInDefaultProperties()” in File/Class “UObjectBase.cpp”

I tried using Launcher and Source build of 4.16. I tried DevelopmentEditor and DebugEditor.
No matter what I get the following crash/breakpoint as soon as I have a UObject in my plugin folder.
(It compiles fine though).

“Cast of nullptr to Package failed”

Any idea WHY this could happen? Is it maybe something cause of the IMeshReductionModule Interface?
I can’t really find anyone else having this problem :confused:

Small addition: 4.17 Launcher Project, same crash. So updating won’t solve it.

Hello, I’m in exactly the same situation, did you find a solution/workaround for this?

Yes and no. In my case, the existing MeshReducation Module caused this.
The solution here was the following:

Create a second Module for your Plugin and use the classes of the first one in that second one.
Then the Plugin doesn’t crash anymore. I do not know what exactly causes it, only that the MeshReducation Module caused it.

Yes and no. In my case, the existing MeshReducation Module caused this. The solution here was the following:

Create a second Module for your Plugin and use the classes of the first one in that second one. Then the Plugin doesn’t crash anymore. I do not know what exactly causes it, only that the MeshReducation Module caused it.