My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 8936: Bug: Android 6.0 - java.lang.RuntimeException: Could not write bitmap blob file descriptor.
48 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Reported by [email protected], Nov 24, 2015
Steps:
1. Add hundreds of markers to the map, each marker having an icon set calling
            Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourceId);
            marker.setIcon(BitmapDescriptorFactory.fromBitmap(bitmap));
2. Getting the following crash (see attached source code for details):

com.test.maptest.maptest E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: com.test.maptest.maptest, PID: 28862
                                                                          java.lang.RuntimeException: Could not write bitmap blob file descriptor.
                                                                              at android.graphics.Bitmap.nativeWriteToParcel(Native Method)
                                                                              at android.graphics.Bitmap.writeToParcel(Bitmap.java:1541)
                                                                              at com.google.android.gms.maps.model.internal.f.a(SourceFile:237)
                                                                              at com.google.android.gms.maps.internal.h.a(SourceFile:227)
                                                                              at com.google.android.gms.maps.internal.j.a(SourceFile:183)
                                                                              at com.google.android.gms.maps.internal.CreatorImpl.a(SourceFile:32)
                                                                              at com.google.android.gms.maps.internal.b.a(SourceFile:227)
                                                                              at com.google.android.gms.maps.model.internal.e.onTransact(SourceFile:106)
                                                                              at android.os.Binder.transact(Binder.java:387)
                                                                              at com.google.android.gms.maps.model.internal.zza$zza$zza.zzb(Unknown Source)
                                                                              at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(Unknown Source)
                                                                              at com.test.maptest.maptest.MainMapFragment.seedMarkers(MainMapFragment.java:42)
                                                                              at com.test.maptest.maptest.MainMapFragment.access$000(MainMapFragment.java:17)
                                                                              at com.test.maptest.maptest.MainMapFragment$1.onMapReady(MainMapFragment.java:24)
                                                                              at com.google.android.gms.maps.MapFragment$zza$1.zza(Unknown Source)
                                                                              at com.google.android.gms.maps.internal.zzl$zza.onTransact(Unknown Source)
                                                                              at android.os.Binder.transact(Binder.java:387)
                                                                              at com.google.android.gms.maps.internal.av.a(SourceFile:82)
                                                                              at com.google.maps.api.android.lib6.d.fa.run(Unknown Source)
                                                                              at android.os.Handler.handleCallback(Handler.java:739)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                              at android.os.Looper.loop(Looper.java:148)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

We're seeing such reports on our app only with Android 6.0.
We're able to reproduce the crash every time on a Nexus 5, Google Play Services 8.3.0, using the attached project and apk.

Works OK with Android 5.0 (Samsung GS5).

Note: When setting the marker icon using marker.setIcon(BitmapDescriptorFactory.fromResource(resourceId)), it doesn't crash.

*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************
MapTest.zip
6.6 MB   Download
app-debug.apk
2.2 MB   Download
Dec 6, 2015
Project Member #1 [email protected]
Thanks for the report, we will take a look.

(Thank you for attaching a demo project too, this will make it much easier to troubleshoot!)

Status: Accepted
Labels: Internal-26046695
May 8, 2016
#2 [email protected]
I am experiencing the same issue on Nexus 5x running 6.0. Is there any update on this?
May 9, 2016
#3 [email protected]
Same issue here, seems like it's crashing after about ~1000 markers when the app cannot create more descriptors, only happening on Android 6.0.
May 10, 2016
#4 [email protected]
Same issue here, I'm using the android-maps-utils, clustering and the IconGenerator class.
Aug 16, 2016
#5 [email protected]
any fix? Even i get OutOfMemory issue after adding 1000 markers..
E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                        Process: com.blackboard.android.central.kentstate, PID: 6358
                                                                                        java.lang.RuntimeException: Could not allocate java pixel ref.
                                                                                            at android.graphics.Bitmap.nativeCreateFromParcel(Native Method)
                                                                                            at android.graphics.Bitmap.access$100(Bitmap.java:48)
                                                                                            at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:1554)
                                                                                            at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:1546)
                                                                                            at abb.onTransact(:com.google.android.gms.DynamiteModulesB:101)
                                                                                            at android.os.Binder.transact(Binder.java:387)
                                                                                            at qrh.a(:com.google.android.gms:242)
                                                                                            at qke.a(:com.google.android.gms:1254)
                                                                                            at qkg.a(:com.google.android.gms:186)
                                                                                            at qjy.a(:com.google.android.gms:6166)
                                                                                            at qrg.onTransact(:com.google.android.gms:106)
                                                                                            at android.os.Binder.transact(Binder.java:387)
                                                                                            at com.google.android.gms.maps.model.internal.zza$zza$zza.zzc(Unknown Source)
                                                                                            at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(Unknown Source)
                                                                                            at com.ellucian.mobile.android.BusRoutes.BusRoutesActivity.plotBusesOnMap(BusRoutesActivity.java:327)
Sep 12, 2016
#6 [email protected]
Are yall hacking emails or fixing mine needs fixing. Mine has been hacked please fix i need my phone for medical purpose and this is scareing me. I dont know all yalls terms just know someone has hacked me
Sep 21, 2016
#7 [email protected]
Any Update? I have meet the same question about this situation.

01-07 04:39:39.461278 24680 24693 E AndroidRuntime: FATAL EXCEPTION: BGAsyncWorker
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: Process: com.google.android.music:main, PID: 24680
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: java.lang.RuntimeException: Could not write bitmap blob file descriptor.
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.graphics.Bitmap.nativeWriteToParcel(Native Method)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.graphics.Bitmap.writeToParcel(Bitmap.java:1541)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.graphics.drawable.Icon.writeToParcel(Icon.java:700)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.widget.RemoteViews$ReflectionAction.writeToParcel(RemoteViews.java:1255)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.widget.RemoteViews.writeToParcel(RemoteViews.java:2885)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.app.Notification.writeToParcel(Notification.java:1759)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.app.ActivityManagerProxy.setServiceForeground(ActivityManagerNative.java:3906)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.app.Service.startForeground(Service.java:653)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.service.ForegroundService.startForegroundService(ForegroundService.java:43)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.playback.MusicPlaybackService.updateNotification(MusicPlaybackService.java:1984)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.playback.MusicPlaybackService.updateNotificationAndMediaSessionMetadata(MusicPlaybackService.java:1960)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.playback.MusicPlaybackService.access$2500(MusicPlaybackService.java:127)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.playback.MusicPlaybackService$15.onArtRequestComplete(MusicPlaybackService.java:1513)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at com.google.android.music.art.ArtResolverImpl$NotifyListenersRunnable.run(ArtResolverImpl.java:330)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:815)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:104)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:207)
01-07 04:39:39.461278 24680 24693 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:61)
Jan 8, 2017
#8 [email protected]
No solution to this yet? Appears to still be an issue!
Sign in to add a comment

Powered by Google Project Hosting