Overflow on chart resize
Overflow on chart resize
Hi support
On chart resize to very small width I get Float overflow error. Note that c++ builder do not mask overflows so in case you allow overflows then TeeChart should mask them. Attached is a demo example, but any chart behave like this.
On chart resize to very small width I get Float overflow error. Note that c++ builder do not mask overflows so in case you allow overflows then TeeChart should mask them. Attached is a demo example, but any chart behave like this.
- Attachments
-
- ChartResizeError.zip
- (56.24 KiB) Downloaded 1455 times
Re: Overflow on chart resize
Hello,
Are you running the latest version available, v2016.19?
I can't reproduce this problem with it.
Are you running the latest version available, v2016.19?
I can't reproduce this problem with it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overflow on chart resize
Yes, I run the latest official version and in C++ builder Berlin 10.1.2. The problem only occur with Win64 target platform.
I have just looked at the stack trace and the error in the example project occurs in DoDefaultLabels, but I have seen in other functions as well for my real project but always related to label position calculation.
I have just looked at the stack trace and the error in the example project occurs in DoDefaultLabels, but I have seen in other functions as well for my real project but always related to label position calculation.
Re: Overflow on chart resize
Hello,
I could reproduce the problem so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1745
This worked wine with v2016.18.
I could reproduce the problem so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1745
This worked wine with v2016.18.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overflow on chart resize
It is now 2 years since I reported this and it is still not fixed. Please fix this critical issue a.s.a.p. Why should I continue my subscription if such critical bugs is not even fixed within two years?
Re: Overflow on chart resize
Hello,
I'm sorry to hear you are so disappointed.
We got to the conclusion that the necessary verifications should be done by the developer to not affect the performance (here).
In the case of a resize, I can only think on avoiding it with the OnResize event. Ie:
I'm sorry to hear you are so disappointed.
We got to the conclusion that the necessary verifications should be done by the developer to not affect the performance (here).
In the case of a resize, I can only think on avoiding it with the OnResize event. Ie:
Code: Select all
procedure TForm1.ChartResize(Sender: TObject);
begin
if Chart1.Height<100 then
Chart1.Height:=100;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overflow on chart resize
This is clearly not the correct solution as this means the chart cannot be resized below that size. Also what if the margins change, then the constant 100 should also change. Please look at it again to avoid the overflow in your calculations. Right now I mask overflow exceptions, but clearly that means any overflow problem in the project will not be found (time bomb). So this is not a solution in the long term.
Re: Overflow on chart resize
Hello,
An alternative would be to modify the MinAxisIncrement property as Whookie said here. Have you tried that?
An alternative would be to modify the MinAxisIncrement property as Whookie said here. Have you tried that?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overflow on chart resize
I have tried, but I do not know if I did it correctly. I have now installed binary version and not source code version. I installed just now source code version in parallel without running teerecompile. Then I modified Teengine.pas. Ran Teerecompile without installing packages into the IDE. Compied VCLTee.Teengine.dcu's to binary installation folders. Seems not to make a difference. Anything I miss? Can you make the test on your side?
Re: Overflow on chart resize
Hello,
To check if a change in the sources is being used I would do this:
- Install TeeChart Pro with sources.
- Do the changes in the main sources (in "Source" folder, not in "VCL" folder).
- Run "TeeRecompile -generateunits:26" from the command prompt (this overwrites "VCL" and "FMX" folders if they exist).
- Add the "Source\VCL" folder to the library path. Remove or comment any reference to a TeeChart binary install.
- Place a breakpoint to the modified lines in the "Source\VCL" version.
- Run the project and see if the modified lines are used.
NOTE: You can modify the units at the "Source\VCL" folder, but running TeeRecompile will overwrite that folder. So, before running TeeRecompile make sure you move the changes to the non prefixed units at the "Source" folder.
When you are happy with the changes in your sources, I would:
- Run TeeRecompile to generate the .dcus.
- Modify the library path to reference the "Compiled" folders (ie "Compiled\Delphi26.win32\Lib") as a binary installation would do.
- Remove or comment the reference to the "Source\VCL" folder in the library path.
To check if a change in the sources is being used I would do this:
- Install TeeChart Pro with sources.
- Do the changes in the main sources (in "Source" folder, not in "VCL" folder).
- Run "TeeRecompile -generateunits:26" from the command prompt (this overwrites "VCL" and "FMX" folders if they exist).
- Add the "Source\VCL" folder to the library path. Remove or comment any reference to a TeeChart binary install.
- Place a breakpoint to the modified lines in the "Source\VCL" version.
- Run the project and see if the modified lines are used.
NOTE: You can modify the units at the "Source\VCL" folder, but running TeeRecompile will overwrite that folder. So, before running TeeRecompile make sure you move the changes to the non prefixed units at the "Source" folder.
When you are happy with the changes in your sources, I would:
- Run TeeRecompile to generate the .dcus.
- Modify the library path to reference the "Compiled" folders (ie "Compiled\Delphi26.win32\Lib") as a binary installation would do.
- Remove or comment the reference to the "Source\VCL" folder in the library path.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overflow on chart resize
Below seems to work. I think the problem is that FPU uses 80 bit internally wheras SSE only uses 64 bit. For this reason the MinAxisIncrement will have to be higher on Win64 platform (SSE). I have not investigated the lower possible value for MinAxisIncrement, but at least below seems to work. It is a much lower value than used in the other thread. Can you investigate further and include this fix in the next release?
Code: Select all
MinAxisIncrement :TAxisValue = {$IFDEF TEEVALUESINGLE}
1.40129846432482e-45
{$ELSE}
{$IFDEF WIN64}
1.40129846432482e-45
{$ELSE}
4.94065645841247e-324 //this IS MinDouble
{$ENDIF}
{$ENDIF}; // Epsilon 0.000000000001; { <-- "double" for BCB }
Re: Overflow on chart resize
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |