Skip to content

v1.1.0

Choose a tag to compare

@Leviidev Leviidev released this 27 Jun 23:30
· 46 commits to main since this release

v1.1.0

🐛 What caused the crash

The app crashed with fatal 309 (kernel kill) immediately after the splash screen. Root cause was a stack overflow from infinite recursion:

  • SceneDelegate set tintColor = .altPrimary during scene setup
  • altPrimary was declared as static var in FluxThemesViewController.swift — accessing it triggered lazy initialization
  • That init called a Scanner convenience init with a custom Scanner extension that called itself recursively
  • → Stack overflow → kernel killed the process

All print() calls were invisible in device logs because ConsoleLog captures stdout/stderr to a file instead of the system log.

🔧 How it was fixed

  • Removed the duplicate static var declarations (the colors already existed as proper let constants from the asset catalog in AltStoreCore)
  • Deleted the recursive Scanner extension that was calling itself
  • Theme colors are now stored in UserDefaults instead of mutating static properties
  • Hardened Core Data store loading to prevent a separate crash from the Roxas library's broken model lookup
  • Replaced all print() calls on the startup path with os_log() so crashes are visible in device logs
  • Added crash sentinel detection, safety-net fallback in SceneDelegate, and uncaught exception handler

📋 What's new since v1.0.6

Crash fixes

  • Fixed launch crash (fatal 309) caused by infinite recursion in Scanner extension
  • Fixed Core Data migration failure (error 134020) by enabling automatic lightweight migration
  • Fixed silent hang in prepareDatabase when ALTApplication returns nil
  • Fixed ConsoleLog crash that prevented crash reports from showing
  • Fixed crash loop by deferring JIT tunnel start when unacknowledged crash report exists
  • Prevented silent crashes from Rust FFI abort() calls

Diagnostics

  • Startup path now uses os_log() (visible in device logs via devicectl)
  • Crash sentinel system detects and reports which component caused the crash
  • Uncaught exception handler captures otherwise invisible crashes
  • SceneDelegate safety-net installs main interface if LaunchViewController stalls

Core Data

  • Persistent store description now explicitly sets shouldMigrateStoreAutomatically and shouldInferMappingModelAutomatically
  • Fixed migration in migrateDatabaseToAppGroupIfNeeded for legacy stores
  • Load model directly from AltStoreCore bundle to bypass Roxas model lookup bug

🙏 Credits

Huge thanks to M0d-4 who forked the repo, identified the root cause, and fixed it. I implemented the changes and the app launches cleanly now.