Crash with nearly identical X values in two TPointSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
hansw
Newbie
Newbie
Posts: 2
Joined: Mon Jul 22, 2019 12:00 am

Crash with nearly identical X values in two TPointSeries

Post by hansw » Wed Nov 20, 2019 12:29 pm

Hello,

we discovered a rare but nasty condition when displaying/painting a chart leads to a crash due to an out of memory error.
It is sufficient to have two point series (or line series) in a chart and to add an X value to one series and and a very similar X value to the other series. Then when the chart is painted the program crashes.

I have a attached a simple program (C++Builder 10.2 Tokyo Update 2) to demonstrate the problem. When the button is pressed the program crashes. Please note that the second X value has to be calculated from the input value, otherwise the X values are identical and the error does not occur.

We are using version 2017.23 in our productive system but the crash also occurs with 2019.28.

Please let us know if there is a fix for the problem. As we have the source code version we could also use a source code fix.

Regards

Hans
Attachments
OutOfMemory.zip
(8.15 KiB) Downloaded 910 times

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Crash with nearly identical X values in two TPointSeries

Post by Marc » Wed Nov 27, 2019 4:04 pm

Hello Hans,

Your test app crashes when run as you expected. We're looking to see what may be the cause; nothing obvious yet.

Regards,
Marc Meumann
Steema Support

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

Re: Crash with nearly identical X values in two TPointSeries

Post by Yeray » Thu Nov 28, 2019 1:41 pm

Hello,

I've added it to the public tracker (#2267).
I'll send you a fix proposal you can test 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

hansw
Newbie
Newbie
Posts: 2
Joined: Mon Jul 22, 2019 12:00 am

Re: Crash with nearly identical X values in two TPointSeries

Post by hansw » Fri Nov 29, 2019 10:22 am

Hello Yeray,

the proposed fix solves the problem. There seems to be no regression introduced by the fix.

Thank you very much for the fast support!

Regards

Hans

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

Re: Crash with nearly identical X values in two TPointSeries

Post by Yeray » Fri Nov 29, 2019 12:46 pm

Hello,

I'm merging the changes to the base code and closing the ticket.
Thanks for the feedback, Hans.
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