-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android O Beta - java.lang.IllegalStateException: Handling non empty state of parent class is not implemented #477
Comments
I can confirm, this error happens only on Android O for us, and seems to happen only on Nexus/Pixel devices. Edit: Was mislead by API level 25 in crash reports, looks like Android O reported API level 25 for a while. |
As far as I know it only happens on Android O. It might be a bug with the platform
|
With O and maybe earlier, the assumption that StickyListHeaderListView class relies on (that the super class does not have any state of its own to safe) no longer necessarily holds true. On my fork I tried to implement proper handling of this new situation: mtotschnig@c9f9a44 |
@mtotschnig Great, thanks. Do you have a compile url for gradle for your fork? |
@chrisonline Yes it can be included via Jitpack: https://jitpack.io/#mtotschnig/StickyListHeaders/master-SNAPSHOT |
@mtotschnig There might be an issue with your implementation. I had a crash in the app, unrelated to your code but trace kept showing me your implementation about saved state. I was not able to capture it. |
Ah! Error exactly as @nvquockhtn posted at mtotschnig@c9f9a44 |
I got this issue from crashlytics too ( Did you find a way to reproduce it? I'd like to at least be able to reproduce it so that I can be sure that the fix works. |
I was able to reproduce on actual physical device (Nexus 6P with Android O)
when launching a different activity from the activity containing
StickyListHeadersListView in it's view hierarchy.
…On Mon, Jun 26, 2017, 2:05 PM Simon Ninon ***@***.***> wrote:
I got this issue from crashlytics too (Java.lang.IllegalStateException:
Handling non empty state of parent class is not implemented).
Did you find a way to reproduce it?
I setup Android O on a virtual device on Android Studio (nexus pixel xl)
but everything works fine.
If it happens in the onSaveInstance, I expect it to happen on some
configuration change, but no way to reproduce it (I tried to rotate, lock,
switch from one app to another, whatever, everything works fine).
I'd like to at least be able to reproduce it so that I can be sure that
the fix works.
So, if you have any clue about how to trigger the exception, I'd be
suuuuper glad!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#477 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAyszwn778H7UdexgwuB5F_veFmZuhL9ks5sIB0GgaJpZM4Nvc9T>
.
|
I was not able to reproduce it on Nexus 5x with latest Android beta but got many crash reports from Nexus 6P when launching a different activity from the activity with StickyHeaders. I wonder if it is related to device. |
I didn't reproduce it with a virtual device either. But with a physical Nexus 6P it happened all the time. |
Thanks for your replies! |
…lement proper parceling of both super and wrapped state
By the way, you can increase the probability of reproducing the crash by setting "Don't keep activities" in the systems' developer settings. |
Hi, I am facing similar issue and were anyone able to solve this? java.lang.IllegalStateException: |
It is solved in https://github.com/mtotschnig/StickyListHeaders/releases/tag/2.7.1 . |
@emilsjolander any plans to bring in @mtotschnig fixes? I'd prefer not to add Jitpack to my project! Thanks! |
@madhacked this project is 100% not maintained anymore, the last commit is dated from 2015. I don't think you should expect any plans. |
fyi @madhacked and those who do not want to use jitpack or the additional support library dependency: I have compiled the aar off master + 1 proper fix commit (edisonw@3dd88a2) The download link is here: https://github.com/edisonw/StickyListHeaders/blob/master/release-2.7.2.aar Everyone feel free to rename and download it locally if needed. Note the correct way to use an aar file, if your file is inside /projectRoot/app/libs/sticky-list-headers.aar, You need to declare this in your root dependency configuration:
And then you can use it as |
Root cause - wrong assumptions regarding onSavedInstanceState behavior. See emilsjolander/StickyListHeaders#477. Fix: Using a private fork by mtotschnig from JitPack with a fix.
Hey guys, @mtotschnig's personal forks had changes other than the problem addressed above. Where to get the .aar file for your project :) NOTE: |
@jungc how can I install/use this fork? |
Mute
Vào 11-10-2017 07:34, "Jaden Choi" <[email protected]> đã viết:
… Hey guys,
@mtotschnig <https://github.com/mtotschnig>'s personal forks had changes
other than the problem addressed above.
I've created a fork with his solution to the problem without any other
changes jungc#1 <jungc#1>
Also, I changed the version number to "2.7.1-FORK" in case this project
ever gets maintained again.
**NOTE:
1. This change comes from Groupon.
2. We won't maintain it.**
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#477 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATBBl750ctjbzkois8-BGV-v0OvvsYwzks5sq_7zgaJpZM4Nvc9T>
.
|
@haemi thanks for pointing that out. I've uploaded the .aar file here https://github.com/jungc/StickyListHeaders/releases/tag/2.7.1-FORK |
@jungc thanks, I did that but I get I updated my app-build.gradle:
file is here:
|
@jungc help pleeeeease... |
Hey guys, you don't have to use a fork; the extra saved state comes from the autofill framework. Disable autofill on the if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
myList.setImportantForAutofill(IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);
} Of course, if you WANT autofill in your list view, then this workaround is not for you :) |
@brianguertin thanks, it's working perfectly! |
Android 25 the same issue occured. |
#420 Xposed v89 SDK26 crash on module download page |
Fixes #420. See also emilsjolander/StickyListHeaders#477.
Fixes rovo89#420. See also emilsjolander/StickyListHeaders#477. Change-Id: I3545ab04f8587233f2e1e2ddd767c37dba40d288
I am extending StickyListHeadersListView:
this does not work for me, still crashing... |
@HoriaGoran Do you call your method then? You have just overriden it, but you probably never call it? |
I did call it. if (mStartActivityRequestWho != null || isAutofilled() So even if isAutofilled() will be false with the proposed fix, its is enough for 1 of the other 2 checks to be true and to return a non empty state for the exception to be thrown. |
Fixes rovo89#420. See also emilsjolander/StickyListHeaders#477. (cherry picked from commit 847f96e)
@brianguertin Excuse me, can say in detail how to use the code you have shown above,thanks a lot. |
@brianguertin I have already solved, thanks again。 |
autofill framework breaks everything :( |
@mtotschnig I tried your solution, but there is an error when running the app. |
Looks like, one of my modules also using this library, so I had to change both of my module-level build.gradle and app-level build.gradle, clean and rebuild to make it work. |
Root cause - wrong assumptions regarding onSavedInstanceState behavior. See emilsjolander/StickyListHeaders#477. Fix: Using a private fork by mtotschnig from JitPack with a fix.
Fixes rovo89#420. See also emilsjolander/StickyListHeaders#477. (cherry picked from commit 847f96e)
colleagues that same error happens in android 9 I get the same error when debugging java.lang.IllegalStateException: Handling non-empty state of parent class is not implemented !! help !! |
any alternative or fix for this?. Issue is when editing search view and set text works on marshmallow, not working in pie. Failed to resolve: se.emilsjolander:stickylistheaders:2.7.1 |
This case is seen on crashlytics for me too. But it happened on Android 12, Pixel 4 XL and Pixel 3 XL. Anyways, I can't reproduce the crash on Emulator of the same device's model and OS. |
收到
|
Hello,我已收到邮件,待我仔细阅读后再回复。
|
I was able to solve this by setting .setSaveEnabled(false) on the agenda list view |
actually this solved the issue for me in Android 15 while setImportantForAutofill did not. |
Hello,我已收到邮件,待我仔细阅读后再回复。
|
收到
|
Is this project still maintained?
Every now and then I get above error on Android O Beta. I guess it is related the OS but just heads up
Stack trace:
Java.lang.IllegalStateException: Handling non empty state of parent class is not implemented
at se.emilsjolander.stickylistheaders.StickyListHeadersListView.onSaveInstanceState(StickyListHeadersListView.java:1098)
at android.view.View.dispatchSaveInstanceState(View.java:17157)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3668)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3674)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3674)
at android.view.View.saveHierarchyState(View.java:17140)
The text was updated successfully, but these errors were encountered: