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

点击调试悬浮球崩溃了! #1177

Open
RockyQu opened this issue Aug 22, 2019 · 1 comment
Open

点击调试悬浮球崩溃了! #1177

RockyQu opened this issue Aug 22, 2019 · 1 comment

Comments

@RockyQu
Copy link

RockyQu commented Aug 22, 2019

在开启“不保留活动”退到后台,再点应用图标后能正常恢复,但是点击悬浮球崩溃,报以下错误

java.lang.IllegalStateException: Fragment has not been attached yet.
at android.support.v4.app.Fragment.instantiateChildFragmentManager(Fragment.java:2383)
at android.support.v4.app.Fragment.getChildFragmentManager(Fragment.java:845)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.getChildFragmentRecords(DebugStackDelegate.java:185)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.addDebugFragmentRecord(DebugStackDelegate.java:218)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.getChildFragmentRecords(DebugStackDelegate.java:190)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.addDebugFragmentRecord(DebugStackDelegate.java:218)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.getFragmentRecords(DebugStackDelegate.java:155)
at me.yokeyword.fragmentation.debug.DebugStackDelegate.showFragmentStackHierarchyView(DebugStackDelegate.java:103)
at me.yokeyword.fragmentation.debug.DebugStackDelegate$1.onClick(DebugStackDelegate.java:69)
at android.view.View.performClick(View.java:6291)
at me.yokeyword.fragmentation.debug.DebugStackDelegate$StackViewTouchListener.onTouch(DebugStackDelegate.java:264)
at android.view.View.dispatchTouchEvent(View.java:11784)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:549)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1953)
at android.app.Activity.dispatchTouchEvent(Activity.java:3559)
at me.yokeyword.fragmentation.SupportActivity.dispatchTouchEvent(SupportActivity.java:59)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:502)
at android.view.View.dispatchPointerEvent(View.java:12027)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5304)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5093)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4588)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4641)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4607)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4734)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4615)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4791)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4588)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4641)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4607)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4615)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4588)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7195)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7169)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7130)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7351)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:379)
at android.os.Looper.loop(L

@JantHsueh
Copy link

JantHsueh commented Jan 17, 2020

我和你遇到同样的问题,主要原因是栈中出现了连续两个同一类的实例,使用上加以规范就可避免这个问题。

我写了篇文章,从源码详细分析了该问题,希望对你有帮助,我后续会对该库继续进行维护。
Fragment has not been attached yet 解决方法及源码详解

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

2 participants