Repository navigation
Fix crash in issue 3845 and defects B/C in 3779 - #3851
Merged
Merged
Conversation
pljones
reviewed
Aug 1, 2026
Contributor
|
MY LLM WROTE: Measured this PR on the real cross-thread path: client on
A build with a print inside your 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. |
Collaborator
|
Merged to main and backported to release/3_12. |
ann0see
pushed a commit
to ann0see/jamulus
that referenced
this pull request
Aug 6, 2026
… ASIO device The caps-failure branch of LoadAndInitializeDriver() skipped ASIOExit(), leaving the SDK's global theAsioDriver pointer dangling after removeCurrentDriver() freed the COM object. If re-selecting the previous device also fails, CClient::Init() dereferences the dangling pointer via ASIOSetSampleRate()/ASIOCreateBuffers(). Use ASIOExit() (which also nulls the global pointer) in the caps-failure branch and document the ASIOInit()/ASIOExit() pairing invariant at the call site. The ASIOInit()-failed branch is left untouched: the SDK already resets the global pointer on that path. Note: the other two defects previously bundled in this change (SetDev() throwing out of Qt slots and a bare lock/unlock pair in OnSndCrdReinitRequest) were already fixed on main by PR jamulussoftware#3851 and are not included here. CHANGELOG: Fix a process hang / ASIO4ALL lockout after selecting an incompatible ASIO device.
4 tasks
ann0see
pushed a commit
to ann0see/jamulus
that referenced
this pull request
Aug 6, 2026
… ASIO device The caps-failure branch of LoadAndInitializeDriver() skipped ASIOExit(), leaving the SDK's global theAsioDriver pointer dangling after removeCurrentDriver() freed the COM object. If re-selecting the previous device also fails, CClient::Init() dereferences the dangling pointer via ASIOSetSampleRate()/ASIOCreateBuffers(). Use ASIOExit() (which also nulls the global pointer) in the caps-failure branch. The ASIOInit()-failed branch is left untouched: the SDK already resets the global pointer on that path. Note: the other two defects previously bundled in this change (SetDev() throwing out of Qt slots and a bare lock/unlock pair in OnSndCrdReinitRequest) were already fixed on main by PR jamulussoftware#3851 and are not included here. CHANGELOG: Fix a process hang / ASIO4ALL lockout after selecting an incompatible ASIO device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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