CartesianSeries NullPointerException With Obfuscated Stack Trace


#1

I’m currently working on a Android app (started by another developer) that uses the Shinobi Controls library for the graphs displayed in our app.  I’m reluctant to post any code because there’s so much of it, but in any case, many users of our app are sending crash reports to our Google Play Developer Console with the following stack trace:

java.lang.NullPointerException: Attempt to invoke virtual method ‘double com.shinobicontrols.charts.cp.b(com.shinobicontrols.charts.CartesianSeries)’ on a null object reference
at com.shinobicontrols.charts.bh.a(SourceFile:57)
at com.shinobicontrols.charts.bh.a(SourceFile:49)
at com.shinobicontrols.charts.cp.a(SourceFile:64)
at com.shinobicontrols.charts.x.onDrawFrame(SourceFile:95)
at com.shinobicontrols.charts.GLTextureView$f.l(SourceFile:1609)
at com.shinobicontrols.charts.GLTextureView$f.run(SourceFile:1310)

It’s a recurring issue that has occured several times every week for the past 2 months or so.  It occured 13 times on Android 5.0, 4 times on Android 4.4, and 2 times on Android 5.1.  As for devices, it’s occured on the Galaxy S5, Galaxy S4, OnePlus One, LG G3, Galaxy Note 4, Galaxy Tab S 8.4, Nexus 6, Nexus 5, and HTC ONE.  As for which version of the Shinobi Controls library we’re using, the AndroidManifest says versionCode=“1007001” and versionName=“1.7.1-1”.

Part of the problem is that because the code has been obfuscated, we can’t use the stack trace to determine where exactly the error is occuring.  In addition, we can’t reproduce this crash on any of our devices, so it’s difficult to pinpoint exactly what’s causing this issue.

Are you able to look at your obfuscated code base side-by-side with the original code, and let us know exactly ‘what’s calling what’ to help give us a better idea of what we need to fix?


#2

Hello andredoubleu

Thanks for sending in the stack trace. I have had a look and the NPE seems to be occurring during some internal calculations concerning series grouping. I notice that you are currently using version 1.7.1 I and I recall that in version 1.7.2 some changes were made to fix a bug in the area of series grouping. At the time this bug could be reproduced by performing the following steps:

-Create a chart with two Number axes and a line series

-Remove and immediately re-add the x axis

-Now remove the series and both axes, create a new series and axes and add to the chart

I appreciate that you say you have been unable to reproduce this bug yourself, but there is a chance that your issue may have been fixed in version 1.7.2 of shinobicharts. As your application is obviously live, I don’t want to ask you to try using version 1.7.2 without first trying to gauge the likelihood of this being a successful resolution. Can you please advise, given the functionality of your application and referencing the steps which I list above, is it feasible that your bug and the bug we fixed in 1.7.2 are the same? Specifically what I mean is, does your application perform any, or all of the steps above?

Thanks

Kai.