bevyengine/bevy · error · AssetExtractionError

The asset has already been extracted

Error message

The asset has already been extracted

What it means

AssetExtraExtractionError: an asset due for extraction to the render world had already been extracted in this frame — its extra data was claimed twice. Indicates duplicate extraction of the same asset (e.g. an asset processed by two extraction passes); each asset must be extracted once.

Source

Thrown at crates/bevy_render/src/render_asset.rs:34

use core::sync::atomic::{AtomicUsize, Ordering};
use thiserror::Error;

#[derive(Debug, Error)]
pub enum PrepareAssetError<E: Send + Sync + 'static> {
    #[error("Failed to prepare asset")]
    RetryNextUpdate(E),
    #[error("Failed to build bind group: {0}")]
    AsBindGroupError(AsBindGroupError),
}

/// The system set during which we extract modified assets to the render world.
#[derive(SystemSet, Clone, PartialEq, Eq, Debug, Hash)]
pub struct AssetExtractionSystems;

/// Error returned when an asset due for extraction has already been extracted
#[derive(Debug, Error)]
pub enum AssetExtractionError {
    #[error("The asset has already been extracted")]
    AlreadyExtracted,
    #[error("The asset type does not support extraction. To clone the asset to the renderworld, use `RenderAssetUsages::default()`")]
    NoExtractionImplementation,
}

/// Describes how an asset gets extracted and prepared for rendering.
///
/// In the [`ExtractSchedule`] step the [`RenderAsset::SourceAsset`] is transferred
/// from the "main world" into the "render world".
///
/// After that in the [`RenderSystems::PrepareAssets`] step the extracted asset
/// is transformed into its GPU-representation of type [`RenderAsset`].
pub trait RenderAsset: Send + Sync + 'static + Sized {
    /// The representation of the asset in the "main world".
    type SourceAsset: Asset + Clone;

    /// Specifies all ECS data required by [`RenderAsset::prepare_asset`].
    ///

View on GitHub (pinned to 396ca72708)

Solutions

  1. Avoid queuing the same asset for extraction twice
  2. Ignore the error — the asset is already present in the render world
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/bevy_render/src/render_asset.rs:34 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/7b16157c4a80df38. Report an issue: GitHub.