Android Question [SimpleMediaManager] Trying to reuse a recycled bitmap error

josejad

Expert
Licensed User
Longtime User
Hi:

I'm testing the SimpleMediaManager and I've added to my project. I get the subject error if I scroll down the pictures.

Then, I've tested again the original Sample2, and I get the error with it too, when I scroll down the CLV

Just before the error, I stop viewing the images panel, and just get what seems to be the empty clv, grey. (in debug mode, in release mode, the error appears without seeing that)

Screenshot_20211006-112935.jpg
Screenshot_20211006-112923.jpg




B4X:
Registro conectado a:  samsung SM-A105FN
--------- beginning of system
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
ResponseError. Reason: , Response: 
ResponseError. Reason: , Response: 
ResponseError. Reason: , Response: 
ResponseError. Reason: , Response: 
ResponseError. Reason: , Response: 
ResponseError. Reason: , Response: 
--------- beginning of crash
java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@bb8c12f
    at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:77)
    at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:278)
    at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:91)
    at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:548)
    at android.view.View.getDrawableRenderNode(View.java:24265)
    at android.view.View.drawBackground(View.java:24170)
    at android.view.View.draw(View.java:23893)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.widget.ScrollView.draw(ScrollView.java:2876)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at com.android.internal.policy.DecorView.draw(DecorView.java:1282)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:579)
    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:585)
    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:662)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:5042)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4749)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3866)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2618)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9971)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010)
    at android.view.Choreographer.doCallbacks(Choreographer.java:809)
    at android.view.Choreographer.doFrame(Choreographer.java:744)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:995)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8587)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Message longer than Log limit (4000). Message was truncated.


[code]
[/spoiler]
 

Attachments

  • Screenshot_20211006-112935.jpg
    Screenshot_20211006-112935.jpg
    50.9 KB · Views: 225

josejad

Expert
Licensed User
Longtime User
Thanks¡¡ Tested and working like a charm¡¡
 
Upvote 0
Top