UpdatableFragmentStatePagerAdapter
UpdatableFragmentStatePagerAdapter copied to clipboard
Crashes due to IllegalStateException
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?
Any updates on this?
@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.
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 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.
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.