UpdatableFragmentStatePagerAdapter icon indicating copy to clipboard operation
UpdatableFragmentStatePagerAdapter copied to clipboard

Crashes due to IllegalStateException

Open aritraroy opened this issue 7 years ago • 5 comments

I am using this library in my app, but unfortunately have been getting a lot of crashes because of it.

Non-fatal Exception: java.lang.IllegalStateException: Fragment no longer exists for key f163: index 2

There are many others just like this where the "key" and "index" values are different. I liked this library and this bug makes it unusable for me. Any idea how to fix this?

aritraroy avatar Jan 31 '17 10:01 aritraroy

Any updates on this?

aritraroy avatar Feb 10 '17 19:02 aritraroy

@aritraroy I am sorry I haven't noticed this issue. Can you please provide some sample code that will reproduce the problem? Or at least a stack trace.

DanielNovak avatar Apr 13 '17 19:04 DanielNovak

I have a ViewPager which shows some images to user. I am setting up the adapter and attaching it to the viewpager. Instead of using Android's FragmentStatePagerAdapter, I am using yours. But I see these crashes consistently when users are viewing some images and are rotating the device. Any idea what can go wrong here?

aritraroy avatar Apr 14 '17 10:04 aritraroy

@aritraroy Can you please provide stacktrace of the crash? Maybe also your implementation of getItemId() is not consistent? Hmm.... I will take a look at it today.

DanielNovak avatar Apr 14 '17 10:04 DanielNovak

Hello DanielNovak, I have used your UpdatableFragmentPagerAdapter, But it still working as FragmentStatePager.... Its still keep increasing memory and leads to OOM error. Could you please help.

parekhamit89 avatar May 14 '17 12:05 parekhamit89