TAdvChartView on TFrame causes AV when mouse moves

I have a TAdvGDIPChartView on a TFrame, and get an access violation the moment the mouse enters the chart area. At the moment, it's stopping inside a CPU view rather than the source, so I can only offer this info:  the AV happens inside TAdvChartView's MouseMove routine (that is, TAdvGDIPChartView has called the inherited TAdvChartView's MouseMove, and it's somewhere in there that it happens).


It appears to happen immediately after a call to GetSerieIndexAtXY  (the assembly language in the CPU window issues a call to $09996c4, which corresponds to the beginning of that routine when I used "Go To Address" to get to it).

Sorry I can't be more specific at this point; I'll endeavour to get it stopping in the source rather than CPU view if I can.  But for the moment, I am guessing that TAdvChartView is uncomfortable being on a Frame (as opposed to a Form) ?

We are not able to reproduce this here in Delphi XE with the latest Chart installed.

Could you please send us a sample project which reproduces this issue so we can investigate this here?

Regards, 
Pieter

Hi Pieter,

Thanks for your quick reply.  I've since found that putting the TAdvChartView on a TFrame is not the issue; I get it even with the TFrame out of the equation.  I am putting the chart on a TAdvTabSheet.

This is with C++ Builder XE, and I am statically linking the BPI (I am not using runtime BPLs).  I may have installed something incorrectly.  For a start, when I ran my project, it still said "Trial Version" in the upper-right hand corner of the TAdvChartView.  I found that my package list was loading advchartd2011.  I recompiled advchartc2011, and the trial version text went away, and the chart works fine... until I move my mouse on it.

Furthermore, if I set my series types to "arCommon", then I also get an access violation in a resize() routine, somewhere even before the chart appears.

All this suggests to me that the installation went wrong.  I think I'll re-install AdvCharts and hope it all goes away....

Cheers,
Kai

Please make sure of a clean installation, problems that are fixed in the latest version might reappear if the library paths or the installation is not pointing to the latest sources. You can verify at runtime by using the Version property of the Chart. It should display the latest version.

Pieter, I have more information now.  I uninstalled, reinstalled everything, so I'm definitely on the right version.


I still get the issue.  I have narrowed it down to something very specific, though.  I have a chart on a form, with no panes in it.  Programmatically, I add a pane and a series to the pane:

TChartPane* pane = AdvChartView1->Panes->Add();
TChartSerie* serie = pane->Series->Add();
serie->LegendText = "My series";

If I compile & run now, there's no problem; I can move my mouse all over the chart (which as nothing in it, of course).

Now, if I add one extra line of code to set the chart type for the series:

serie->ChartType = ctLine;

... that's still OK, I can move my mouse all over the chart.

If I change that line to read:

serie->ChartType = ctBar;

....Now, I get an AV as soon as my mouse enters anywhere in the chart area, and that AV pops up continuously until I manually kill the process.  This also happens with ctStackedBar... I have not tried any others.

So, it seems there's an issue with setting a TChartSerie's ChartType to certain values.  As long as you keep your mouse off the report, it all works fine (I see bars, etc).

I suspect that this is also tied in with the other issue I saw when I set the serie->AutoRange = arCommon.  In this case the chart crashed immediately, mouse or no mouse.

Cheers,
Kai

Thank you for your investigation we were able to reproduce the access violation here and have now fixed it.

The fix will be available in the next release.

Regards, 
Pieter

Terrific, thanks, Pieter!

Cheers,
Kai