Skip to content

wgpu-py 0.26.0 crash with imgui? #763

@hmaarrfk

Description

@hmaarrfk

Describe the bug

On linux + wayland (the only platform i tested on)

$ python examples/imgui_multi_canvas.py 
Unable to find extension: VK_EXT_physical_device_drm
Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
Segmentation fault (core dumped)

causes a segfault.

To Reproduce

conda create --name pygfx python=3.12 pip --channel conda-forge --override-channels
conda activate pygfx
pip install imgui-bundle rendercanvas
pip install -e . -vv

Observed behavior

Segfault.

I'm like 90% sure it happens in the call to

self._device.create_render_pipeline

in
https://github.com/pygfx/wgpu-py/blob/main/wgpu/utils/imgui/imgui_backend.py#L295C33-L295C68

I bisected it to the merge of 27.0.2.0 #741

Screenshots

If applicable, add screenshots to help explain your problem.

Your environment

Details about the environment this issue was observed on, like OS, Python version, wgpu-py version.
You can also include (the relevant sections of) the result of wgpu.diagnostics.print_report().


██ system:

             platform:  Linux-6.17.0-5-generic-x86_64-with-glibc2.42
python_implementation:  CPython
               python:  3.12.12

██ versions:

wgpu:  0.25.0.post2+gcbd97e2

██ wgpu_native_info:

No data

██ object_counts:

                      count  resource_mem

            Adapter:      0
          BindGroup:      0
    BindGroupLayout:      0
             Buffer:      0
      CanvasContext:      0
      CommandBuffer:      0
     CommandEncoder:      0
 ComputePassEncoder:      0
    ComputePipeline:      0
             Device:      0
     PipelineLayout:      0
           QuerySet:      0
              Queue:      0
       RenderBundle:      0
RenderBundleEncoder:      0
  RenderPassEncoder:      0
     RenderPipeline:      0
            Sampler:      0
       ShaderModule:      0
            Texture:      0
        TextureView:      0

              total:      0             0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions