TradeMe / MapMe

The Android maps adapter
MIT License
841 stars 75 forks source link

Parcelable encountered IOException writing serializable object (name = nz.co.trademe.mapme.googlemaps.GoogleMapMarkerAnnotation) #19

Open dimasikturbo opened 6 years ago

dimasikturbo commented 6 years ago

Hi there,

I was playing with MapMe and came across strange issue. When a new activity is started from the activity with the map, app crashes with the error:

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = nz.co.trademe.mapme.googlemaps.GoogleMapMarkerAnnotation)

i created this commit to demonstrate it:

https://github.com/dimasikturbo/MapMe/commit/b6c674c9964a35e736abf598f704807bdda8e8a2

when "remove" label is clicked the app crashes

dimasikturbo commented 6 years ago

i figured out what was wrong, when MarkerBottomSheet is visible fragment manager tries to store its state it can't serialize "MapAnnotation" because it is an instance of GoogleMapMarkerAnnotation that can't be serialized as it has BitMap property

josh-burton commented 6 years ago

Ah, that makes sense. Thanks for reporting this.

Since this is just a bug in the sample app I don't think it's a major issue, but I'll try to get around to fixing this at some point.

Or we're open to pull requests 😄