Skip to content

fix(馃挜): detach swapchains before device destroy - #84

Open
wcandillon wants to merge 1 commit into
google:mainfrom
wcandillon:detach-before-device-destroy
Open

fix(馃挜): detach swapchains before device destroy#84
wcandillon wants to merge 1 commit into
google:mainfrom
wcandillon:detach-before-device-destroy

Conversation

@wcandillon

@wcandillon wcandillon commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This was reported by a RN WebGPU user who is using three.js: when Three.js destroys the device it created, we get the following crash (Vulkan only, Metal is fine):

F libc    : Fatal signal 11 (SIGSEGV), fault addr 0x20
  dawn::native::vulkan::FencedDeleter::DeleteWhenUnused
  dawn::native::vulkan::SwapChain::DetachFromSurfaceImpl
  dawn::native::Surface::~Surface
  rnwgpu::SurfaceInfo::detach(bool)
  Java_com_webgpu_WebGPUView_onViewDestroyed

We are able to reproduce it nicely. This didn't come up before because because in our own examples we provide the device ourselves so three.js won't destroy it.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

馃憢 Thanks for your contribution! Your PR has been imported to Gerrit.
Please visit https://dawn-review.googlesource.com/c/dawn/+/340575 to see it and CC yourself on the change.
After iterating on feedback, please comment on the Gerrit review to notify reviewers.
All reviews are handled within Gerrit, any comments on the GitHub PR may be missed.
You can continue to upload commits to this PR, and they will be automatically imported
into Gerrit.

@kainino0x

Copy link
Copy Markdown
Member

Something weird happened causing your commit to pick up all the submodules (which also caused it to fail to re-import to Gerrit). Could you reset those?

Change-Id: I3c0b35c29698bc9f74db41b210e2194c019fa15f
@wcandillon
wcandillon force-pushed the detach-before-device-destroy branch from 72a406f to 8d98997 Compare September 10, 2026 18:12
@wcandillon

Copy link
Copy Markdown
Contributor Author

@kainino0x yes sorry about that 馃檹 And a big Thank You for your support on these patches 鉂わ笍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants