Skip to content

Conversation

@dkhawk
Copy link
Collaborator

@dkhawk dkhawk commented Aug 27, 2025

Refer to #211, I found that composition.dispose() inside launchSubcomposition(...) must run on the main thread. In instrumented tests, it can be run on other threads, causing crashes because Google Maps couldn't dispose correctly.

To fix this, I've set the launch command within launchSubcomposition to always run on the main thread.

You can reproduce this issue from the https://github.com/akexorcist/maps-compose-ui-test-issue

Fixes #211 🦕

@dkhawk dkhawk merged commit 3ac3f52 into main Aug 27, 2025
9 of 10 checks passed
@dkhawk dkhawk deleted the fix/always-dispose-on-main-thread branch August 27, 2025 21:13
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google map crashed with instrumentation test

3 participants