Totblock 300


I have an error TotBlock of about 300 in standalone player
(284 in Windows, 324 in Linux).

Now the good news is that my level is almost complete and no matter how much
time I leave it running, the totblock does not go higher.

There are two questions =

  1. Assuming the memory leak stays at about 300 TotBlocks, how many MB or RAM
    does this correspond to ? I have read that a “small number” is not a problem. But what is
    a “small” number ?

  2. As far as I have experimented, loading a new file (“Start game from file”) does NOT
    clear Toblok leaks. Perhaps there is a way to “restart” the player when loading a new level,
    so that the memory leaks are not accumulated ?

a lot of times modifiers will give you totblocks. upbge seems to just have them all the time. what blender are you using?

2.74 only gives tots when i have a smooth or solidify modifier mostly.

This is a good question…I do not have an answer but those are the exact types of things that worry me when I get them…for the most part I do not have them, but there was a time when I did get them regularly…unfortunately I am not certain what I did to aleviate them…I still get them but normally just 1…but I have no modifiers(aside from the one you get from skeletons)…so…???

in any case if any one can clarify what causes them specifically I would be happy to listen…do not mean to hijack this thread…so sorry :slight_smile:

No, it’s Ok, why sorry. Useful discussion is always, well, useful. :slight_smile:

I read somewhere that Alt+M (combine vertices) produces totblocks. I have used this extensively in my modelling of the game.

I use version 2.78 in Linux and tested on latest version (dont remember which one, but I installed it last month = February 2018) in Windows.

From my experience =

Just pressing play on the Startup file cube, produces a totBlock = 16, both in Linux and Windows

The level backgrounds produce about 100.

Spawning the player warrior produces about 84. This is modelled, rigged, and animated through Python (not stored animations).

Spawning a skeleton produces another 80 something. This is also modelled, rigged and animated. Very similar to the warrior, but
a different mesh and driven by AI code instead of control inputs. Otherwise it is the same.

Now, leaving the game running for 45 minutes does not significantly increase totBlocks. Running the game for 1-3 minutes produces
284 totBlocks, while leaving it running for 45 minutes produces 334.

I do not have “object leaks”. Printing the size of scene.objects[ ] throughout the test, prints a steady number.
(I had a leak once of projectiles not getting removed and this slowed the game down after a while, but fixed it).

Restarting scene does not seem to “cure” tot blocks.

Loading from file does not seem to “cure” tot blocks. I was hoping to use this when changing levels or returning to main menu,
but unfortunately it does not work. This is important because I was counting on it, but unfortunately it does not seem to work.

Perhaps a workaround for the Blender Foundation would be to shut down the player and restart it when “Load game from file”,
so that a new process is created, so that the memory leaks are cleared with by Windows.

Perhaps I should suggest the above in the Blender Foundation development team ?

Anyway, I understand we are in uncharted territory. I plan to experiment with my game (delete various parts of it and see how they
affect totBlocks). I am good at narrowing such things down and hopefully will come up with something.

I am an alt+m user as well(usually ‘last’ or ‘center’) but it never seems to give me tot blocks…I checked after posting here yesterday and I get none to 1 tot block currently…on linux mint 18.3. I would like to hear more…and form other users…

I think I would prefer a more robust error than ‘tot block 14’ or something…I would like it to give me some sort of hint at the cause…even if it is only one of the references.