Skip to content

MarkerInfoWindowContent causing NoSuchElementException with Renderer.LATEST #65

Description

@leontodd

Environment details

com.google.maps.android:maps-compose:1.3.0

Using Renderer.LATEST (https://developers.google.com/maps/documentation/android-sdk/renderer)

Steps to reproduce

I have a map where markers are added and removed based on the current visible bounds. If I tap a marker so that its info window is shown, move the map so that the marker is now off the screen, and then programatically remove the marker, I get the below Exception.

This only happens using Renderer.LATEST, I can't reproduce with Renderer.LEGACY

Stack trace

java.util.NoSuchElementException: Collection contains no element matching the predicate.
        at com.google.maps.android.compose.MapApplierKt.nodeForMarker(MapApplier.kt:161)
        at com.google.maps.android.compose.MapApplierKt.access$nodeForMarker(MapApplier.kt:1)
        at com.google.maps.android.compose.MapApplier.attachClickListeners$lambda-7(MapApplier.kt:104)
        at com.google.maps.android.compose.MapApplier.$r8$lambda$rI95Mh8wQgq9h26aA0XDFZdfIaE(Unknown Source:0)
        at com.google.maps.android.compose.MapApplier$$ExternalSyntheticLambda3.onInfoWindowClose(Unknown Source:2)
        at com.google.android.gms.maps.zze.zzb(com.google.android.gms:play-services-maps@@18.0.0:1)
        at com.google.android.gms.maps.internal.zzae.zza(com.google.android.gms:play-services-maps@@18.0.0:2)
        at com.google.android.gms.internal.maps.zzb.onTransact(com.google.android.gms:play-services-maps@@18.0.0:3)
        at android.os.Binder.transact(Binder.java:1043)
        at arq.bl(:com.google.android.gms.policy_maps_core_dynamite@214639072@214639072.407204480.407204480:2)
        at com.google.maps.api.android.lib6.impl.dd.d(:com.google.android.gms.policy_maps_core_dynamite@214639072@214639072.407204480.407204480:3)
        at com.google.maps.api.android.lib6.phoenix.w.run(:com.google.android.gms.policy_maps_core_dynamite@214639072@214639072.407204480.407204480:0)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I

Metadata

Metadata

Assignees

Labels

releasedtriage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions