Repository navigation
Conversation
Unplugging the Thunderbolt-to-FireWire adapter with a MIDI endpoint published aborted the dext: ServiceContext::Reset called Terminate() on the MIDI nubs, which the kernel had already terminated with ASFWDriver's other client services, and DriverKit asserted in OSMetaClassBase::QueueForObject (reproduced twice on an UltraLite mk3, 2026-10-28). SBP2NubPublisher::Shutdown records the same abort for SBP-2 nubs and only drops its bookkeeping. MidiNubPublisher::ReleaseAll now does the same for a full reset. A reset for suspend still terminates the nubs, which are live then and replaced on wake. Verified on hardware: adapter unplug and replug, no crash report, MIDI republished.
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.
Problem and change
Unplugging the FireWire adapter while a MIDI endpoint is published aborts the dext.
ServiceContext::Reset(Full)callsMidiNubPublisher::TerminateAll(), which callsTerminate()on nubs the kernel has already terminated with ASFWDriver's otherclient services. DriverKit then asserts:
SBP2NubPublisher::Shutdownalready documents the same abort for SBP-2 nubs, andhandles it by dropping its bookkeeping. This change does the same for MIDI on a
full reset (
MidiNubPublisher::ReleaseAll). A suspend reset still callsTerminateAll, because the nubs are live then and wake publishes new ones.Prior discussion
None. It's a crash fix that follows the existing SBP-2 pattern.
Architecture and scope
Midi/Core/MidiNubPublisherandService/DriverContext.cpp. Applies to any familythat publishes MIDI nubs (DICE today; MOTU with the MOTU MIDI work).
Testing and evidence
MidiNubPublisherTests.ReleaseAllForgetsWithoutTerminating; full C++ suite passes (3,917 tests on this branch).releasing endpoint=... during shutdownis logged, no crash report, and MIDI is republished after replug.Regression risks
On a full stop the nubs are no longer explicitly terminated. That relies on the
kernel terminating them with the driver, the same assumption the SBP-2 publisher
already makes.