Page 1 of 1

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

Posted: Thu Sep 26, 2019 9:24 am
by 17185819
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)


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

Posted: Mon Sep 30, 2019 3:48 pm
by Marc
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

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

Posted: Wed Oct 02, 2019 12:46 pm
by 17185819
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

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

Posted: Thu Oct 03, 2019 7:12 am
by yeray
Hello,

Thanks. I've added the patch to the main sources.