[Android] v1.2 crashes app on selecting a single-point PieSeries


#1

I have a pie chart with series selection mode set to SelectionMode.POINT_SINGLEThe series has two data points (A and B), fed via a SimpleDataAdapter. A == Data(“foo”, 1D) and B == Data(“bar”, 0D) (I wan’t both to show in the legend, and they do).The chart displays just fine, but on tapping the series the whole app crashes with a NullPointer exception before the OnSeriesSelectionListener.onPointSelectionStateChanged() method is called. Crash log below. One thing worth noting - if I set the second data point value to 0.001D, which is small enough to not show on the chart anyway - everything works as expected. Test device is a Galaxy Nexus 7 (2012 edition) with stock Android 4.4.2. So, I assume that if a value of a data point is small enough an internal representation for it is not created, hence the NullPointer on access.

01-18 23:46:00.235: E/InputEventReceiver(9374): Exception dispatching input event.
01-18 23:46:00.235: E/MessageQueue-JNI(9374): Exception in MessageQueue callback: handleReceiveCallback
01-18 23:46:00.285: E/MessageQueue-JNI(9374): java.lang.NullPointerException
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.gp.c(SourceFile:149)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.gp.a(SourceFile:71)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.gp.onSingleTouchUp(SourceFile:42)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.fm.onSingleTouchUp(SourceFile:72)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.hj.b(SourceFile:116)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.hg.b(SourceFile:242)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.hg.c(SourceFile:230)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.hg.a(SourceFile:162)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.hf.a(SourceFile:51)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.shinobicontrols.charts.ir.onTouchEvent(SourceFile:33)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.View.dispatchTouchEvent(View.java:7706)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2210)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1945)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.View.dispatchPointerEvent(View.java:7886)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3954)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3833)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3525)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3582)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5602)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5582)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5553)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5682)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.os.MessageQueue.nativePollOnce(Native Method)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.os.MessageQueue.next(MessageQueue.java:138)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.os.Looper.loop(Looper.java:123)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at android.app.ActivityThread.main(ActivityThread.java:5017)
01-18 23:46:00.285: E/MessageQueue-JNI(9374): at java.lang.reflect.Method.invokeNative(Native Method)

#2

Hi ptashek,I’m sorry you’re having this problem.We already have the fix in place for this bug and it will be included in the V1.3 release.Best regards,Robin Sillem