bevyengine/bevy · error

More `bevy` `World`s have been created than is supported

Error message

More `bevy` `World`s have been created than is supported

What it means

Guard panic in World::new/from_world: the number of simultaneously-live Worlds exceeded the maximum the Entity id generation supports (the world index bit budget), so a new World cannot be created.

Source

Thrown at crates/bevy_ecs/src/world/mod.rs:132

    /// The byte index in [`Self::command_queue`] at which unapplied command start.
    ///
    /// This is nonzero while running commands to allow the same buffer to be shared by nested commands.
    command_queue_start: usize,
    /// The world's command queue.
    ///
    /// This is stored inside a [`SyncUnsafeCell`] to allow mutable access to
    /// commands from an [`UnsafeWorldCell`] without being invalidated by `&World`
    /// references used for metadata.
    ///
    /// This must not be exposed as a `&mut` to untrusted code,
    /// as calling `apply()` on it could execute commands before [`Self::command_queue_start`].
    command_queue: SyncUnsafeCell<CommandQueue>,
}

impl Default for World {
    fn default() -> Self {
        let mut world = Self {
            id: WorldId::new().expect("More `bevy` `World`s have been created than is supported"),
            entities: Entities::new(),
            entity_allocator: EntityAllocator::default(),
            components: Default::default(),
            resource_entities: Default::default(),
            archetypes: Archetypes::new(),
            storages: Default::default(),
            bundles: Default::default(),
            observers: Observers::default(),
            removed_components: Default::default(),
            // Default value is `1`, and `last_change_tick`s default to `0`, such that changes
            // are detected on first system runs and for direct world queries.
            change_tick: AtomicU32::new(1),
            last_change_tick: Tick::new(0),
            last_check_tick: Tick::new(0),
            last_trigger_id: 0,
            command_queue_start: 0,
            command_queue: SyncUnsafeCell::new(CommandQueue::silent()),
            component_ids: ComponentIds::default(),

View on GitHub (pinned to 396ca72708)

Solutions

  1. Drop existing Worlds before creating new ones (often caused by leaking worlds in tests or loops)
  2. Reuse a single World instead of allocating many
  3. Avoid creating a World per iteration in long-running loops
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/bevy_ecs/src/world/mod.rs:132 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20). Data as JSON: /api/errors/00e09ed3e37c05ec. Report an issue: GitHub.