Steema Issues Database

Note: 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.



Bug 1202

Summary: TColorGridSeries causes Access Violation when filled with a DataSet
Product: VCL TeeChart Reporter: Nelson Henrique Corrêa Nepomuceno <nelson>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: critical CC: david, nelson
Priority: High    
Version: 150120   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version: RAD XE, RAD XE7
Attachments: Bugreport generated by madExcept and source code of a simple test application

Description Nelson Henrique Corrêa Nepomuceno 2015-05-05 00:39:30 EDT
Created attachment 438 [details]
Bugreport generated by madExcept and source code of a simple test application

Access violation occurs when I fill a TColorGridSeries using a DataSet.

The trouble started after I update TeeChart 2010 to TeeChart 2015 in Delphi XE1 Pro.
I made an application to simplify error case, removing all irrelevant elements. DataSet are involved in problem. I tested and problem occurs using TSimpleDataSet, TSQLQuery and TClientDataSet. I suppose problem occurs with any DataSet.

Problem occurs at method DrawGrid in unit TeeSurfa.

I attached a test application and the bugreport generated by madExcept.

Thanks in advance

Best regards.
Comment 1 Nelson Henrique Corrêa Nepomuceno 2015-05-07 13:50:38 EDT
I tested and problem occurs in Delphi XE7 Enterprise too. You can test using the same attached test application source code.
Comment 2 david berneda 2015-05-11 04:19:18 EDT
Confirmed. 

The problem happens when the colorgrid pen is visible, because the grid values aren't totally complete. There are grid cells missing.

Disabling it is a workaround until the bug is fixed:

lsOc.Pen.Hide;
Comment 3 david berneda 2015-05-11 05:25:21 EDT
Fixed. The fix is at TeeSurfa.pas unit, DrawGrid procedure, there are two places:

      if tmpGrid<0 then
      begin
        if Length(GridIndex[tmpIndex])>tmpIndex then // <----- This line
           tmpGrid:=GridIndex[tmpIndex,tmpIndex];

        if tmpGrid<0 then
           tmpGrid:=0;
      end;