slint-ui/slint · error

Suspended backend not supported for WgpuTextureBackend…

Error message

Suspended backend not supported for WgpuTextureBackend (requires device/queue)

What it means

Error "Suspended backend not supported for WgpuTextureBackend (requires device/queue)" thrown in slint-ui/slint.

Solutions

  1. Do not suspend the application while using the WGPU texture backend without device/queue access.
  2. Keep the device and queue alive for the duration of the suspension.

When it happens

Trigger: Thrown at internal/renderers/femtovg/wgpu.rs:443 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-08-19). Data as JSON: /api/errors/6a57b858a80d73c6. Report an issue: GitHub.

Appendix: source

Thrown at internal/renderers/femtovg/wgpu.rs:443

        // Skip the initial surface.configure() when the window has zero
        // area — wgpu requires both dimensions to be non-zero. This happens
        // on WASM when the async wgpu init future resolves before the
        // browser has laid out the canvas. The subsequent resize event will
        // re-configure with the real size.
        if size.width > 0 && size.height > 0 {
            surface.configure(&device, &surface_config);
        }

        *self.graphics_backend.instance.borrow_mut() = Some(instance.clone());
        *self.graphics_backend.device.borrow_mut() = Some(device.clone());
        *self.graphics_backend.queue.borrow_mut() = Some(queue.clone());
        *self.graphics_backend.surface_config.borrow_mut() = Some(surface_config);
        *self.graphics_backend.alpha_modes.borrow_mut() = swapchain_capabilities.alpha_modes;
        *self.graphics_backend.surface.borrow_mut() = Some(surface);

        let wgpu_renderer = femtovg::renderer::WGPURenderer::new(device, queue);
        let femtovg_canvas = femtovg::Canvas::new_with_text_context(
            wgpu_renderer,
            crate::font_cache::FONT_CACHE.with(|cache| cache.borrow().text_context.clone()),
        )
        .unwrap();

        let canvas = Rc::new(RefCell::new(femtovg_canvas));
        self.reset_canvas(canvas);
    }
}

struct TextureWindowSurface {
    render_output: femtovg::renderer::WGPURenderOutput,
}

impl WindowSurface<femtovg::renderer::WGPURenderer> for TextureWindowSurface {
    fn render_output(&self) -> impl Into<femtovg::renderer::WGPURenderOutput> {
        self.render_output.clone()
    }
}

View on GitHub (pinned to 3a7e700487)