Since yesterday I experienced a very very annoying bug. My project crashes on startup (when the loading screen is about 94%).
My project was going fine until I made some child classes of my blueprints. I identified the blueprint causing the problem since the project starts when I remove it from the content folder. This blueprint is the child of another blueprint (which inherits from Actor). The parent blueprint has some components (which may cause the crash, see log below).
However, I don’t understand what exactly causes the crash because if I redo what I did before it, it may not crash again. But after X minutes, if I close my project and reopen it, it eventually crashes. So I think I am not doing something wrong in blueprint scripting.
However, I am using several structures/enums/maps (TMap) and sets (TSet) inside the blueprint causing the crash (but it never crashed until I created child blueprints).
I have attempted to reproduce the same bug in a blank project, using child classes with components, but since I don’t know what causes all this, I have not yet succeeded.
Just for you know, I already tried to migrate my assets into a new project and to uninstall the engine.
At the moment my only workaround is to save every 15 minutes !!! Because I know it will eventually crash.
Important note : in the log you can notice I use the Runtime Mesh plugin. I experienced the exact same crash with the Procedural Mesh component, so it’s not an issue of unofficial plugins.
If you have strange crashes over specific time of doing nothing it is most likely due to garbage collection not noticing you using object. UE4 got has garbage collection which in specific time rate checks if specific UObject is reference elsewhere, if it’s not it’s considered trash and it’s removed from memory, in that case all pointers referencing to it are turned in to null or become invalided (if pointer variable is not visible to reflection system) and if somethings reads it, it will crash.
This usually happens when UObject is used in variable that is not visible in reflection system (Engine simply don’t see it), don’t have UPROPERTY() in C++ for example, i also know in the past TMap had that issue as it didn’t inform engine about UObject references causing them to be trashed by the engine.
But if you don’t use C++ in your project then this should definitywny considered as a bug. Blueprints unlike native code from C++ is tolerable of calling function on null object so blueprint alone should not cause such crash, issue is either in yours or engine code
Ok, that’s interesting. I use blueprint only.
In my player controller I have a set (TSet) of a child of the child blueprint which causes the crash. I also have a Map with vectors as keys and this same “ChildChild” blueprint as values.
I have a couple of questions for you that will help narrow down what issue it is that you are experiencing.
- I notice that you said you still got the crash with the procedural mesh component, however could you make sure that you still get the crash with the plugin disabled?
- Could you provide your complete callstack from crash reporter (including machine ID(please be sure that you have debugging symbols installed))?
I just disabled the Runtime Mesh plugin and my project crashed. I have to say that I was starting to feel dumb because this time it took more than an hour to crash and I was like “Oh my god, was it the plugin ?”. But as I said I already tested without it. Normally, it doesn’t take so long to crash.
Shortly before it crashes, I added a Map variable to the blueprint causing the crash. I don’t know if it’s relevant.
Thank you for the additional information. After doing some digging and taking a look at the callstack I was able to find that this is a known issue. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.
Link: Unreal Engine Issues and Bug Tracker (UE-40042)
Make it a great day
Ok, good to know. Thank you very much !