bevyengine/bevy · error

Failed to create render thread

Error message

Failed to create render thread

What it means

Panic in PipelinedRenderingPlugin::cleanup: thread::Builder::spawn to create the dedicated render thread returned an error (e.g. resource limits, permission to create threads), so pipelined rendering cannot start.

Solutions

  1. Reduce thread count or system thread limits pressure
  2. Run without pipelined rendering (PipelinedRenderingPlugin) if thread creation is blocked
  3. Check sandbox/container thread limits
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/bevy_render/src/pipelined_rendering.rs:182 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@8d743eb7dc (2026-08-20). Data as JSON: /api/errors/1e54d52d8b4a219b. Report an issue: GitHub.

Appendix: source

Thrown at crates/bevy_render/src/pipelined_rendering.rs:213

                    let Some(Ok(mut render_app)) = sent_app else {
                        break;
                    };

                    {
                        #[cfg(feature = "trace")]
                        let _sub_app_span =
                            bevy_log::info_span!("sub app", name = ?RenderApp).entered();
                        render_app.update();
                    }

                    if render_to_app_sender.send_blocking(render_app).is_err() {
                        break;
                    }
                }

                bevy_log::debug!("exiting pipelined rendering thread");
            })
            .expect("Failed to create render thread");
    }
}

// This function waits for the rendering world to be received,
// runs extract, and then sends the rendering world back to the render thread.
fn renderer_extract(app_world: &mut World, _world: &mut World) {
    app_world.resource_scope(|world, main_thread_executor: Mut<MainThreadExecutor>| {
        world.resource_scope(|world, mut render_channels: Mut<RenderAppChannels>| {
            // we use a scope here to run any main thread tasks that the render world still needs to run
            // while we wait for the render world to be received.
            if let Some(mut render_app) = ComputeTaskPool::get()
                .scope_with_executor(true, Some(&*main_thread_executor.0), |s| {
                    s.spawn(async { render_channels.recv().await });
                })
                .pop()
                .unwrap()
            {
                render_app.extract(world);

View on GitHub (pinned to 8d743eb7dc)