Page 1 of 1

Internal error

Posted: Tue Jul 30, 2013 10:23 am
by 17466531

This error happens occasionally on a continuously (every minute) updating linear chart.
I'm using TeeChart test version 0722fg.

Have you any idea why it happens?

Thank you!

Code: Select all

	at com.steema.teechart.axis.Axis.internalCalcLabelStyle(
	at com.steema.teechart.axis.Axis.calcLabelStyle(
	at com.steema.teechart.axis.Axis.maxLabelsWidth(
	at com.steema.teechart.axis.Axis.internalCalcSize(
	at com.steema.teechart.axis.Axis.getSizeLabels(
	at com.steema.teechart.axis.Axis.calcRect(
	at com.steema.teechart.Chart.axisRect(
	at com.steema.teechart.Chart.calcAxisRect(
	at com.steema.teechart.Chart.internalDraw(
	at com.steema.teechart.Chart.paint(
	at com.steema.teechart.TChart.image(
	at com.steema.teechart.Chart.image(
	at com.steema.teechart.TChart.getImage(
	at com.steema.teechart.TChart.paint(
	at com.steema.teechart.TChart.paintChart(
	at com.steema.teechart.TChart.access$400(
	at com.steema.teechart.TChart$2.paintControl(
	at org.eclipse.swt.widgets.TypedListener.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Display.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Control.drawWidget(
	at org.eclipse.swt.widgets.Widget.drawRect(
	at org.eclipse.swt.widgets.Display.windowProc(
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(
	at org.eclipse.swt.widgets.Display.applicationProc(
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
	at org.eclipse.equinox.launcher.Main.main(

Re: Internal error

Posted: Tue Jul 30, 2013 3:20 pm
by yeray
Hello Ishan,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Internal error

Posted: Thu Aug 01, 2013 9:01 am
by 17466531

I'm sorry but it's not possible.
We are not even able to reproduce the problem on the developing workstation.

We were trying to understand if the exception is caused by values in the data, values in the labels or something else...

Mauro ( Ishan's colleague )

Re: Internal error

Posted: Thu Aug 01, 2013 10:39 am
by 17466531
We found the error.
There were some labels in the serie with a null value.
Maybe the next TeeChart can manage this situation without throwing a NPE.


Re: Internal error

Posted: Thu Aug 01, 2013 10:46 am
by yeray
Hi Mauro,

How are you adding these null labels to the series?
The following seems to work fine for me here with SWT:

Code: Select all

		Bar bar1 = new Bar(tChart1.getChart());
		String s;
		for (int i=0; i<5; i++) {
			if (i!=2)
				s="hi " + String.valueOf(i);
			bar1.add(i, s);