NPE in PieGraph.onTouchEvent
Hi Daniel,
through ACRA, I'm getting a NPE that seems to be related to your library. Unfortunately i can't reproduce the issue on my device and going by the amount of reports, it does not appear to be too common.
Stacktrace: http://pastie.org/pastes/8606947/text?key=yph5ehit0g4cxbvgvksyug Codebase of your app being used: https://bitbucket.org/d4rken/holographlibrary-sdm/
You can get a current apk of my app here: http://thedarken.eu/sdmaid/UNSTABLE/
The PieGraphs can be found by selecting the "Overview" section and then tapping the sdcard icon or the gear icon of an entry that lists the free storage.
Specific line that causes the crash: https://bitbucket.org/d4rken/holographlibrary-sdm/src/a3c80c278252/HoloGraphLibrary/src/com/echo/holographlibrary/PieGraph.java?at=master#cl-138
Any thoughts on this? Let me know if you need further information.
Comments (6)
-
repo owner -
reporter Wouldn't this crash only be possible if onTouchEvent gets executed before onDraw ?
-
repo owner You are correct... realistically, it wouldn't happen to a user. However, if you would like to avoid it, you could place use a boolean value to check if onDraw has completed.
-
repo owner - changed status to resolved
81ded26 should have fixed this. Let me know :)
-
reporter I've made this change: https://bitbucket.org/d4rken/holographlibrary-sdm/commits/42915bfc0b842f21bff43ffbcdf475cf9ec05806 Currently deploying the apk using it, if it worked i would have made a pull request.
-
repo owner It looks like it does... actually I kind of like your code better :P
- Log in to comment
I can't reproduce, but since it's an NPE, there are a couple things that could be suspect. Try implementing a check in the source for slice.getPath() and slice.getRegion(). They shouldn't be null, but you might as well see if this fixes your problem?