To reproduce the ArrayIndexOutOfBoundsException, following actions have to be done:
Create a chart and e.g. add a line. Then zoom into and afterwards create a custom axis. Now if you unzoom an ArrayIndexOutOfBoundsException will be thrown.
As an attachment I add a code example.
Restore axes method throws an exception after unzoom
Restore axes method throws an exception after unzoom
- Attachments
-
- TestChartAxis.zip
- Reproduces an ArrayIndexOutOfBoundsException
- (1005 Bytes) Downloaded 2243 times
Re: Restore axes method throws an exception after unzoom
Hello,
I can't reproduce this with TeeChart Java v3.2014.0519 SWT.
What version are you using?
I can't reproduce this with TeeChart Java v3.2014.0519 SWT.
What version are you using?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Restore axes method throws an exception after unzoom
Hi Yeray,
thx for reply.
I use absolutely the same/newest version as you. Maybe you didn't reproduce it in the way I described it.
The code I attached, you should use in the following manner.
1) Start the TeeChart SWT Application by running the attached code.
2) Zoom into the Chart
3) press the button
4!) Zoom out -> ArrayIndexOutOfBoundsException will be thrown
I also debugged the source and on this position the source changed in comparison to the previous teechart version.
Stacktrace:
thx for reply.
I use absolutely the same/newest version as you. Maybe you didn't reproduce it in the way I described it.
The code I attached, you should use in the following manner.
1) Start the TeeChart SWT Application by running the attached code.
2) Zoom into the Chart
3) press the button
4!) Zoom out -> ArrayIndexOutOfBoundsException will be thrown
I also debugged the source and on this position the source changed in comparison to the previous teechart version.
Stacktrace:
Code: Select all
java.lang.ArrayIndexOutOfBoundsException: 0
at com.steema.teechart.Chart.restoreScales(Chart.java:1511)
at com.steema.teechart.Chart.restoreAxisScales(Chart.java:654)
at com.steema.teechart.Zoom.undo(Zoom.java:437)
at com.steema.teechart.Chart.mouseReleased(Chart.java:1595)
at com.steema.teechart.TChart.processMouseEvent(TChart.java:1191)
at com.steema.teechart.TChart$5.handleEvent(TChart.java:372)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
Re: Restore axes method throws an exception after unzoom
Hello Slix,
Excuse me, I didn't follow the steps correctly.
I could reproduce the problem now so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=925
Excuse me, I didn't follow the steps correctly.
I could reproduce the problem now so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=925
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Restore axes method throws an exception after unzoom
An I've fixed it for the next maintenance release too.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Restore axes method throws an exception after unzoom
Hi Yeray,
thx for the fix! My question for the moment is, how am I able to download this maintenance release? I can't find it in my download area, it's really urgent. I hope you can help me.
thx for the fix! My question for the moment is, how am I able to download this maintenance release? I can't find it in my download area, it's really urgent. I hope you can help me.
Re: Restore axes method throws an exception after unzoom
Hello,
However, I see you own the sources so you can apply the fix to the sources yourself.
At Chart.java you'll find a method called restoreScales(AllAxisSavedScales s). Change the line where says (line 1509 in Chart.java):
For this:
I'm afraid I can't tell you when the next maintenance release will be published.Slix wrote:thx for the fix! My question for the moment is, how am I able to download this maintenance release? I can't find it in my download area, it's really urgent. I hope you can help me.
However, I see you own the sources so you can apply the fix to the sources yourself.
At Chart.java you'll find a method called restoreScales(AllAxisSavedScales s). Change the line where says (line 1509 in Chart.java):
Code: Select all
for (int i=0; i < axes.getCustom().size(); i++)
Code: Select all
for (int i=0; i < s.customAxes.length; i++)
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |