java.lang.NullPointerException in com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783) ~

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
patronas
Newbie
Newbie
Posts: 26
Joined: Fri Mar 01, 2019 12:00 am

java.lang.NullPointerException in com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783) ~

Post by patronas » Thu Sep 26, 2019 9:24 am

We are getting NPEs. Sadly we are not able to reproduce them. Maybe someone with more insight can have a look at this?

Here the Full message:

Code: Select all

java.lang.NullPointerException
	at com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783)
	at com.steema.teechart.styles.Circular.clicked(Circular.java:247)
	at com.steema.teechart.styles.Pie.clicked(Pie.java:1816)
	at com.steema.teechart.styles.Series.clicked(Series.java:3351)
	at com.steema.teechart.tools.MarksTip.mouseEvent(MarksTip.java:226)
	at com.steema.teechart.Chart.broadcastMouseEvent(Chart.java:1016)
	at com.steema.teechart.Chart.broadcastMouseEvent(Chart.java:1005)
	at com.steema.teechart.Chart.mouseMoved(Chart.java:1406)
	at com.steema.teechart.TChart.processMouseMotionEvent(TChart.java:1265)
	at com.steema.teechart.TChart$3.handleEvent(TChart.java:378)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1190)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1051)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3931)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3534)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at de.patronas.opus.client.rcp.core.rcpapp.Application.lockAndRunWorkbench(Application.java:152)
	at de.patronas.opus.client.rcp.core.rcpapp.Application.start(Application.java:112)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)


Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: java.lang.NullPointerException in com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783) ~

Post by Marc » Mon Sep 30, 2019 3:48 pm

Hello,

We'll run some tests, see if we can provoke the error.

Do you have any information about any circumstances that might help us get nearer to the setup of the original app? It's swt I see.

Thanks and regards,
Marc Meumann
Steema Support

patronas
Newbie
Newbie
Posts: 26
Joined: Fri Mar 01, 2019 12:00 am

Re: java.lang.NullPointerException in com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783) ~

Post by patronas » Wed Oct 02, 2019 12:46 pm

Somehow the click event was triggered. But I have no idea how.

We created the following patch solving the problem for us.

Code: Select all

--- SWT/com/steema/teechart/drawing/Graphics3D.java     2019-09-27 10:06:20.114953492 +0200
+++ SWT/com/steema/teechart/drawing/Graphics3D.java     2019-09-27 10:05:04.751053446 +0200
@@ -780,6 +780,7 @@
         * @return boolean^M
         */^M
        static public boolean pointInEllipse(Point p, Rectangle rect) {^M
+               if(rect == null) return false;^M
                Point tmp = rect.center();^M
                int tmpWidth = (int) Utils.sqr(tmp.x - rect.x);^M
                int tmpHeight = (int) Utils.sqr(tmp.y - rect.y);^M

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: java.lang.NullPointerException in com.steema.teechart.drawing.Graphics3D.pointInEllipse(Graphics3D.java:783) ~

Post by Yeray » Thu Oct 03, 2019 7:12 am

Hello,

Thanks. I've added the patch to the main sources.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply