Closed FrantisekGazo closed 1 year ago
Thanks! We'll check what's causing those exceptions.
I have same issue!
I @FrantisekGazo & @nasikhunamin and thank you for your feedbacks. This crash has been fixed in 1.0.9. I let you reopen this issue if it happens again.
@Doc1faux it's still happening. Currently on version 1.0.10
. Please reopen this issue.
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at androidx.fragment.app.FragmentManager.p(FragmentManager.java:2)
at androidx.fragment.app.FragmentManager.Z(FragmentManager.java:5)
at f.m.d.a.s(BackStackRecord.java:12)
at f.m.d.a.h(BackStackRecord.java:1)
at f.m.d.d.show(DialogFragment.java:5)
at im.crisp.client.internal.t.a.a
at im.crisp.client.internal.t.a.a
at im.crisp.client.internal.t.a$a.b
at im.crisp.client.internal.t.a$a.m
at i.a.a.b.j.e.run(lambda)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Hi @FrantisekGazo and thank you for your feedback.
I firstly looked over your stacktrace but found nothing which could give me a hint on why this could happen because I've already protected all UI calls from async with isAdded()
methods...
But while looking for "State loss exceptions", I found an old interesting blog post about it: https://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html
After reading this, I protected more these calls with the following pattern:
if (isAdded()) {
FragmentManager manager = getParentFragmentManager() | getChildFragmentManager();
if (! manager.isStateSaved()) {
// perform fragment transaction
}
}
I hope it will fix definitively these crashes... I plan it for the next release.
@FrantisekGazo 1.0.13
fixing this issue has just been released.
It can take a few hours before it will be available.
I close the issue.
thank you, will try
I found multiple exceptions like this coming from the crisp sdk.
crisp sdk version: 1.0.7