Hello,
Last Friday I bought the Pro version with source code so I could be able to use singles in the TChart values.
I changed the include file and recompiled the TChart source.
When I fill the series in a Win32 setting I get an Invalid Floating point error.
If I compile the same source as Win64 setting then every thing works fine.
I have made a test program that I attached .
I'm using Delphi 10.1 Berlin on a 64 Bit Pc.
Hope to hear from you soon.
Regards,
Marcel Horsthuis.
Invalid floating point with Chartvalues as singles and Win32
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Invalid floating point with Chartvalues as singles and Win32
- Attachments
-
- Test_Chart32.zip
- (249.23 KiB) Downloaded 684 times
Re: Invalid floating point with Chartvalues as singles and Win32
Hello Marcel,
Many thanks for the project and information.
We have reproduced the problem you're experiencing here. We're investigating the causes and we give you an answer as soon as possible.
Thanks in advance
Many thanks for the project and information.
We have reproduced the problem you're experiencing here. We're investigating the causes and we give you an answer as soon as possible.
Thanks in advance
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Invalid floating point with Chartvalues as singles and Win32
Hello Marcel,
We've observed you are casting single to TChartValue here:
TChartValues is an array of TChartValue, and TChartValue is Double by default (or Single if you changed it in TeeDefs.inc). I'd suggest you to change your F_XArray and F_YArray intermediate variables to be array of array of TChartValue instead of array of array of single.
We've observed you are casting single to TChartValue here:
Code: Select all
Chart_Test.Series[iSerie].XValues.Value := TChartValues(F_XArray[iSerie]);
Code: Select all
F_XArray : array of array of TChartValue;
F_YArray : array of array of TChartValue;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Re: Invalid floating point with Chartvalues as singles and Win32
Hello Yeray
I made the changes you suggested but the error still remains.
When debugging the code the error occurs in VLCTee.TeEngine.pas in function XPosValue.
It seems the the result value becomes greater then high(int32).
Regards,
Marcel
I made the changes you suggested but the error still remains.
When debugging the code the error occurs in VLCTee.TeEngine.pas in function XPosValue.
It seems the the result value becomes greater then high(int32).
Regards,
Marcel
Re: Invalid floating point with Chartvalues as singles and Win32
Hello Marcel,
Here my tests with RAD Studio 10.1 Berlin Update 2 in a Windows 10 x64, but always compiling against Win32 target platform:
- Using TEEVALUEDOUBLE (default) define in v2016.19 and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Works fine for me here: Changing F_XArray and F_YArray to array of array of TChartValue in your application gives the same result.
- Using TEEVALUESINGLE define in v2016.19 and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Doesn't crash, but gives me a strange result: Changing F_XArray and F_YArray to array of array of TChartValue in your application gives the same result.
- Using TEEVALUEEXTENDED define in v2016.19 TeeRecompile crashes with an error in TChartAxis.IncDec method. We've corrected this error for the next maintenance release.
I'll send the latest sources to the mail account you have registered in this forums.
- Using TEEVALUEEXTENDED define with the current sources and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Crashes at the TChartValueList.RecalcStats method in VCLTee.TeEngine.pas.
Changing F_XArray and F_YArray to array of array of TChartValue in your application works fine for me here, giving a different result than the result obtained using TEEVALUEDOUBLE above: Could you please explain what result would you expect to obtain?
Here my tests with RAD Studio 10.1 Berlin Update 2 in a Windows 10 x64, but always compiling against Win32 target platform:
- Using TEEVALUEDOUBLE (default) define in v2016.19 and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Works fine for me here: Changing F_XArray and F_YArray to array of array of TChartValue in your application gives the same result.
- Using TEEVALUESINGLE define in v2016.19 and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Doesn't crash, but gives me a strange result: Changing F_XArray and F_YArray to array of array of TChartValue in your application gives the same result.
- Using TEEVALUEEXTENDED define in v2016.19 TeeRecompile crashes with an error in TChartAxis.IncDec method. We've corrected this error for the next maintenance release.
I'll send the latest sources to the mail account you have registered in this forums.
- Using TEEVALUEEXTENDED define with the current sources and defining F_XArray and F_YArray as array of array of single (as it is in your application):
Crashes at the TChartValueList.RecalcStats method in VCLTee.TeEngine.pas.
Changing F_XArray and F_YArray to array of array of TChartValue in your application works fine for me here, giving a different result than the result obtained using TEEVALUEDOUBLE above: Could you please explain what result would you expect to obtain?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Re: Invalid floating point with Chartvalues as singles and Win32
Hello Yeray
Thank you for your solution.
The last graph is the graph is the result we expect to obtain.
The first graph is the result if you assign a doubles array to a singles ChartValues in lines 104 and 108 of the program
This is intended to point the X/YValues.Value array of the series to the pointer of the 2 dimensional array by iSerie
So if you have Singles array values pointing to double Chart values then you get a mismatch of points resulting in graph 1.
The graph 2 gives the same result as on my pc. The error occurs if I resize the form.
I'm excited to receive your mail with the solution.
Thank you for your quick support. (working on a deadline right now)
Marcel Horsthuis
Thank you for your solution.
The last graph is the graph is the result we expect to obtain.
The first graph is the result if you assign a doubles array to a singles ChartValues in lines 104 and 108 of the program
Code: Select all
104 Chart_Test.Series[iSerie].XValues.Value := TChartValues(F_XArray[iSerie]);
105 Chart_Test.Series[iSerie].XValues.Modified := True;
106 Chart_Test.Series[iSerie].XValues.Count := ValueCount;
107
108 Chart_Test.Series[iSerie].YValues.Value := TChartValues(F_YArray[iSerie]);
109 Chart_Test.Series[iSerie].YValues.Modified := True;
110 Chart_Test.Series[iSerie].YValues.Count := ValueCount;
So if you have Singles array values pointing to double Chart values then you get a mismatch of points resulting in graph 1.
The graph 2 gives the same result as on my pc. The error occurs if I resize the form.
I'm excited to receive your mail with the solution.
Thank you for your quick support. (working on a deadline right now)
Marcel Horsthuis
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Re: Invalid floating point with Chartvalues as singles and Win32
Thank you Yeray for the beta version.
After un-installing the previous version and installing the beta version my test program works fine.
I had some problems compiling the actual program but after changing all the TeeDef.inc files for single TChartValues in the win32 directories the actual program works now also.
Thank you again for the support.
After un-installing the previous version and installing the beta version my test program works fine.
I had some problems compiling the actual program but after changing all the TeeDef.inc files for single TChartValues in the win32 directories the actual program works now also.
Thank you again for the support.
Re: Invalid floating point with Chartvalues as singles and Win32
Hello,
Great, thanks for the feedback!
Great, thanks for the feedback!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |