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

【BUG反馈】 空指针异常,非必现, 最新版本是否针对性解决 #441

Closed
4 tasks done
manitozhang opened this issue May 7, 2024 · 3 comments
Closed
4 tasks done
Labels
bug Something isn't working 等待反馈 存疑或问题需要进一步确认

Comments

@manitozhang
Copy link

⚠️ 重要阅读

  • 请确保你已升级至 最新发布的测试版本,旧版本存在的问题不再处理。
  • 请确保你已在 已有的issues 中查询过没有类似的问题。
  • 请先确认您已阅读《常见问题》
  • 如有条件建议尝试拉取整个项目,尝试运行 Demo app,并模拟在 Demo 环境中运行可能存在问题的代码,如果可以复现请提交 issues 并附上复现代码。

问题描述

bugly报错了一些空指针的异常
image

DialogX 版本

0.0.50.beta4

设备信息

vivo 系统版本 Android 12,level 31

是否在 Demo 中能复现此问题?

问题截图/视频

截屏/视频

错误日志

`#145156 java.lang.NullPointerException
Attempt to invoke virtual method 'android.view.WindowInsetsController android.view.View.getWindowInsetsController()' on a null object reference

com.kongzue.dialogx.util.views.FitSystemBarUtils$5.void onGlobalLayout()(FitSystemBarUtils.java:544)`
@manitozhang manitozhang added the bug Something isn't working label May 7, 2024
@kongzue
Copy link
Owner

kongzue commented May 9, 2024

请更新至最新的测试版本,因代码更新相关代码在 FitSystemBarUtils.java:544 已经无法找到,针对旧版本存在的问题不再处理

@kongzue kongzue added the 等待反馈 存疑或问题需要进一步确认 label May 9, 2024
@moguqxiong
Copy link

最新测试版同样会出现一样的问题,FitSystemBarUtils.java:586,这部分getDecorView().getWindowInsetsController(),这个getDecorView()确实可能出现空的情况

@stale stale bot removed the 等待反馈 存疑或问题需要进一步确认 label May 10, 2024
@kongzue
Copy link
Owner

kongzue commented May 17, 2024

getDecorView 为空可能的原因在于您在弹出对话框时并未完成初始化,请确保提前完成了初始化操作:

DialogX.init(context)

DialogX 依赖于 activity 界面呈现界面内容,如果您正尝试使用其他实验性的实现方式(DialogX.implIMPLMode不为IMPL_MODE.VIEW)也可能存在影响。

@kongzue kongzue added the 等待反馈 存疑或问题需要进一步确认 label May 17, 2024
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

No branches or pull requests

3 participants