![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | TCustomGauge: Access violation when streaming | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | LNS <linus.hogrebe> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | sandra |
| Priority: | --- | ||
| Version: | 150420 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | RAD XE5 |
| Attachments: |
Example Project
Example Project (corrected) |
||
|
Description
LNS
2015-09-07 11:05:20 EDT
Created attachment 494 [details]
Example Project
*** Bug 1292 has been marked as a duplicate of this bug. *** Hello Lns, In the example project you attached here, there isn't any Knob Gauge. Moreover, using the code below the problem doesn’t occur for us with latest TeeChart Pro VCL/FMX 2015 published procedure TForm1.FormCreate(Sender: TObject); begin Series1.Clear; Series1.FillSampleValues(20); end; procedure TForm1.Chart1AfterDraw(Sender: TObject); begin Self.Text := FloatToStr(Series1.MandatoryValueList[0]); end; Could you please change the code above, because we can reproduce the problem you are experiencing? Created attachment 502 [details]
Example Project (corrected)
Hi Sandra,
I apologize for the mess with the corrupted example project and the duplicate issue (1292 & 1293). I had some problems filing the bug and this seems to have lead to the duplicate entries.
I attached a corrected version of the test case that should now include a simple but complete delphi project.
The problem occurs when trying to save a chart (including a TCustomGauge series) after having cleared its values. The problem originates from the GetValue method where no check is being performed on the list count.
We solved this using a workaround for our TCustomGauge descendant by reintroducing GetValue and using the code from TGaugeSeries.GetValue (that adds "if Count=0 then Add(0)"). So my proposal would be to include that in the original TCustomGauge.GetValue. Or - from my POV even better - change it e.g. to:
function TCustomGauge.GetValue:TChartValue;
begin
if MandatoryValueList.Count = 0 then
result := 0
else
result:=MandatoryValueList[0];
end;
Kind regards,
Linus
|