Bug with TLegendPalette?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Bug with TLegendPalette?

Post by johnnix » Mon Nov 03, 2014 6:45 pm

Hello,

Please find attached a sample project file, when you run it as soon as you hover the mouse over the chart there is an error about control not having a parent. I think it is associated with TLegendPalette. Can you please confirm and suggest a fix?

I am using the latest version of TChart under Delphi XE7.

Regards
Attachments
Test Project.zip
(5.99 KiB) Downloaded 1919 times

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

Re: Bug with TLegendPalette?

Post by Yeray » Tue Nov 04, 2014 11:43 am

Hello,

I can't reproduce the problem with the application attached, TeeChart v2014.12.140923 and RAD XE7.
I'm only running the application and moving the mouse over the chart. I can also rotate it without problems.
Am I missing anything?
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

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: Bug with TLegendPalette?

Post by jens.mertelmeyer » Tue Nov 04, 2014 4:53 pm

If I add a Chart1.SeriesList.FillSampleValues(); to the OnFormCreate-event, it quickly produces an access violation at runtime. Win32, VCL, XE7.

Here is my callstack:

Code: Select all

2014.12.140923 Win32 VCL

:007415bc SortCells + $38
:00741854 DrawAllSorted + $B0
:00741b8a TSurfaceSeries.DrawAllValues + $152
:0074c932 TIsoSurfaceSeries.DrawAllValues + $1C6
:0067d301 DrawSeries + $3F5
:0067d3d2 DoDraw + $5E
:0067d59d DrawAllSeries + $89
:0067d709 TCustomAxisPanel.DrawAxesSeries + $6D
:0067ca02 TCustomAxisPanel.InternalDraw + $1D2
:0063ed93 InnerDraw + $123
:0063ee46 TCustomTeePanel.Draw + $26
:0063ea74 TCustomTeePanel.Draw + $48
Vcl.Controls.TWinControl.PaintHandler((15, (), 0, 0, 0))
Vcl.Controls.TWinControl.WMPaint((15, (), 0, 0, 0))
Vcl.Controls.TCustomControl.WMPaint((15, (), 0, 0, 0))
Vcl.Controls.TControl.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
:0063f539 TCustomTeePanel.WndProc + $11
System.Classes.StdWndProc(3934500,15,0,0)
:764b62fa ; C:\Windows\syswow64\USER32.dll
:764b7316 USER32.GetDC + 0x52
:764b6de8 ; C:\Windows\syswow64\USER32.dll
:764b6e44 ; C:\Windows\syswow64\USER32.dll
:777b010a ntdll.KiUserCallbackDispatcher + 0x2e
:764b788a USER32.DispatchMessageW + 0xf
Vcl.Forms.TApplication.ProcessMessage(???)
:005f5df0 TApplication.ProcessMessage + $F8
You can reproduce the AV by rotating the chart so that the mouse cursor leaves the window and then releasing the mousebutton. However, disabling the "legend palette" tool absolutely makes no difference. And because of that, my observation probably is of absolutely no relevance to this thread :oops:

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Tue Nov 04, 2014 5:26 pm

Hello,

I open the project file I sent you, run it and move the mouse over the chart and the error appears, we use the same TChart version (mine is 32 bit under Windows 8.1 64 bit).

Regards
Attachments
Untitled.png
Untitled.png (72.55 KiB) Viewed 44421 times

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

Re: Bug with TLegendPalette?

Post by Yeray » Wed Nov 05, 2014 3:20 pm

Hello,

Same environment here: Windows 8.1 64 bit, RAD XE7 and TeeChart Pro v2014.12 binary.
Could this be caused due to some modification you may have done to the sources? Have you tried with the binary v2014.12?

I've added this to your project to check the TeeChart version being used:

Code: Select all

uses VCLTee.TeeConst;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Caption:=TeeMsg_Version;
  //Chart1.SeriesList.FillSampleValues();
end;
2014-11-05_1605.png
2014-11-05_1605.png (23.83 KiB) Viewed 44389 times
And I can move the mouse around without any problem.

However, using SeriesList.FillSampleValues() I get an Exception after rotating the chart depending on the Rotation set, but this doesn't look as the error you are reporting:
Project Project1.exe raised exception class $C0000005 with message 'access violation at 0x0076a451: read of address 0xffffffe8'.
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

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Wed Nov 05, 2014 4:44 pm

Hello,

My version is 'TeeChart Pro v2014.12.140923 32bit VCL, you are using 2014.13?

Regards

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

Re: Bug with TLegendPalette?

Post by Yeray » Thu Nov 06, 2014 8:31 am

Hi!

Sorry, I tested it with different versions and made the screenshot with the internal sources we have here :P
2014-11-06_0929.png
2014-11-06_0929.png (23.97 KiB) Viewed 44382 times
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

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Thu Nov 06, 2014 5:49 pm

So, were you able to recreate this?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug with TLegendPalette?

Post by Narcís » Fri Nov 07, 2014 8:00 am

Hello johnnix,

Yeray is out of the office today. However, I understand that he couldn't reproduce that with our current sources. That would mean you can expect the problem being fixed for the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

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

Re: Bug with TLegendPalette?

Post by Yeray » Mon Nov 10, 2014 8:53 am

Hello,
Narcís wrote:Yeray is out of the office today. However, I understand that he couldn't reproduce that with our current sources. That would mean you can expect the problem being fixed for the next maintenance release.
I'm sorry for the confusion generated.
I made the screenshot with our current sources, but I haven't been able to reproduce the problem with v2014.12 either.
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

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Tue Nov 11, 2014 8:21 pm

Hello,

Any suggestions on what it could be going wrong? I cannot use that particular chart anymore :(

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Tue Nov 11, 2014 8:37 pm

When I try to see the properties of TLegendPalette I get an empty Titles page
Attachments
Screenshot 2014-11-11 22.32.gif
Screenshot 2014-11-11 22.32.gif (29.37 KiB) Viewed 44335 times

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

Re: Bug with TLegendPalette?

Post by Yeray » Wed Nov 12, 2014 11:13 am

Hi,

I think we should summarize a bit here.
We've repeated the tests in two different machines always running XE7 and TeeChart v2014.12.

#1. The project from the first post without modifications (series without values) works without errors; we can move the mouse around and rotate the chart.

#2. Adding values to the two series in the chart we get an AV when rotating the chart. Simplifying this to the minimum:

Code: Select all

uses TeeConst, Chart, TeeSurfa;

var Chart1: TChart;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Caption:=TeeMsg_Version;

  Chart1:=TChart.Create(Self);
  Chart1.Parent:=Self;
  Chart1.Align:=alClient;

  Chart1.View3DOptions.Orthogonal := False;

  with Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries do
  begin
    NumXValues := 1;
    FillSampleValues;
  end;
end;
I don't see the reason to have a Surface series with a unique value, but it shouldn't crash anyway so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1002
And I fixed it so the next maintenance release will include it.

In your application, setting Series1.NumXValues:=2 before Filling the values works around the problem.

#3. Empty titles tab in Legend Palette editor.
I see this happens the first time you open that tab. If you change to another tab and you reopen the Titles tab, then it's shown correctly.
I've added it to the public tracker too:
http://bugs.teechart.net/show_bug.cgi?id=1003
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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: Bug with TLegendPalette?

Post by johnnix » Wed Nov 12, 2014 6:02 pm

.. here is a screenshot when I enable EurekaLog, if it can be of any help
Attachments
Screenshot 2014-11-12 19.58.gif
Screenshot 2014-11-12 19.58.gif (39.5 KiB) Viewed 44307 times

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

Re: Bug with TLegendPalette?

Post by Yeray » Thu Nov 13, 2014 9:12 am

Hello,
johnnix wrote:.. here is a screenshot when I enable EurekaLog, if it can be of any help
I assume this is referencing the #1 in my last post.
Even if we can't reproduce the problem, looking at the Call Stack and debugging the application here I guess disabling Hover should skip the problem you are reproducing. Note TCustomAxisPanel.CheckMouseAxes funcion only does something when Hover is Visible:

Code: Select all

function TCustomAxisPanel.CheckMouseAxes(x,y:Integer):Boolean;
//...
begin
  result:=False;

  if Hover.Visible then
  //...
end;
I'm afraid we can't suggest much more without being able to reproduce the problem here.
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