Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

bugly上报了几个snake的奔溃,帮忙优化一下 #27

Open
zfnian opened this issue Jan 6, 2020 · 2 comments
Open

bugly上报了几个snake的奔溃,帮忙优化一下 #27

zfnian opened this issue Jan 6, 2020 · 2 comments

Comments

@zfnian
Copy link

zfnian commented Jan 6, 2020

#7024 java.lang.NullPointerException
Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference
com.youngfeng.snake.view.SnakeHackLayout.onLayout(SnakeHackLayout.java:268)

#28304 java.lang.IndexOutOfBoundsException
Index: 2, Size: 0
com.youngfeng.snake.view.SnakeHackLayout.dispatchTouchEvent(SnakeHackLayout.java:4)

@zfnian
Copy link
Author

zfnian commented Jan 6, 2020

第一个空指针,可以做个判空规避一下;
第二个数组越界不知道怎么解决,从dispatchTouchEvent(SnakeHackLayout.java:4)里引起,以下是全部推栈:

java.lang.IndexOutOfBoundsException
Index: 1, Size: 0
1 java.util.ArrayList.get(ArrayList.java:437)
2 android.view.ViewGroup.getAndVerifyPreorderedView(ViewGroup.java:3568)
3 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2583)
4 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2988)
5 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2613)
6 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2988)
7 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2613)
8 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2988)
9 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2613)
10 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2988)
11 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2613)
12 com.youngfeng.snake.view.SnakeHackLayout.dispatchTouchEvent(SnakeHackLayout.java:4)
13 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2988)

@zfnian
Copy link
Author

zfnian commented Jan 6, 2020

上述2个问题如果解决了,请发邮件给我 :[email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant