[4.18] Crashes after 2min when SpawnActor C++

Hello,

I am quite new to C++ and Unreal in general, I am following some c++ tutorial on Udemy but my hunger to go faster is too big.

I am trying to create a map tile generator: Giving a map size, I want to spawn cubes next to each other.

So far I managed to spawn my cubes in my world by:

  • Creating a MapGenerator_BP
  • Few TilesActors (So far it contains only a static mesh cube)

Then on the C++ side of my MapGenerator class, I am spawning my TilesActors.
All of this is working quite fine
(see image on a 50x50 map)

The issue I have is that after few moment, the engine crashes without giving me errors.

Does somebody have any ideas why?
(I was thinking that because I am spawning too many actors (50*50 = 2500) maybe my computer gets crazy and crashes but I doubt since I don’t think it is a huge number of actor)

Or maybe you have a better suggestion about how to process to create this kind of map with better performance!

It could be garbage collector. Did You use uproperties properly? It’s rather hard to guess without knowing Your code. The number of actors is totally ok.
For better performance, i would suggest using InstancedStaticMeshComponent, instead.

That’s interesting. We moved our project, which is almost a year old, developed by 10 people from 4.16 to 4.18 without problems. The most problematic thing is a minor bug with blueprint nativization in one weird case.

I think 4.18 is the worst version released so far after 3.17. mirror reflections crash, along with everything I needed… no code error I made a project for every single one to test it and they crash all the time. I just don’t rely on 4.18, and restarted my projects. it was basicly a “F*** this sh*t I’m out”. for that low poly dzarafata is right thought.