Skip to content
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

InAppFragment crash #400

Closed
klemzy opened this issue Oct 26, 2016 · 4 comments
Closed

InAppFragment crash #400

klemzy opened this issue Oct 26, 2016 · 4 comments

Comments

@klemzy
Copy link

klemzy commented Oct 26, 2016

We have detected the following crash in one of our apps:

Fatal Exception: java.lang.IllegalStateException: Activity has been destroyed at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1450) at android.app.BackStackRecord.commitInternal(BackStackRecord.java:687) at android.app.BackStackRecord.commit(BackStackRecord.java:663) at com.mixpanel.android.mpmetrics.InAppFragment.remove(InAppFragment.java:250) at com.mixpanel.android.mpmetrics.InAppFragment.access$000(InAppFragment.java:45) at com.mixpanel.android.mpmetrics.InAppFragment$1.run(InAppFragment.java:77) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7225) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@baboog
Copy link

baboog commented Nov 24, 2016

same here ... on v 4.9.0 ... any fix for this in any later build or any idea or update?

@kroussevrb
Copy link

@klemzy how's it going :D

We also stumbled across this issue in a Segment-provided mixpanel bundled sdk (4.5.2)

Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1438)
at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1456)
at android.app.BackStackRecord.commitInternal(BackStackRecord.java:707)
at android.app.BackStackRecord.commit(BackStackRecord.java:671)
at com.mixpanel.android.mpmetrics.InAppFragment.cleanUp(InAppFragment.java:247)
at com.mixpanel.android.mpmetrics.InAppFragment.onSaveInstanceState(InAppFragment.java:229)
at android.app.Fragment.performSaveInstanceState(Fragment.java:2514)
at android.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManager.java:1767)
at android.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1824)
at android.app.FragmentController.saveAllState(FragmentController.java:113)
at android.app.Activity.onSaveInstanceState(Activity.java:1573)
at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:570)
at android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:509)
at android.app.Activity.performSaveInstanceState(Activity.java:1502)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1308)
at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:4964)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4242)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4301)
at android.app.ActivityThread.-wrap28(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1669)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

@clownba0t
Copy link

This issue (OP's) still seems to occur with version 5.1.3 of the library - I've just received a crash report for a Nexus 7 running Android 6.0.1:

Fatal Exception: java.lang.IllegalStateException: Activity has been destroyed
       at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1433)
       at android.app.BackStackRecord.commitInternal(BackStackRecord.java:687)
       at android.app.BackStackRecord.commit(BackStackRecord.java:663)
       at com.mixpanel.android.mpmetrics.InAppFragment.remove(SourceFile:263)
       at com.mixpanel.android.mpmetrics.InAppFragment.access$000(SourceFile:45)
       at com.mixpanel.android.mpmetrics.InAppFragment$1.run(SourceFile:77)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5417)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Please do let me know if there's any further information I can provide that would be of use.

@patedit
Copy link
Contributor

patedit commented Sep 12, 2017

hopefully this fixes it 98bb530 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants