Skip to content

fix: address top Crashlytics crashes in beta 2.7.14#5672

Merged
jamesarich merged 2 commits into
mainfrom
fix/crash-cleanup
May 30, 2026
Merged

fix: address top Crashlytics crashes in beta 2.7.14#5672
jamesarich merged 2 commits into
mainfrom
fix/crash-cleanup

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

The in-flight beta (build 29320970) is showing several high-volume crashes in Crashlytics. This PR addresses the top 4 actionable issues by impact, covering ~2,264 crash events across ~1,213 users in the past week.

Approach

Each fix is minimal and defensive -- catch or guard against bad input rather than redesigning call sites:

  • Maps cluster renderer (1,828 events / 987 users) -- The ComposeUiClusterRenderer creates a standalone ComposeView for marker bitmaps that fails to find a ViewTreeLifecycleOwner. The existing SideEffect workaround ran post-composition, leaving a race window. Switched to DisposableEffect (runs at composition time) and unconditionally propagates lifecycle/savedstate owners to both rootView and the hosting view.

  • StoreAndForward proto decode (179 events / 170 users) -- Malformed mesh packets crash StoreAndForward.ADAPTER.decode() with a ProtocolException. Wrapped in try-catch matching the identical pattern already used by handleStoreForwardPlusPlus right below it.

  • NumberFormatter NaN (163 events / 14 users) -- Sensor telemetry can deliver NaN temperature values, which crash roundToLong(). Added a guard returning "--" for NaN/Infinity inputs.

  • USB serial controlTransfer (94 events / 12 users) -- setParameters() throws IOException when the device disconnects during port setup. Wrapped the setup sequence in try-catch with proper cleanup (closedLatch.countDown(), port close, disconnect callback).

Notes

  • The maps crash is a known upstream issue (googlemaps/android-maps-compose#858). The DisposableEffect fix reduces the race window but a full resolution requires an upstream library fix.
  • Tests added for NumberFormatter NaN/Infinity and malformed StoreAndForward payloads.
  • Verified with :core:common:allTests, :core:data:allTests, and compileGoogleDebugKotlin.

- NumberFormatter: guard against NaN/Infinity values that crash
  roundToLong() (163 events, 14 users)
- StoreForwardPacketHandler: catch IOException from malformed proto
  decode, matching existing SF++ pattern (179 events, 170 users)
- SerialConnectionImpl: catch IOException from USB controlTransfer
  during port setup (94 events, 12 users)
- NodeClusterMarkers: replace SideEffect with DisposableEffect for
  ViewTreeLifecycleOwner propagation, reducing race window for maps
  cluster renderer crash (1828 events, 987 users)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the bugfix PR tag label May 30, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue May 30, 2026
Merged via the queue into main with commit c7fbc6e May 30, 2026
18 checks passed
@jamesarich jamesarich deleted the fix/crash-cleanup branch May 30, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant