<p dir="auto">Image loading starts again after scrolling in recyclerView. Can it resume loading or loading in background?</p>
<p dir="auto">Me again :)</p>
<p dir="auto">Got some questions about when images are recycled and how internals works, since I get way more java.lang.RuntimeException: Canvas: trying to use a recycled bitmap than before switching to Glide.</p>
<p dir="auto">Since I can't reproduce it's hard to find the cause.</p>
<p dir="auto">Numbers are not very high (5000 crash on more than 7 000 000 screen views per week glide 3.6.0) but high enough for me to investigate.</p>
<p dir="auto">Most calls are basics :</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(ctx)
     .load(xxx)
     .centerCrop()
     .animate(R.anim.abc_fade_in)
     .error(R.drawable.default_thumb_fanart_misc)
     .into(mViewFanart);
"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">ctx</span>)
     .<span class="pl-en">load</span>(<span class="pl-s1">xxx</span>)
     .<span class="pl-en">centerCrop</span>()
     .<span class="pl-en">animate</span>(<span class="pl-smi">R</span>.<span class="pl-s1">anim</span>.<span class="pl-s1">abc_fade_in</span>)
     .<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">default_thumb_fanart_misc</span>)
     .<span class="pl-en">into</span>(<span class="pl-s1">mViewFanart</span>);</pre></div>
<p dir="auto">Context is sometimes application context to simplify reused code, is there impact of not using fragment / activities ?</p>
<p dir="auto">The only other call that could trigger is:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=".into(new SimpleTarget&lt;Bitmap&gt;() {
    @Override
    public void onResourceReady(Bitmap bitmap, GlideAnimation&lt;? super Bitmap&gt; glideAnimation) {
        if (isAdded() &amp;&amp; mViewThumb != null) {
            mViewThumb.setImageBitmap(bitmap);
        }
    }

    @Override
    public void onLoadFailed(Exception e, Drawable errorDrawable) {
        if (isAdded() &amp;&amp; mViewThumb != null) {
            mViewThumb.setImageDrawable(errorDrawable);
        }
    }

    @Override
    public void onLoadCleared(Drawable placeholder) {
        super.onLoadCleared(placeholder);
        try {
            mViewThumb.setImageResource(R.drawable.default_thumb_big);
        } catch (Exception ignore) {
        }
    }
});"><pre class="notranslate">.<span class="pl-en">into</span>(<span class="pl-k">new</span> <span class="pl-smi">SimpleTarget</span>&lt;<span class="pl-smi">Bitmap</span>&gt;() {
    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">Bitmap</span> <span class="pl-s1">bitmap</span>, <span class="pl-smi">GlideAnimation</span>&lt;? <span class="pl-en">super</span> <span class="pl-smi">Bitmap</span>&gt; <span class="pl-s1">glideAnimation</span>) {
        <span class="pl-k">if</span> (<span class="pl-en">isAdded</span>() &amp;&amp; <span class="pl-s1">mViewThumb</span> != <span class="pl-c1">null</span>) {
            <span class="pl-s1">mViewThumb</span>.<span class="pl-en">setImageBitmap</span>(<span class="pl-s1">bitmap</span>);
        }
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onLoadFailed</span>(<span class="pl-smi">Exception</span> <span class="pl-s1">e</span>, <span class="pl-smi">Drawable</span> <span class="pl-s1">errorDrawable</span>) {
        <span class="pl-k">if</span> (<span class="pl-en">isAdded</span>() &amp;&amp; <span class="pl-s1">mViewThumb</span> != <span class="pl-c1">null</span>) {
            <span class="pl-s1">mViewThumb</span>.<span class="pl-en">setImageDrawable</span>(<span class="pl-s1">errorDrawable</span>);
        }
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onLoadCleared</span>(<span class="pl-smi">Drawable</span> <span class="pl-s1">placeholder</span>) {
        <span class="pl-en">super</span>.<span class="pl-en">onLoadCleared</span>(<span class="pl-s1">placeholder</span>);
        <span class="pl-k">try</span> {
            <span class="pl-s1">mViewThumb</span>.<span class="pl-en">setImageResource</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">default_thumb_big</span>);
        } <span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> <span class="pl-s1">ignore</span>) {
        }
    }
});</pre></div>
<p dir="auto">But from my understanding of the docs the onLoadCleared that I use should cover this problem.</p>
<p dir="auto">Any advice / tips on how / what to check to find the root cause ?</p>