You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now recently (as late as november 2025) i began seeing IllegalArgumentExceptions pertaining the Bitmaps produced by this loader:
java.lang.IllegalArgumentException: can't create mutable bitmap with Config.HARDWARE
at android.graphics.Bitmap.createBitmap(Bitmap.java:1242)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1205)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1153)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1112)
at android.media.MediaMetadata$Builder.scaleBitmap(MediaMetadata.java:997)
at android.media.MediaMetadata$Builder.build(MediaMetadata.java:973)
at android.media.session.MediaSession.setMetadata(MediaSession.java:512)
at androidx.media3.session.legacy.MediaSessionCompat$MediaSessionImplApi21.setMetadata(SourceFile:2069)
at androidx.media3.session.legacy.MediaSessionCompat.setMetadata(MediaSessionCompat.java:538)
at androidx.media3.session.MediaSessionLegacyStub.setMetadata(MediaSessionLegacyStub.java:1171)
at androidx.media3.session.MediaSessionLegacyStub.access$1700(MediaSessionLegacyStub.java:118)
at androidx.media3.session.MediaSessionLegacyStub$ControllerLegacyCbForBroadcast$1.onSuccess(MediaSessionLegacyStub.java:1675)
at androidx.media3.session.MediaSessionLegacyStub$ControllerLegacyCbForBroadcast$1.onSuccess(MediaSessionLegacyStub.java:1669)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1102)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.app.ActivityThread.main(ActivityThread.java:9079)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
Now my understanding is that this is due to Bitmaps being in hardware and thus not mutable, so this can be fixed by using .allowHardware(false), but I have not changed this code in months and only now I started getting crashes... What could be the underlying cause of this? Could this be a system update messing with it all?
Crashes happen only on Android 15 and 16 by the way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My app has been out for a while, it's a playback app and I use coil as a BitmapLoader for media3:
and
Now recently (as late as november 2025) i began seeing
IllegalArgumentExceptionspertaining the Bitmaps produced by this loader:Now my understanding is that this is due to Bitmaps being in hardware and thus not mutable, so this can be fixed by using
.allowHardware(false), but I have not changed this code in months and only now I started getting crashes... What could be the underlying cause of this? Could this be a system update messing with it all?Crashes happen only on Android 15 and 16 by the way.
Beta Was this translation helpful? Give feedback.
All reactions