#[1.0.0-pre.65] System.ArgumentException: Cannot exceed budget of 16777216 in BlockAllocator
1 messages · Page 1 of 1 (latest)
i have a suspicion we'll need a repro
Do you get this error immediately at load time, or entering playmode? Or after you've been running for a while?
These allocations relate to the number of Archetypes and EntityQueries that have been created, and not to ECS Chunks. When there is a really large number of tag components, like 15 or 20, and every possible combination is created, this limit can be hit.
This error is ady logged at baking. Basically I believe it's baker bug at pre.65 since I didn't have any issue at pre.47. I checked the chunk at pre.47. that it's just consume 1.4KB at chunk which I dun think I really bake a lot of heavy components into entity. Anyway I just hack fix the issue by removing game object reference at authoring baker meaning that it won't bake to become entity prefab and then reference the entity prefab to the entity. It's really weird that only this entity has issue that I have no idea why like that.
🥲 Recently I keep getting this error again. Not really sure yet but looks like now there's archetype limit or it's Entities bug?
yes, it's a poorly-messaged limit on the total number of archetypes
There's been an archetype limit since 0.10
Ideally you do not hit this and you should definitely try avoid it because it likely means you're making too many structural changes.
That said if it's blocking you can make a local copy of entities and it's a 1 line change to increase capacity
🥲 But I get this error at bake time. Not runtime time. Seems like Entities bug
Oh yeah I have no idea how you could possibly hit archetype cap during baking
🤔 At pre.65, is that currently max archetype limit is 432? More than 432 will get the error above
What u mean? Total archetype memory size cannot over 16MB?
yes 16MB is allocated for the archetype storage
I thought the only limitation is 16KB per chunk lol
entities->m_ArchetypeChunkAllocator = new BlockAllocator(AllocatorManager.Persistent, 16 * 1024 * 1024); // 16MB should be enough```
16MB should be enough 
it should be ^^
@astral quarry Any plan to bump archetype memory size to more than 16MB to maybe 32MB? Currently due to default netcode design, it's too easy to increase a lot of different archetype. I'm not sure netcode team will improve this design or not.
not for 1.0, but there are plans to clean up unused archetypes (maybe even active dev, not sure)
Do u mean implement auto clean up unused archetypes feature?
i believe that's the idea anyway. i'm not working on it myself so can't say for sure
Not enough for me