Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to catch exception in wgpuDeviceSetUncapturedErrorCallback

Open
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start at gpu.h#L791 and trace how wgpuDeviceSetUncapturedErrorCallback reports errors when dispatchKernel is called. Reproduce the failure with a try-catch around dispatchKernel, then verify that the intended exception behavior works across the reported thread boundary.

Written by the indexing model from the issue text.

Description

When calling dispatchKernel throws the runtime exception in wgpuDeviceSetUncapturedErrorCallback, try-catch around dispatchKernel does not catch the exception.
https://github.com/AnswerDotAI/gpu.cpp/blob/main/gpu.h#L791

A thread other than the main thread may be throwing the exception.
https://stackoverflow.com/questions/25282620/catching-exception-from-worker-thread-in-the-main-thread

Dominant language
C++
Stars
4k
Forks
199
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AnswerDotAI/gpu.cpp

All issues in AnswerDotAI/gpu.cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.