Crash when exiting PIE

I was exiting the application when the crash appeared. Error message was “accessing address 00028”. The first picture shows the call stack and the source code where the crash happens, the second the dissasembly from the same code with a register that is used for addressing containing NULL.
I’ve been having quite some inexplicable crashes recently all in the editor and all with some form of null pointer dereferencing

Obviously I don’t know where the bug is, but I can tell you that the crash is happening during garbage collection. This is the reason why your crashes occur at unpredictable times. You’ll probably find that the crash occurs immediately if you force garbage collection ( GetWorld()->ForceGarbageCollection(true) ).

When I’ve had this problem, it’s usually been caused by an uninitialised pointer which is marked as UPROPERTY. It’s okay for UPROPERTY pointers to be null, but it’s not okay for them to contain random junk. If they do, the garbage collector will attempt to free the containing object, and then it will try to work out if any of the object’s UPROPERTY pointers are also eligible to be freed. It will crash either when it tries to make this test, or when it attempts to free the pointer.

Hey -

Does this crash reproduce in a new empty project? Can you post the log files from the crash? Seeing PeteX’s response below, have you checked if any of your UPROPERTY pointers are null or have junk values stored in them?


I don’t have logfiles anymore, since these and the other random crashes I reported were just one time things. It doesn’t happen in my project every time either.
I have now set all the pointer that are declared as UPROPERTY to null in the class declaration in accordance with the new syntax and will see if it happens again.
If it happens again, I will post here and include a copy of the logfiles

Thanks, like I said above, I try it out and see, so far this seems to have helped