Repository navigation
Merge dev into next-dev - #23
Merged
Merged
Conversation
Updated translations from lokalise on Tue May 12 15:47:31 PDT 2026
Repeatedly toggling a RileyLink switch crashes the app with "unrecognized selector sent to instance 0x8000000000000000" inside shouldConnect(to:) -- a garbage pointer being messaged, which is a torn read rather than a real object (LoopKit/Loop#2462). autoConnectIDs is documented as isolated to centralQueue and every mutation honours that: connect and disconnect both wrap in centralQueue.async. Two public readers did not: public var connectingCount: Int { return self.autoConnectIDs.count } public func shouldConnect(to deviceID: String) -> Bool { return self.autoConnectIDs.contains(deviceID) } Both are read from the main thread by the UI -- shouldConnect backs the SwiftUI autoconnect Binding in RileyLinkListDataSource and the table view data source in RileyLinkDevicesTableViewDataSource, connectingCount backs the "is anything connecting" checks -- so a toggle mutates the Set on centralQueue while the UI reads it, and fast toggling widens the window until a read lands mid-mutation. Back the property with a Locked<Set<String>> rather than hopping the readers onto centralQueue: every reader is on the main thread and centralQueue work calls back to the main thread, so a synchronous hop from the UI would risk deadlock. Mutations stay serialised by centralQueue, so the read-modify-write in insert/remove cannot lose an update. The delegate notification keeps firing after the value changes, and still does not fire during init. Affects every RileyLink-based pump manager, since they share this provider: MinimedKit, OmniKit, and OmnipodKit with Omnipod Classic.
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.
Merges
devintonext-devso that LoopKit/LoopWorkspace#454 (next-dev → dev) no longer conflicts and drops nothing from dev.Only Lokalise translation updates and language-list changes come from dev; it merged without conflicts.
Built as part of the whole workspace (LoopWorkspace scheme, iOS Simulator) with every submodule at its merge commit.
Please merge with "Create a merge commit" (not squash or rebase); otherwise the merge history is lost and dev will conflict with next-dev again.