Page 1 of 2

Bug with TLegendPalette?

Posted: Mon Nov 03, 2014 6:45 pm
by 16567921
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

Re: Bug with TLegendPalette?

Posted: Tue Nov 04, 2014 11:43 am
by yeray
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?

Re: Bug with TLegendPalette?

Posted: Tue Nov 04, 2014 4:53 pm
by 16567885
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:

Re: Bug with TLegendPalette?

Posted: Tue Nov 04, 2014 5:26 pm
by 16567921
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

Re: Bug with TLegendPalette?

Posted: Wed Nov 05, 2014 3:20 pm
by yeray
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 41561 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'.

Re: Bug with TLegendPalette?

Posted: Wed Nov 05, 2014 4:44 pm
by 16567921
Hello,

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

Regards

Re: Bug with TLegendPalette?

Posted: Thu Nov 06, 2014 8:31 am
by yeray
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 41554 times

Re: Bug with TLegendPalette?

Posted: Thu Nov 06, 2014 5:49 pm
by 16567921
So, were you able to recreate this?

Re: Bug with TLegendPalette?

Posted: Fri Nov 07, 2014 8:00 am
by narcis
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.

Re: Bug with TLegendPalette?

Posted: Mon Nov 10, 2014 8:53 am
by yeray
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.

Re: Bug with TLegendPalette?

Posted: Tue Nov 11, 2014 8:21 pm
by 16567921
Hello,

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

Re: Bug with TLegendPalette?

Posted: Tue Nov 11, 2014 8:37 pm
by 10046032
When I try to see the properties of TLegendPalette I get an empty Titles page

Re: Bug with TLegendPalette?

Posted: Wed Nov 12, 2014 11:13 am
by yeray
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

Re: Bug with TLegendPalette?

Posted: Wed Nov 12, 2014 6:02 pm
by 10046032
.. here is a screenshot when I enable EurekaLog, if it can be of any help

Re: Bug with TLegendPalette?

Posted: Thu Nov 13, 2014 9:12 am
by yeray
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.