Open slapin opened 2 years ago
I know it is not quite intended to be controllable from inspector but still would be nice to avoid things like that...
ERROR: Condition "item == nullptr" is true. Continuing.
at: process_mesh_lods (/home/slapin/godot-projects/small-game/src/modules/voxel/terrain/instancing/voxel_instancer.cpp:210)
This one is actually a bug, it is trying to update mesh lods on an instance block which I guess is using scene items. Scene items do not have this feature so I think it should skip them instead.
ERROR: All memory pool allocations are in use.
at: resize (./core/pool_vector.h:512)
This is broader, and most likely cause is that there are more than 65536 PoolVectors currently in use, which is a hardcoded limitation of Godot 3 (a pretty dumb one if I must say). It happens often when there are many meshes in the scene, even if there is a lot of spare memory on the computer.
As for the crash, it needs further investigation. Could be a consequence of previous error.
[2] ../../src/godot/bin/godot.x11.opt.tools.64() [0x2d2c310] (/home/slapin/godot-projects/small-game/src/godot/servers/visual_server.cpp:415)
[4] ../../src/godot/bin/godot.x11.opt.tools.64() [0xbf3509] (/usr/include/c++/10/bits/stl_vector.h:919)
[4] ../../src/godot/bin/godot.x11.opt.tools.64() [0xbf6e56] (/home/slapin/godot-projects/small-game/src/modules/voxel/meshers/transvoxel/voxel_mesher_transvoxel.cpp:191)
That jump between areas of the engine looks pretty wild. For a moment I thought there was an issue accessing an std::vector
, but the next stack frame is inside... VisualServer Oo
The problem is you can't reduce the count when adding an item, thus disabling instancing in editor while fiddling with parameters would be nice.
You can reduce count by reducing density. Also keep in mind scene instances are incredibly expensive in Godot (all these niceties come at a cost), so it is really intented to use at low densities.
So in summary, there are a few bugs to fix here, and an enhancement for being able to turn off instancing.
Yes, but I don't get the chance to get to the parameters, I add an item and crash happens :)
This only affects inspector, from code everything works fine.
Adressed some errors and crash in d6e4769f08b253225a7898a32544876e067b3466 and 2853f42dd7ae504dc8f863616ea6869330e86098, you can retry see if a crash still happens.
Disabling is actually more work than it sounds, it's not just an inspector thing. The instancer reacts to events coming from the parent node, it also reacts to multiple kinds of changes that can happen in its library, and it also has a process function. And even if hidden, in the case of scenes, they still have to get instanced. And if not instanced, there is nowhere to store their position so it will desync. Currently the easiest workaround to edit scene items without having a VoxelInstancer active, is to have the library be saved in its own file, so you can edit it while the scene is closed.
Would be nice to be able to disable VoxelInstancer in editor or crashes like this occur at times especially with scenes (and no way to minimize these upfront).