Repository navigation
Conversation
The 27.2 SDKs declare Foundation's `Date <=` and `>=` as `@backDeployed(before: 27.2)`. The back-deploy thunk calls the system copy on anything reporting 27.2 or later, but early 27.2 betas don't export it, so the weak import binds to NULL. 3.1.0 (build 37) jumped to 0x0 from the Home sports rail (`SportsRailPlanner.isInWindow`) on its first render, so the app crashed at every launch once a playlist existed (e.g. right after iCloud restored one). Declare both operators in LumeShared, which the app, the widgets and Top Shelf compile. A module's own declaration shadows Foundation's, so no call site links the weak symbol any more. LumeTests carries the same two: `@testable import Lume` would otherwise make its date comparisons ambiguous.
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
A user on iOS 27.2 beta (24B5089g) reported that after picking iCloud in the first-run sync choice, Lume 3.1.0 (build 37) no longer opens. The crash report:
EXC_BAD_ACCESS (SIGKILL)at0x0, terminationCODESIGNING / Invalid Page("Failed to fault in a page with execute permissions")0x0, called fromSportsRailPlanner.isInWindow(_:start:end:)←SportsRailPlanner.fixtures←PhoneSportsHomeRail.bodyiCloud isn't the bug. It restored the user's playlists, so launch now goes to Home, and the sports rail's first render runs a
Date >=.Root cause
The iOS/tvOS/macOS 27.2 SDKs (Xcode 27.2, 27B52) declare Foundation's
Date <=and>=as:The back-deploy thunk calls the OS copy on any system that reports 27.2 or later, and its inlined fallback below that. Early 27.2 betas report 27.2 but don't export
$s10Foundation4DateV2geoiySbAC_ACtFZ/…2leoiy…, so the weak import binds to NULL and the call jumps to address 0. Older releases (18, 26, 27.0, 27.1) take the fallback and are unaffected, as is the shipping 27.2.The App Store build had no downloadable dSYM, so for symbolication I rebuilt
v3.1.0with the same Xcode build. Its code offsets match the crash exactly:+0x346980isbl Date.>=and+0x9f3ff0is the call intoSportsRailPlanner.fixtures.nm -mon that binary shows both operators asweak externalfrom Foundation, at 44 call sites in 21 files (EPG, recording, sports, downloads, widget export…), plus one in LumeWidgets.Fix
LumeShared/Date+BackDeployedComparison.swiftdeclares<=and>=onDate. LumeShared is compiled into the app, LumeWidgets and LumeTopShelf. A module's own declaration shadows the imported one with the same signature, so no call site links the weak symbol any more, including call sites added later.<,>and==were never back-deployed and still come from Foundation.LumeTests/Helpers/Date+BackDeployedComparison.swiftis a mirror copy. With@testable import Lumethe test module sees both Lume's and Foundation's operators, and<=inWatchProgressWriterLiveTestsbecame ambiguous. Its own copy shadows both.Both files can go once the deployment target reaches 27.2.
Verification
nm -m … | grep -E 'DateV2(ge|le)oiy'finds nothing inLume,LumeWidgets.appex(iOS) orLumeTopShelf.appex(tvOS); before the fix,LumeandLumeWidgetsboth had the weak import.build-for-testingpasses for theLumescheme (LumeTests and LumeUITests) and forLumePerformance.RecordingServerStore*,SportsChannelResolver*,WatchProgressWriterLiveTests).nmcheck above confirms that.