Skip to content

Using asset_processor together with trace_tracy leads to an asset load error. #22870

@samoylovfp

Description

@samoylovfp

Bevy version and features

tested with 0.18.0, features = ["trace_tracy", "asset_processor"]

What you did

Reproduction script

put any valid png file into `assets/test.png` and run this

#!/usr/bin/env -S cargo +nightly -Zscript
---
[dependencies]
bevy = { version = "0.18.0", features = ["trace_tracy", "asset_processor"] }
---

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins.set(AssetPlugin {
            mode: AssetMode::Processed,
            ..default()
        }))
        .add_systems(
            Startup,
            |mut commands: Commands, asset_server: Res<AssetServer>| {
                commands.spawn(Camera2d);
                commands.spawn(Sprite {
                    image: asset_server.load("test.png"),
                    ..default()
                });
            },
        )
        .run();
}

What went wrong

I expected to see the png image displayed on screen, instead I got a runtime error

ERROR bevy_asset::server: no `AssetLoader` found with the name 'bevy_asset::server::loaders::InstrumentedAssetLoader<bevy_image::image_loader::ImageLoader>'

Disabling the tracy feature fixes the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-BugAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions