{"record":{"id":"89eb4ca11297b55f","repo":"gfx-rs/wgpu","slug":"implementation-did-not-provide-a-displayhandle","errorCode":null,"errorMessage":"Implementation did not provide a DisplayHandle","messagePattern":"Implementation did not provide a DisplayHandle","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-core/src/instance.rs","lineNumber":185,"sourceCode":"        if !instance_desc.backends.contains(A::VARIANT.into()) {\n            log::trace!(\"Instance::new: backend {:?} not requested\", A::VARIANT);\n            return;\n        }\n\n        // If this was Some, it was moved into self\n        assert!(instance_desc.display.is_none());\n\n        let hal_desc = hal::InstanceDescriptor {\n            name: \"wgpu\",\n            flags: self.flags,\n            memory_budget_thresholds: instance_desc.memory_budget_thresholds,\n            backend_options: instance_desc.backend_options.clone(),\n            telemetry,\n            // Pass a borrow, the core instance here keeps the owned handle alive already\n            // WARNING: Using self here, not instance_desc!\n            display: self.display.as_ref().map(|hdh| {\n                hdh.display_handle()\n                    .expect(\"Implementation did not provide a DisplayHandle\")\n            }),\n        };\n\n        use hal::Instance as _;\n        // SAFETY: ???\n        match unsafe { A::Instance::init(&hal_desc) } {\n            Ok(instance) => {\n                log::debug!(\"Instance::new: created {:?} backend\", A::VARIANT);\n                self.instance_per_backend\n                    .push((A::VARIANT, Box::new(instance)));\n            }\n            Err(err) => {\n                log::debug!(\n                    \"Instance::new: failed to create {:?} backend: {:?}\",\n                    A::VARIANT,\n                    err\n                );\n            }","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-core/src/instance.rs#L167-L203","documentation":"Panic while constructing the wgpu-core Instance's hal descriptor: the raw display handle that must accompany surface creation was absent (DisplayHandle::empty / None), so the backend has no display to register. The faulty input is the missing display handle from the windowing integration.","triggerScenarios":"Thrown at wgpu-core/src/instance.rs:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid raw display handle from the windowing system when creating surfaces","Ensure the display handle is set before Instance::create_surface is exercised"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}