OnDismissListener报空指针
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 158
- PR merge metrics
- No merged PRs in 30d
Description
LOG:
```
java.lang.NullPointerException: Attempt to write to field 'com.kongzue.dialog.interfaces.OnDismissListener com.kongzue.dialog.util.BaseDialog.onDismissListener' on a null object reference
at com.kongzue.dialog.v3.TipDialog.show(TipDialog.java:154)
```
调用代码:
`TipDialog.show(getThisActivity(), bean.getMessage_app(), TipDialog.TYPE.WARNING).setTipTime(1500);`
环境:
设备:MI8(MIUI 11)、mate20(内部测试只测了这两台)
出现时机:未知,只要不set dismiss listener就有可能会出现
API版本:com.kongzue.dialog_v3x:dialog:3.1.9
SDK版本:targetSdkVersion 29,use AndroidX
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at TipDialog.java line 154 and reproduce the reported call without setting an OnDismissListener: TipDialog.show(getThisActivity(), bean.getMessage_app(), TipDialog.TYPE.WARNING).setTipTime(1500). Trace why the object is null at that point, then verify the same scenario on the reported Android configuration no longer raises the NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100