PipePipe icon indicating copy to clipboard operation
PipePipe copied to clipboard

[Bug] Crash when playing video: cannot use a recycled source in createBitmap

Open ThatAnnoyingVegan opened this issue 1 month ago • 11 comments

Checklist

  • [x] I make sure that the issue is NOT a duplicate of pinned issues
  • [x] I make sure I am using the LATEST version - check here
  • [x] I understand that issues with limited impact, such as those occurring on specific devices or under specific network conditions, will not be fixed
  • [x] I have attached the error report in the issue

Describe the bug

The crash occurs when attempting to play a video.

version 5.0.0-beta2 project.pipepipe.app

FATAL EXCEPTION: main Process: project.pipepipe.app, PID: 32660 java.lang.IllegalArgumentException: cannot use a recycled source in createBitmap at android.graphics.Bitmap.createBitmap(Bitmap.java:942) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:864) at android.media.MediaMetadata$Builder.scaleBitmap(MediaMetadata.java:996) at android.media.MediaMetadata$Builder.build(MediaMetadata.java:970) at android.media.session.MediaSession.setMetadata(MediaSession.java:512) at androidx.media3.session.legacy.MediaSessionCompat$MediaSessionImplApi21.setMetadata(MediaSessionCompat.java: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:991) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.app.ActivityThread.main(ActivityThread.java:8934) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

Frequency

Always (100% of the time)

Device

Poco F1 Android 15 aosp based custom rom

Steps to reproduce the bug

No response

Additional context

No response

ThatAnnoyingVegan avatar Nov 01 '25 19:11 ThatAnnoyingVegan

It happens every time you open a video?

InfinityLoop1308 avatar Nov 01 '25 21:11 InfinityLoop1308

What is your device model & android version?

InfinityLoop1308 avatar Nov 01 '25 21:11 InfinityLoop1308

What is your device model & android version?

Poco F1 Android 15 aosp based custom rom

ThatAnnoyingVegan avatar Nov 02 '25 03:11 ThatAnnoyingVegan

It happens every time you open a video?

Yes, every time.

ThatAnnoyingVegan avatar Nov 02 '25 03:11 ThatAnnoyingVegan

also happens to me on Xiaomi Mi 10S and AxionAOSP v1.6 based on Android 15 only occur on the beta versions, since 5.0.0-beta1; version 4.x.x works fine

fukiame avatar Nov 02 '25 07:11 fukiame

Seems like a custom rom issue: https://github.com/crdroidandroid/issue_tracker/issues/742

InfinityLoop1308 avatar Nov 02 '25 07:11 InfinityLoop1308

wondering how on current stable its fine :spin:

fukiame avatar Nov 02 '25 14:11 fukiame

That is because we are using the latest media3 which seems affected. The 4.7.4 uses exoplayer which releases ~3 years ago.

also see https://github.com/chsbuffer/ReVancedXposed/issues/29#issuecomment-3084170279

@fukiame @ThatAnnoyingVegan According to the reference comment, most roms should have already fixed it. Can you check if you have applied the latest system update? Let me know if it doesn't help.

InfinityLoop1308 avatar Nov 02 '25 22:11 InfinityLoop1308

did help with my other devices; my current main one unfortunately have some, uhh, problems, though thats just me, will figure out myself

fukiame avatar Nov 03 '25 13:11 fukiame

That is because we are using the latest media3 which seems affected. The 4.7.4 uses exoplayer which releases ~3 years ago.

also see chsbuffer/ReVancedXposed#29 (comment)

@fukiame @ThatAnnoyingVegan According to the reference comment, most roms should have already fixed it. Can you check if you have applied the latest system update? Let me know if it doesn't help.

For some reason, it only happens with the current ROM that I'm using. It doesn't happen with A10 or newer A16 builds.

ThatAnnoyingVegan avatar Nov 11 '25 13:11 ThatAnnoyingVegan

did help with my other devices; my current main one unfortunately have some, uhh, problems, though thats just me, will figure out myself

Have you found a workaround yet?

ThatAnnoyingVegan avatar Nov 11 '25 13:11 ThatAnnoyingVegan