Android Exception when using 3D option in chart
Posted: Sun Feb 17, 2013 10:41 pm
Hi,
We are getting the following error message when creating a 3D Chart on Android 4.0.4
We are able to reproduce this on a HTC ONE S running android 4.0.4
02-17 23:33:55.298: ERROR/AndroidRuntime(23245): FATAL EXCEPTION: main
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:451)
at com.steema.teechart.android.Graphics3DAndroid.clipPolygon(Graphics3DAndroid.java:312)
at com.steema.teechart.drawing.Graphics3D.clipToRight(Graphics3D.java:4575)
at com.steema.teechart.drawing.Graphics3D.clipCube(Graphics3D.java:4614)
at com.steema.teechart.styles.Series.clipRegionCreate(Series.java:2088)
at com.steema.teechart.styles.Series.drawSeries(Series.java:2311)
at com.steema.teechart.Chart.drawAllSeries(Chart.java:790)
at com.steema.teechart.Chart.drawAxesSeries(Chart.java:752)
at com.steema.teechart.Chart.internalDraw(Chart.java:732)
at com.steema.teechart.Chart.paint(Chart.java:2080)
at com.steema.teechart.Chart.paint(Chart.java:2096)
at com.steema.teechart.TChart.onDraw(TChart.java:322)
at android.view.View.draw(View.java:11014)
at android.view.View.getDisplayList(View.java:10444)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.draw(View.java:11017)
at android.view.View.getDisplayList(View.java:10444)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.draw(View.java:11017)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2214)
at android.view.View.getDisplayList(View.java:10444)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:899)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2123)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1810)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2700)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Code:
chart = new TChart(getBaseContext());
Language.activate(Locale.getDefault().getLanguage());
// Add the chart
LinearLayout detailChart = (LinearLayout) findViewById(R.id.linearLayoutTchart_detail);
detailChart.removeAllViews();
detailChart.addView(chart);
chart.getAspect().setPerspective(100);
chart.getAspect().setChart3DPercent(15);
chart.getAspect().setView3D(isDisplay3DChart);
Line dummy = new Line(chart.getChart());
dummy.setColor(Color.BLACK);
dummy.setShowInLegend(false);
dummy.add(0, 0, "");
dummy.add(1, 0, "");
dummy.add(2, 0, "");
dummy.add(3, 0, "");
dummy.add(4, 0, "");
dummy.add(5, 0, "");
Any Ideas?
We are getting the following error message when creating a 3D Chart on Android 4.0.4
We are able to reproduce this on a HTC ONE S running android 4.0.4
02-17 23:33:55.298: ERROR/AndroidRuntime(23245): FATAL EXCEPTION: main
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:451)
at com.steema.teechart.android.Graphics3DAndroid.clipPolygon(Graphics3DAndroid.java:312)
at com.steema.teechart.drawing.Graphics3D.clipToRight(Graphics3D.java:4575)
at com.steema.teechart.drawing.Graphics3D.clipCube(Graphics3D.java:4614)
at com.steema.teechart.styles.Series.clipRegionCreate(Series.java:2088)
at com.steema.teechart.styles.Series.drawSeries(Series.java:2311)
at com.steema.teechart.Chart.drawAllSeries(Chart.java:790)
at com.steema.teechart.Chart.drawAxesSeries(Chart.java:752)
at com.steema.teechart.Chart.internalDraw(Chart.java:732)
at com.steema.teechart.Chart.paint(Chart.java:2080)
at com.steema.teechart.Chart.paint(Chart.java:2096)
at com.steema.teechart.TChart.onDraw(TChart.java:322)
at android.view.View.draw(View.java:11014)
at android.view.View.getDisplayList(View.java:10444)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.draw(View.java:11017)
at android.view.View.getDisplayList(View.java:10444)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.getDisplayList(View.java:10442)
at android.view.ViewGroup.drawChild(ViewGroup.java:3167)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2793)
at android.view.View.draw(View.java:11017)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2214)
at android.view.View.getDisplayList(View.java:10444)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:899)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2123)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1810)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2700)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Code:
chart = new TChart(getBaseContext());
Language.activate(Locale.getDefault().getLanguage());
// Add the chart
LinearLayout detailChart = (LinearLayout) findViewById(R.id.linearLayoutTchart_detail);
detailChart.removeAllViews();
detailChart.addView(chart);
chart.getAspect().setPerspective(100);
chart.getAspect().setChart3DPercent(15);
chart.getAspect().setView3D(isDisplay3DChart);
Line dummy = new Line(chart.getChart());
dummy.setColor(Color.BLACK);
dummy.setShowInLegend(false);
dummy.add(0, 0, "");
dummy.add(1, 0, "");
dummy.add(2, 0, "");
dummy.add(3, 0, "");
dummy.add(4, 0, "");
dummy.add(5, 0, "");
Any Ideas?