Skip to content

Fix crash in issue 3845 and defects B/C in 3779 - #3851

Merged
pljones merged 3 commits into
jamulussoftware:mainfrom
softins:fix-crash-issue-3845
Aug 1, 2026
Merged

Fix crash in issue 3845 and defects B/C in 3779#3851
pljones merged 3 commits into
jamulussoftware:mainfrom
softins:fix-crash-issue-3845

Conversation

@softins

@softins softins commented Jul 31, 2026

Copy link
Copy Markdown
Member

Short description of changes

This PR implements the two fixes listed by LLM in #3845, one of which is also Defect C listed in #3779 (comment)

It also fixes Defect B from #3779 (comment) by adding try/catch blocks around sound card initialization. This corrects the crash I observed when testing just the fixes in #3845. Exceptions should not be allowed to escape from slot functions in Qt.

CHANGELOG: Client: Avoid crashing on sound device errors.

Context: Fixes an issue?

Fixes #3845 and part of #3779 (but not the ASIO parts).

Does this change need documentation? What needs to be documented and how?

Bugfix, so probably not.

Status of this Pull Request

Ready for test.

What is missing until this pull request can be merged?

Review

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@softins softins added the bug Something isn't working label Jul 31, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Jul 31, 2026
@softins softins added this to the Release 4.0.0 milestone Jul 31, 2026
@softins softins added the backport_required A change to main that needs fix on an existing release. label Jul 31, 2026
Comment thread src/client.cpp
@mcfnord

mcfnord commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

MY LLM WROTE:

Measured this PR on the real cross-thread path: client on jackd, then stop jackd → the CGenErr from OnSndCrdReinitRequest. x86 / Qt 5.15.13, offscreen, 5 trials each.

stderr signal baseline fa8766ad this PR
Qt has caught an exception… (escaped the slot) 5/5 0/5
QMutex: destroying locked mutex 5/5 0/5

A build with a print inside your catch fired 5/5 on the same path — so the throw still happens and is now contained at the slot, not skipped. QMutexLocker removes the leaked mutex.

I could not reproduce the Raspberry Pi hard abort in six earlier configs, and don't here (no Windows hardware either), so I'm not validating the ASIO/RPi terminate directly — but the escape mechanism behind Defect C / #3845 is gone in every trial.

@pljones
pljones merged commit 4d14294 into jamulussoftware:main Aug 1, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in Tracking Aug 1, 2026
@pljones pljones modified the milestones: Release 4.0.0, Release 3.12.4 Aug 1, 2026
@pljones pljones removed the backport_required A change to main that needs fix on an existing release. label Aug 1, 2026
@pljones

pljones commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Merged to main and backported to release/3_12.

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

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Crash: pending QTimer::singleShot fires into a destroyed CClientDlg after an audio-device exception

3 participants