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

接入库之后,onDestory中SwipeRefreshLayout会报错空指针 #537

Open
andasl opened this issue Dec 10, 2020 · 3 comments
Open

接入库之后,onDestory中SwipeRefreshLayout会报错空指针 #537

andasl opened this issue Dec 10, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@andasl
Copy link

andasl commented Dec 10, 2020

W/Matrix.ActivityLeakFixer: caught unexpected exception when unbind drawables.

reset方法中setColorViewAlpha,mCircleView.getBackground() 这个得到的为null导致程序崩溃,如果不接入该库,不会有问题

@ibaozi-cn
Copy link

建议关闭activityLeakFixer

@Yves0
Copy link
Collaborator

Yves0 commented Nov 15, 2021

@andasl W/Matrix.ActivityLeakFixer: caught unexpected exception when unbind drawables. 这个日志应该不是直接导致 crash 的原因,这个是有被 catch 住的异常,是否有 crash 相关的详细堆栈或日志信息呢?

我们没有复现问题,remove background 的时机在 onDetachedFromWindow 之后,理论上是安全的

#667 该修复无效,issue 的内容是 mCircleView.getBackground() 的结果为空,修复代码中 return 之后子 View 还会递归进来 remove background drawable

@TestPlanB
Copy link

@andasl W/Matrix.ActivityLeakFixer: caught unexpected exception when unbind drawables. 这个日志应该不是直接导致 crash 的原因,这个是有被 catch 住的异常,是否有 crash 相关的详细堆栈或日志信息呢?

我们没有复现问题,remove background 的时机在 onDetachedFromWindow 之后,理论上是安全的

#667 该修复无效,issue 的内容是 mCircleView.getBackground() 的结果为空,修复代码中 return 之后子 View 还会递归进来 remove background drawable
SwipeRefreshLayout会在onDetachedFromWindow 调用reset方法,但是这个方法也会在refresh Listener里面调用,这个触发时机是在动画结束的时候,因此是有可能多次调用reset的。所以CircleImageView应该排除在ActivityLeakFixer执行兜底策略的范围

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants