Skip to content

fix(map): revert app-side Maps SDK init to library-idiomatic, fix inline-map crash#5719

Merged
jamesarich merged 1 commit into
mainfrom
claude/frosty-albattani-a10efd
Jun 3, 2026
Merged

fix(map): revert app-side Maps SDK init to library-idiomatic, fix inline-map crash#5719
jamesarich merged 1 commit into
mainfrom
claude/frosty-albattani-a10efd

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Summary

Reverts the app-side Google Maps SDK initialization added during the recent crash-fix flurry back to the maps-compose-idiomatic approach, and fixes the node-detail inline-map crash structurally.

Background

maps-compose initializes the Maps SDK itself when a GoogleMap creates its MapView; the documented idiom is to build BitmapDescriptors inside a live map. The flurry added app-side MapsInitializer calls from Compose to work around a BitmapDescriptorFactory-not-initialized crash on the node-detail inline map (#5709), then extended the pattern to the main map (#5715).

Initializing the SDK from Compose — ahead of / racing the GoogleMap's own init — correlates with the LATEST-renderer vector base map rendering black on affected devices: "Normal" renders black while satellite/terrain/hybrid (raster) render fine. Open-tag bisection of a field report (fine at open.16/open.17, black at open.20) places the inline-map regression at open.19 and the main-map regression at open.20.

Changes

  • Delete MapsSdkInitializer; remove all app-side MapsInitializer calls (the MapView init LaunchedEffect and MarkerBitmapRenderer.ensureMapsInitialized; buildNodeChipDescriptor drops its now-unused Context param).
  • Fix the inline-map crash structurally: build the marker descriptor inside InlineMap's GoogleMap content, where the SDK is already initialized — exactly like the main map, which never crashed.
  • Drop the redundant play-services-maps version pin; maps-compose pulls 20.0.0 transitively via maps-ktx.

Every descriptor build site (main-map overlays, the cluster renderer via MapEffect, waypoints, and the inline map) now sits inside a live map, so no app-side init is needed and the crash cannot recur.

Verification

spotlessCheck, detekt, assembleDebug (google + fdroid), test, and allTests pass locally. The device-specific LATEST-renderer black map cannot be reproduced on an emulator; this change is a strict revert to the pre-flurry initialization that worked, plus an idiomatic crash fix.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the bugfix PR tag label Jun 3, 2026
@jamesarich jamesarich enabled auto-merge June 3, 2026 02:03
…ine-map crash structurally

The late-May/early-June crash-fix flurry introduced app-side MapsInitializer
calls from Compose to work around a "BitmapDescriptorFactory is not initialized"
crash on the node-detail inline map (#5709), then extended it to the main map
(#5715). maps-compose initializes the SDK itself when a GoogleMap creates its
MapView, and the idiom is to build BitmapDescriptors inside a live map.
Initializing from Compose (ahead of / racing the MapView's own init) correlates
with the LATEST-renderer vector base map rendering black on affected devices
("Normal" black while satellite/terrain/hybrid render fine). Open-tag bisection
of a field report (fine at open.16/17, black at open.20) places the inline-map
regression at open.19 and the main-map regression at open.20.

Revert to the pre-flurry, library-idiomatic initialization:
- delete MapsSdkInitializer; remove all app-side MapsInitializer calls (the
  MapView init LaunchedEffect and MarkerBitmapRenderer's ensureMapsInitialized;
  buildNodeChipDescriptor drops its now-unused Context param)
- fix the inline-map crash structurally: build the marker descriptor inside
  InlineMap's GoogleMap content, where the SDK is already initialized, exactly
  like the main map (which never crashed)
- drop the redundant play-services-maps version pin; maps-compose pulls
  20.0.0 transitively via maps-ktx

Every descriptor build site now sits inside a live map, so no app-side init is
needed and the crash cannot recur.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jamesarich jamesarich force-pushed the claude/frosty-albattani-a10efd branch from 9eeaa63 to 874e29e Compare June 3, 2026 02:36
@jamesarich jamesarich added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 9629daa Jun 3, 2026
18 checks passed
@jamesarich jamesarich deleted the claude/frosty-albattani-a10efd branch June 3, 2026 02:46
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