K2_DestroyActor Causes Engine to Freeze Momentarily

So I’m just trying to destroy a C++ actor and it’s turning out to be quite a chore.

If I call BeginDestroy() then for whatever reason the engine crashes giving me a segfault. And if I call K2_DestroyActor as recommended by , then the engine stalls for a good second. There has to be a more intuitive way to go about doing something so simple.

There definitly something wrong, DestroyActor() should work fine. Check the logs maybe there info in there (Saved/Logs in your project directory). Make sure you overriding functions in that actor with Super calls, you might lock up some engine code by accident which cause crash on destroy.

For some reason Destroy() started working automagically. I’ve been having some really strange issues with c++ actors like engine crashing after manually deleting c++ actor from editor viewport. This is after successfully building project.

Do you have any ideas why K2_DestroyActor would cause engine to freeze? I’m working on a machine with pretty decent specs so I don’t think that should be the issue.

As i said look on logs, also try to debug VS will point you where crash happens (remember to install symbol files PDB file). Most common reason why crash would happen is improper override without Super call which may cause code skip and destabilize the actor code. Remeber that your code is technicly is part of engine code, so it needs to cooperate with it.

I’m using XCode on OSX.