deno
deno copied to clipboard
Crash when trying to use the addEventListener on GPUDevice
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);
});