Application window freeze problems with 3.2015.0108
Application window freeze problems with 3.2015.0108
Hello,
with the latest version 3.2015.0108 I am experiencing random freezes that result in the whole application unable to redraw, and also I can see the CPU load goes up. Simply replacing latest version with the previous i have (3.2013.1219) and the freezes do not occur anymore, without changing anything in the code. I do not have simple code to reproduce, because the problem occurs in a large application and I am not allowed to disclose any portion of it. I can see that one of the freezes occurs when I have large panel, JScrollPane inside and the chart is somewhere below the field of view. When I scroll down to it, the application freezes the moment the first row of the chart commander has to be shown. I will see whether I can create simple code snipped that reproduces this. Also I noticed it when filling a chart dynamically using a thread. If the series that I fill data in are added to the chart - the freeze occurs, if I fill the series as a stand-alone object and then add it to the series - then no freeze occurs and the chart is properly redrawn. As in previous case - simply rolling back the older version solves these problems. What can I do to help more with this issue?
regards,
Plamen
with the latest version 3.2015.0108 I am experiencing random freezes that result in the whole application unable to redraw, and also I can see the CPU load goes up. Simply replacing latest version with the previous i have (3.2013.1219) and the freezes do not occur anymore, without changing anything in the code. I do not have simple code to reproduce, because the problem occurs in a large application and I am not allowed to disclose any portion of it. I can see that one of the freezes occurs when I have large panel, JScrollPane inside and the chart is somewhere below the field of view. When I scroll down to it, the application freezes the moment the first row of the chart commander has to be shown. I will see whether I can create simple code snipped that reproduces this. Also I noticed it when filling a chart dynamically using a thread. If the series that I fill data in are added to the chart - the freeze occurs, if I fill the series as a stand-alone object and then add it to the series - then no freeze occurs and the chart is properly redrawn. As in previous case - simply rolling back the older version solves these problems. What can I do to help more with this issue?
regards,
Plamen
Re: Application window freeze problems with 3.2015.0108
Hi Plamen,
We understand it's sometimes difficult to reduce your projects to the minimum indispensable to reproduce a situation but if you reach it, you should end with an application with random data or at least without any sensitive information.
If you are adding several points to a series at once, a good practice is to disable autorepaint before adding the points, and reenable it once you finished adding points.
However, this shouldn't have changed with the versions. So there could be some problem here we'll be glad to investigate.
As you'll understand, it's very difficult for us to debug and find the origin of a problem without a simple example reproducing it.plamen wrote:I do not have simple code to reproduce, because the problem occurs in a large application and I am not allowed to disclose any portion of it.
We understand it's sometimes difficult to reduce your projects to the minimum indispensable to reproduce a situation but if you reach it, you should end with an application with random data or at least without any sensitive information.
Can you reproduce this in a new simple application with just a Chart and a Commander on a JScrollPane?plamen wrote:I can see that one of the freezes occurs when I have large panel, JScrollPane inside and the chart is somewhere below the field of view. When I scroll down to it, the application freezes the moment the first row of the chart commander has to be shown.
It would be really helpful.plamen wrote:I will see whether I can create simple code snipped that reproduces this.
This sounds as a redrawing problem. Note that when a point is added the chart is repainted to show it.plamen wrote:Also I noticed it when filling a chart dynamically using a thread. If the series that I fill data in are added to the chart - the freeze occurs, if I fill the series as a stand-alone object and then add it to the series - then no freeze occurs and the chart is properly redrawn.
If you are adding several points to a series at once, a good practice is to disable autorepaint before adding the points, and reenable it once you finished adding points.
However, this shouldn't have changed with the versions. So there could be some problem here we'll be glad to investigate.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Application window freeze problems with 3.2015.0108
Hello,
this is to inform you, that so far I was unable to reproduce the error starting with new application. Still the freezes occur in the large application with the latest TeeChart version, so I will need to investigate further. Will let you know if I find something.
regards,
Plamen
this is to inform you, that so far I was unable to reproduce the error starting with new application. Still the freezes occur in the large application with the latest TeeChart version, so I will need to investigate further. Will let you know if I find something.
regards,
Plamen
Re: Application window freeze problems with 3.2015.0108
Hi Plamen,
In the sources, at com\steema\teechart\axis\Axis.java you'll find a method named maxLabelsValueWidth() ending as follows:
Change it for just this:
If you find any problem in the process or if the change doesn't fix the problem for you, don't hesitate to let us know.
There's another bug we identified and fixed a couple of weeks ago that may be related. I'm not sure if the fix for it will fix the problem you are experiencing but it's worth a try.plamen wrote:this is to inform you, that so far I was unable to reproduce the error starting with new application. Still the freezes occur in the large application with the latest TeeChart version, so I will need to investigate further. Will let you know if I find something.
In the sources, at com\steema\teechart\axis\Axis.java you'll find a method named maxLabelsValueWidth() ending as follows:
Code: Select all
private int maxLabelsValueWidth() {
//...
if (tmp != 0) {
tmpResult = 0;
int limit = 5000;
do {
tmpResult = Math.max(tmpResult, chart.multiLineTextWidth(labels.labelValue(tmpB)).width);
tmpB -= tmp;
limit -= 1;
} while ((tmpB < tmpA) || (limit == 0));
} else {
tmpResult = (chart.getGraphics3D().textWidth(" ")
+ Math.max(chart.multiLineTextWidth(
labels.labelValue(tmpA)).width,
chart.multiLineTextWidth(labels.labelValue(tmpB)).width));
}
return tmpResult;
}
Code: Select all
private int maxLabelsValueWidth() {
//...
double tmpC = tmp * (int) ((iMaximum - tmp) / tmp);
tmpResult = chart.getGraphics3D().textWidth(" ")
+ Math.max(Math.max(chart.multiLineTextWidth(labels.labelValue(tmpA)).width,
chart.multiLineTextWidth(labels.labelValue(tmpB)).width),
chart.multiLineTextWidth(labels.labelValue(tmpC)).width);
return tmpResult;
}
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Application window freeze problems with 3.2015.0108
Hi Yeray,
Thanks for your reply. I will try to implement this change. I found the source file file and made the change in it. What is the best way to compile/package the component? Is there something specific I need to know?
regards,
Plamen
Thanks for your reply. I will try to implement this change. I found the source file file and made the change in it. What is the best way to compile/package the component? Is there something specific I need to know?
regards,
Plamen
Re: Application window freeze problems with 3.2015.0108
Hi Plamen,
In Swing, you can directly use the sources in your project. If you are using Netbeans:
- Create a "New project...", a "Java Project with Existing Sources"
- Give it a name and a folder for the project files, not necessarily in where TeeChart is installed
- In the "Existing Sources" window, "Add Folder..." pointing to where the "com" folder of the TeeChart Java sources are. Ie: "C:\Program Files (x86)\Steema Software\TeeChartJavaSrc_3.2015.0108\src\Swing" and Finish.
- In your project "Properties", remove the TeeChart.Swing.jar from the "Libraries" section, and navigate to the path where you saved the source project files in the second step above through the "Add Project..." option.
In Swing, you can directly use the sources in your project. If you are using Netbeans:
- Create a "New project...", a "Java Project with Existing Sources"
- Give it a name and a folder for the project files, not necessarily in where TeeChart is installed
- In the "Existing Sources" window, "Add Folder..." pointing to where the "com" folder of the TeeChart Java sources are. Ie: "C:\Program Files (x86)\Steema Software\TeeChartJavaSrc_3.2015.0108\src\Swing" and Finish.
- In your project "Properties", remove the TeeChart.Swing.jar from the "Libraries" section, and navigate to the path where you saved the source project files in the second step above through the "Add Project..." option.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Application window freeze problems with 3.2015.0108
Hi Yeray,
I am using Eclipse. I have done the change, built and used the modified source tree and can confirm that the freezes are not observed anymore. Let me test a bit more today and I will get back to you with more precise info. Thanks for your cooperation. If this change is what fixes the bug, is there an estimated date on which the next teechart release will incorporate it, or I need to create my own TeeChart.Swing.jar and use it if next release date is far in the future?
regards,
Plamen
I am using Eclipse. I have done the change, built and used the modified source tree and can confirm that the freezes are not observed anymore. Let me test a bit more today and I will get back to you with more precise info. Thanks for your cooperation. If this change is what fixes the bug, is there an estimated date on which the next teechart release will incorporate it, or I need to create my own TeeChart.Swing.jar and use it if next release date is far in the future?
regards,
Plamen
Re: Application window freeze problems with 3.2015.0108
Hi again,
this is to inform you, that I have created Eclipse project here with the source + resources and arranged for a Maven build infrastructure, so in general I am ready to incorporate other source code changes and build/package them if need be.
regards,
Plamen
this is to inform you, that I have created Eclipse project here with the source + resources and arranged for a Maven build infrastructure, so in general I am ready to incorporate other source code changes and build/package them if need be.
regards,
Plamen
Re: Application window freeze problems with 3.2015.0108
Hi Plamen,
I'm afraid I can't tell you a date for the next maintenance release to be published. However, if you or any other customer prefers it, we can prepare a beta version with the current sources.
I'm afraid I can't tell you a date for the next maintenance release to be published. However, if you or any other customer prefers it, we can prepare a beta version with the current sources.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Application window freeze problems with 3.2015.0108
Hi Yeray,
if the beta will contain only this bugfix, I essentially already have it, but if other bugfixes are going to go in - then of course a version with less bugs is always preferable![Smile :)](./images/smilies/icon_smile.gif)
Anyway, let's see what other customers say about it, for now I am happy with this temporary solution. Thanks again for your cooperation!
regards,
Plamen
if the beta will contain only this bugfix, I essentially already have it, but if other bugfixes are going to go in - then of course a version with less bugs is always preferable
![Smile :)](./images/smilies/icon_smile.gif)
Anyway, let's see what other customers say about it, for now I am happy with this temporary solution. Thanks again for your cooperation!
regards,
Plamen