Skip to content

MarkerInfoWindowContent: app crashes when clicking on the marker on version 8.4.0 #950

Description

@dbaroncelli

In the latest version 8.4.0,
when clicking on a MarkerInfoWindowContent, the app crashes.

Environment details

com.google.maps.android:maps-compose version: 8.4.0

Steps to reproduce

Place a MarkerInfoWindowContent in the content of GoogleMap.
When clicking on the marker, the app crashes with this message:

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

Code example

    GoogleMap(
        cameraPositionState = cameraPositionState,
        onMapLoaded = onMapLoaded,
    ) {
        MarkerInfoWindowContent(
            state = singapore3State,
            title = "MarkerInfoWindow",
            icon = BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE),
        ) {
            Column(modifier = Modifier.background(Color.White).padding(5.dp)) {
                Text("Testing", color = Color.Blue, fontWeight = FontWeight.Bold)
                Text(it.title!!, color = Color.Blue)
            }
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage 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