matrix icon indicating copy to clipboard operation
matrix copied to clipboard

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

Open andasl opened this issue 5 years ago • 3 comments

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

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

andasl avatar Dec 10 '20 07:12 andasl

建议关闭activityLeakFixer

ibaozi-cn avatar Jan 22 '21 16:01 ibaozi-cn

@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

Yves0 avatar Nov 15 '21 08:11 Yves0

@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执行兜底策略的范围

TestPlanB avatar Nov 16 '21 08:11 TestPlanB