Why doe opening blueprints crashes ue4?

im fairly new to unreal, and use blueprints to run everything by following tutorials. since i know 3d modeling and animation i figured in order to make a game all i gotta do is follow tutorials and it should work fine, and it did, until it didn’t. i made a level with basic ai with the FPS template, and somewhere around yesterday during my work session i wanted to open a blueprint of the first person character and suddenly the editor crashed. i tried opening a different blueprint and it crashed again. this repeated with every blueprint i have in the project. i tried to copy all the folders into a new project with the fps template (since the keybinding is all figured out which makes things easier) and it worked at first. i was able to open blueprints like i did before and it was seemingly fine. i wake up today and try to open my projects’ blueprints and it causes crashes again.
i dont know what could possibly cause this and even after searching the internet and the forums no answer really helps. i dont have a previous version of the project that i can restore to, and dont want to lose hundred of hours for nought. if any additional information is needed i’ll gladly try to share it.
EDIT: now i tried opening my first project and i can open blueprints in it just fine, but the new project now suffers from the crashes… Its so strange, theres no apperant reason to this, it comes and goes on a whim.

Can you post the error message from the crash handlers?

Can’t really tell you what’s going wrong without knowing the error

This is what it says when it crashes:

LoginId:6b872f814b123ee1190f5894e6115524
EpicAccountId:ebfff0f93bb848d6a99bfe2192b816aa

Assertion failed: Result + NumToAdd <= MaxElements [File:D:\Build++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject/UObjectArray.h] [Line: 538] Maximum number of UObjects (65536) exceeded, make sure you update MaxObjectsInGame/MaxObjectsInEditor/MaxObjectsInProgram in project settings.

UE4Editor_Core
UE4Editor_Core
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_BlueprintGraph
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_GraphEditor
UE4Editor_GraphEditor
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_Kismet
UE4Editor_AssetTools
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_ContentBrowserAssetDataSource
UE4Editor_ContentBrowserAssetDataSource
UE4Editor_ContentBrowserAssetDataSource
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
user32
user32
UE4Editor_ApplicationCore
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

From the looks of it, you’re creating too many objects for the engine to handle. You say that you are created an FPS, are you creating bullets or something?

Either set a lifetime for the objects, look into Object Pooling or do as the error message says and update the Max Objects in Game in the project settings.

I’d say it isn’t the blueprints that are causing the issue, its that you’re creating too many objects that aren’t destroy at the end of play so they hang around in memory and causing a a crash

i was trying to tackle that actually but apparently i did it wrong? the bullets have DestroyActor when they hit objects of any kind, so i thought it would remove them from the memory but it seems like it keeps them and it adds up too much even if they are destroyed? sometimes i dont even do anything at all and the amount of objects at the top right corner of the screen would blast from like 35k all the way to 100k+ randomly. i tried to limit the amount of objects to like 50k because i read that garbage collection works according to that and removes anything that isn’t in use, but i might have been wrong about that it seems. would you know perhaps how to solve the amount of objects increase that i see? when i shoot the bullets are made but after like a few seconds the amount of objects returns to what it was before i was shooting, so i dont think the bullets are the problem… its all very confusing for me.

UObjects can be anything really: physics (when you break stuff), components, VFXs. It really depends on what else is going on in your scene. If you have made some custom UObjects (like from the base class UObject) and haven’t handled their lifetime properly that could be it.

It might be worth instead of destroying them, putting them back into an object pool? I haven’t ran into any issues with this myself but I know that creating and destroying objects can be quite expensive and if you have a lot of objects being created and destroyed very frequently and close together then that might be what is causing the issues

actually, i just tried increasing the max amount of objects to like 200k and it seems to help, i can now open blueprints, but whenever i open a blueprint it seems to cause the drastic increase in objects in the first place. from 35k to like 77k just for opening a single blueprint.

It might be the amount of objects it has to load in for that blueprint to open? I genuinely do not know, I’m just suggesting what might be the issue.

Have you done any optimisation for your level? Level Streaming? World Partitioning? That sort of thing?

nothing of the sort, no. i just used the default first person template, added enemy ai’s with models that i made and animations i made, and made a health system for both player and enemies so the most basic elements of a fps game would actually work. i also noticed that pressing play in the editor would increase the amount of objects drastically as well, but for some reason, previously, pressing play would work fine, whereas opening a blueprint would cause a crash, even though while pressing play would increase the amount of objects well over the maximum i had set earlier, but that also only happens sometimes, not every time.