Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to use the addEventListener on GPUDevice #21673

Closed
fedgrant opened this issue Dec 21, 2023 · 1 comment
Closed

Crash when trying to use the addEventListener on GPUDevice #21673

fedgrant opened this issue Dec 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working ext/webgpu related to the ext/webgpu

Comments

@fedgrant
Copy link

Version:
deno 1.39.0 (release, x86_64-unknown-linux-gnu)
v8 12.0.267.8
typescript 5.3.3

Error:

Task run deno --unstable-webgpu run -A 1.ts
error: Uncaught (in promise) TypeError: Cannot destructure property 'listeners' of 'self[eventTargetData]' as it is undefined.
device.addEventListener('uncapturederror', (event) => {
       ^
    at GPUDevice.addEventListener (ext:deno_web/02_event.js:930:13)
    at file:///home/fed/workspace/wgpu_experiments/1.ts:17:8

Code:

const adapter = await navigator.gpu.requestAdapter();
const device = await adapter?.requestDevice();
if (!device) {
  console.error("no suitable adapter found");
  Deno.exit(0);
}

device.addEventListener('uncapturederror', (event) => { 
  console.error('A WebGPU error was not captured:', event);
});

@mmastrac mmastrac added the ext/webgpu related to the ext/webgpu label Dec 21, 2023
@mmastrac mmastrac added the bug Something isn't working label Dec 21, 2023
@crowlKats
Copy link
Member

fixed in #23684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ext/webgpu related to the ext/webgpu
Projects
None yet
Development

No branches or pull requests

3 participants