Repository navigation
Open even when macOS's audio service is stuck; 0.16.10 - #25
Merged
Merged
Conversation
ClassNote spun forever at launch whenever coreaudiod was deadlocked (a macOS bug: seen on 27.2 when an audio plug-in device changed while a system audio tap was running). Bootstrap listed the microphones on the main thread, and that Core Audio query never returned, so the window never drew. The microphone list now loads on a background thread, one query at a time. If coreaudiod has not answered within 5 seconds the app still opens and the library works; starting a recording is refused with an explanation (restart the Mac or run "sudo killall coreaudiod") instead of freezing the app. Settings and Diagnostics show the same message. A late answer no longer makes the app forget the chosen microphone, and the menu bar's microphone name is read from the loaded list instead of asking Core Audio on every redraw. Version 0.16.10 (build 28). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
ClassNote spun forever at launch whenever macOS's audio service, coreaudiod, was deadlocked. The hang reports showed the main thread waiting on coreaudiod inside
AppState.bootstrap()→MicrophoneDeviceCatalog.availableInputDevices(), while coreaudiod itself was deadlocked: an audio plug-in device was changing (an iPhone Continuity microphone arriving, a virtual audio driver re-registering) while a system audio tap was running. The deadlock is a macOS bug. ClassNote's part was asking for the device list on the main thread.What changed
AppState.refreshMicrophoneDevices()now runs the Core Audio query on a GCD thread, one query at a time. The list starts as "System default" until the answer arrives.isAudioServiceUnresponsiveis set and the app keeps working (library, notes, search).sudo killall coreaudiod.selectedMicrophoneName, which the menu bar reads on every redraw, comes from the loaded list only and never asks Core Audio.Testing
AudioServiceStallTestscovers three cases: a query that never returns does not block the main actor and blocks recording; only a prompt answer drops a missing microphone; the selected name comes from the loaded list.Version 0.16.10 (build 28).
🤖 Generated with Claude Code