Porting to Delphi 10.1 Berlin

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Porting to Delphi 10.1 Berlin

Post by LucaC » Tue May 09, 2017 9:39 am

Hi,
I've made a porting of one of my dll modules that uses TeeChart. The version is 2016.19.

I've the same module running without problem in XE2 environment with TeeChart 2012.

When I run my module in debug point it give me an Out Of Memory error with the Stack Trace in the attached picture.

What can be?
Attachments
TeeError.png
TeeError.png (148.34 KiB) Viewed 21869 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Tue May 09, 2017 10:07 am

Hello,

There could be some memory leak.
Could you please try to arrange a simple example project we can run as-is to reproduce the problem here? Of course it would be out of your library, just using a TChart in a form.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Wed May 10, 2017 8:18 am

Hi Yeray,
It was a bit complicated but I did it :D

The problem seems to be this type of assigment

Code: Select all

serie2.DataSource:= serie1;
and then call a function on serie2.

Code: Select all

serie2.SetFunction(TAverageTeeFunction.Create(Self));
I try to attach the project but it seem that the download fails.

How can I send it to you?

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Wed May 10, 2017 8:52 am

I've made some other check, and I discover that this code

Code: Select all

procedure TForm2.FormShow(Sender: TObject);
var
  FPunti  : Integer;
  FValore : Integer;
begin
  FormatSettings.DecimalSeparator:= '.';
  FChart:= TChart.Create(Self);
  FChart.Parent:= cxTabSheet1;
  FChart.Align:= alClient;
  FChart.Gradient.Visible:= True;
  FChart.Gradient.StartColor:= clLime;
  FChart.Gradient.EndColor  := clWhite;
  FSerie:= TLineSeries.Create(Self);
  FChart.AddSeries(FSerie);
  FSerie2:= TLineSeries.Create(Self);
  FChart.AddSeries(FSerie2);

  for FPunti:= 1 to 8 do
    FSerie.Add(42);

  FSerie2.DataSource:= FSerie;
  FSerie2.SetFunction(TAverageTeeFunction.Create(Self));
end;
give error if instead of an integer number (in this case 42) i've a floting pont number (42.3) for example.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Wed May 10, 2017 1:51 pm

Hello,

Try enabling TEEVALUEEXTENDED: at TeeDefs.inc, change the following lines:

Code: Select all

{$DEFINE TEEVALUEDOUBLE}
{.$DEFINE TEEVALUESINGLE}
{.$DEFINE TEEVALUEEXTENDED}
For these:

Code: Select all

{.$DEFINE TEEVALUEDOUBLE}
{.$DEFINE TEEVALUESINGLE}
{$DEFINE TEEVALUEEXTENDED}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Wed May 10, 2017 1:56 pm

Hi have more than one file with this name. In which folder I've to change it?

Then I've to recompile components?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Thu May 11, 2017 6:14 am

Hello,

Sorry, indeed you have to recompile the sources after modifying that.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Thu May 11, 2017 7:31 am

If I try to change this optionr when I execute TeeRecompile i receive this error

===============================================
TeeChart Pro
Compilation started: 11/05/2017 09:30:29

Win32 v24 (Delphi 10.1 Berlin and C++Builder 10.1 Berlin Update 2) (C++)
Tee924

Cannot recompile Delphi package: Tee924.dpk
Embarcadero Delphi for Win32 compiler version 31.0
Copyright (c) 1983,2016 Embarcadero Technologies, Inc.
VCLTee.TeEngine.pas(4034) Error: E1035 Return value of function 'TChartAxis.IncDec' might be undefined
Tee924.dpk(40) Fatal: F2063 Could not compile used unit 'VCLTee.TeEngine.pas'
EXCEPTION:
Compilation aborted.
--------------------------------------------

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Thu May 11, 2017 8:19 am

Hello,

I could reproduce this error with TeeChart v2016.19 and Berlin.
It works fine with the latest TeeChart v2017.21.

Another alternative is to handle the situation setting an axis range manually. Ie:

Code: Select all

FChart.Axes.Left.SetMinMax(42, 42.6);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Thu May 11, 2017 11:46 am

Ok,
I've updated the to .21 and after TeeDefs.inc was updated I can compile and install components.

Now the short program that I've sent to you is working, but my dll goes always out of memory.

It's not possible to set a TeamViewer or another remote control session to check the problem on my sources?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Fri May 12, 2017 8:04 am

Hello,
LucaC wrote:I've updated the to .21 and after TeeDefs.inc was updated I can compile and install components.

Now the short program that I've sent to you is working, but my dll goes always out of memory.
It seems to work for me here with the following test application:
TeeChart_GDIPlus_exe_and_dll_memoryleak.zip
(57.87 KiB) Downloaded 726 times
LucaC wrote:It's not possible to set a TeamViewer or another remote control session to check the problem on my sources?
Yes, I'll will send you a mail with instructions.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Fri May 12, 2017 8:17 am

Hi again,

Too fast...
It works for me with RAD 10.2 Tokyo, but I rechecked it with RAD 10.1 Berlin (to be sure to be doing the same than you) and the problem is still reproducible with it!
I'll will investigate the problem and I'll be back to you here asap.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Fri May 12, 2017 8:18 am

Ok, I'll wait your instructions.

Thank you :)

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by LucaC » Mon May 15, 2017 7:49 am

Hi Yeray,
have you any news about my two problems?

I need to fix all within the end of the week.

Thank you,
Luca

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Porting to Delphi 10.1 Berlin

Post by Yeray » Mon May 15, 2017 8:05 am

Hi Luca,

While we investigate if there's anything we can do to solve that problem in Berlin, have you checked if the SetMinMax workaround (suggested here) is acceptable for you?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply