Issue 1:
glide:4.0.0-SNAPSHOT

It's neither device nor Android version specific. I can't reproduce it, but it doesn't seem rare when looking at crash numbers.

In this case it happened when returning from Activity A to Activity B and Activity B contains the animation. It possible that the ImageViews visibility state is changed shortly after returning to Activity B.

public void setState(State state) {
mState = state;
if (state == State.WORKING) {
setVisibility(VISIBLE);
mIntroContainer.setVisibility(GONE);
mEmptyContainer.setVisibility(GONE);
mWorkingContainer.setVisibility(VISIBLE); // android:id="@+id/working_overlay"
Glide.with(getContext())
.load(COFFEE_ANIM_ASSET)
.apply(RequestOptions.formatOf(DecodeFormat.PREFER_RGB_565))
.apply(RequestOptions.placeholderOf(R.drawable.sdmanimation))
.into(mWorkingAnimation); // android:id="@+id/iv_working_animation"
} else {
Glide.with(getContext()).clear(mWorkingAnimation);
mWorkingContainer.setVisibility(GONE);
if (state == State.INTRO) {
setVisibility(VISIBLE);
mEmptyContainer.setVisibility(GONE);
mIntroContainer.setVisibility(VISIBLE);
} else if (state == State.NORESULTS) {
setVisibility(VISIBLE);
mIntroContainer.setVisibility(GONE);
mEmptyContainer.setVisibility(VISIBLE);
} else if (state == State.GONE) {
setVisibility(GONE);
mIntroContainer.setVisibility(GONE);
mEmptyContainer.setVisibility(GONE);
}
}
}

<LinearLayout
android:id="@+id/working_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:padding="16dp"
android:visibility="gone"
tools:visibility="visible">

<ImageView
android:id="@+id/iv_working_animation"
android:layout_width="200dp"
android:layout_height="200dp"
android:padding="5dp"
android:src="@drawable/sdmanimation"/>
</LinearLayout>

Caused by: java.lang.NullPointerException: Attempt to read from field 'int com.bumptech.glide.gifdecoder.GifHeader.frameCount' on a null object reference
at com.bumptech.glide.gifdecoder.GifDecoder.getFrameCount(GifDecoder.java:262)
at com.bumptech.glide.load.resource.gif.GifFrameLoader.getFrameCount(GifFrameLoader.java:139)
at com.bumptech.glide.load.resource.gif.GifDrawable.startRunning(GifDrawable.java:166)
at com.bumptech.glide.load.resource.gif.GifDrawable.start(GifDrawable.java:154)
at com.bumptech.glide.request.target.ImageViewTarget.onStart(ImageViewTarget.java:102)
at com.bumptech.glide.manager.TargetTracker.onStart(TargetTracker.java:31)
at com.bumptech.glide.RequestManager.onStart(RequestManager.java:245)
at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStart(ActivityFragmentLifecycle.java:51)
at com.bumptech.glide.manager.SupportRequestManagerFragment.onStart(SupportRequestManagerFragment.java:175)
at android.support.v4.app.Fragment.performStart(Fragment.java:1986)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1102)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1230)
at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2047)
at android.support.v4.app.FragmentController.dispatchStart(FragmentController.java:176)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:553)
at eu.thedarken.sdm.SDMServiceActivity.onStart(SDMServiceActivity.java:79)
at eu.thedarken.sdm.SDMMainActivity.onStart(SDMMainActivity.java:155)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6006)
at android.app.Activity.performRestart(Activity.java:6063)
at android.app.Activity.performResume(Activity.java:6068)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Issue 2:
v 4.4.0

N/A

LG K10 Android M

When adding new item in my RecyclerView I place it at the very top of the list (index 0). In my first attempt to add new items everything is good but in my second attempt to add new item I get some image to my CardView although I dont have any image include on that item. I also call notifyDataSetChanged() after adding new item at the top so that adapter position is always up to date.

This is what on my RecyclerView.

//Set all announcement data
void setAnnouncementPost(final String su, final String title, final String description, final String
time, final String thumbnail, final String imgUri, final String imgThumbnail){
//Stop shimmering the item if any of the data becomes available
if (!su.isEmpty()) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {

shimmerPost.stopShimmerAnimation();
mSuDP.setEnabled(true);
mSU.setBackground(null);
mSU.setText(su);
mSU.setTextColor(Color.WHITE);

post.setBackground(null);
post.setTextColor(Color.WHITE);

mtimePostedTxtView.setBackground(null);
mtimePostedTxtView.setText(time);
mtimePostedTxtView.setTextColor(Color.WHITE);

mtitleTxtView.setBackground(null);
mtitleTxtView.setText(title);
mtitleTxtView.setTextColor(Color.WHITE);

mdescriptionTxtView.setBackground(null);
mdescriptionTxtView.setText(description);
mdescriptionTxtView.setTextColor(Color.WHITE);

/*
Set post images
*/

//Set the user's profile picture
if (!isDetached && context != null)
GlideApp.with(context)
.load(thumbnail)
.placeholder(R.color.icon_not_selected)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model,
Target<Drawable> target, boolean isFirstResource) {
return false;
}

@Override
public boolean onResourceReady(Drawable resource, Object model,
Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
return false;
}
})
.into(mSuDP);

//Check if user includes some photo
if (imgThumbnail != null && imgUri != null){
mRelative.setVisibility(View.VISIBLE);
//Set any announcement picture
if (!isDetached)
if (imgThumbnail.contains(".jpg") && imgUri.contains(".jpg"))
GlideApp.with(context)
.load(imgUri)
.thumbnail(GlideApp.with(context).load(imgThumbnail))
.placeholder(R.color.icon_not_selected)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model,
Target<Drawable> target, boolean isFirstResource) {
//If Log In forms is hidden then Progress should be visible
return false;
}

@Override
public boolean onResourceReady(Drawable resource, Object model,
Target<Drawable> target, DataSource dataSource, boolean
isFirstResource) {
mProgress.setVisibility(View.GONE);
return false;
}
})
.into(mImage);
}

else if (imgUri != null && imgUri.contains(".gif")){
mRelative.setVisibility(View.VISIBLE);
//Set any announcement picture
if (!isDetached)
GlideApp.with(context)
.asGif()
.load(imgUri)
.placeholder(R.color.icon_not_selected)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.listener(new RequestListener<GifDrawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model,
Target<GifDrawable> target, boolean isFirstResource) {
return false;
}

@Override
public boolean onResourceReady(GifDrawable resource, Object model,
Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
mProgress.setVisibility(View.GONE);
return false;
}
})
.into(mImage);

}

leftBmb.setVisibility(View.VISIBLE);
mReactions.setVisibility(View.VISIBLE);

}
},2000);
}
}

I think the main causes would be "notifyDataSetChanged()" since it give RecyclerView.NO_POSITION in every call. Also I get repetitive "Bitmap may cause graphical corruption!" logs if the item loaded asGif() is at the bottom or not yet visible on the screen but when it is visible it stop throwing logs and again if I scroll where it is no longer visible it throws again those message in logs.