View Issue Details

IDProjectCategoryView StatusLast Update
0006193JEDI VCL00 JVCL Componentspublic2015-09-14 13:20
ReporterleodineiAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.47 
Target VersionFixed in Version3.48 
Summary0006193: Access violation calling TJvCustomCsvDataSet.Destroy
DescriptionWhen
  TJvCustomCsvDataSet.UseSystemDecimalSeparator = True

Currently method
procedure TJvCustomCsvDataSet.SetActive(Value: Boolean);
begin
  inherited;
  FFileDirty := False;
  if FUseSystemDecimalSeparator then
    FData.DecimalSeparator := SysUtils.DecimalSeparator;
end;

Error when the DataSet has been closed because FData points to invalid location

Workaround
Don't use UseSystemDecimalSeparator = True
Additional InformationThis code works
procedure TJvCustomCsvDataSet.SetActive(Value: Boolean);
begin
  inherited;
  FFileDirty := False;
  if FUseSystemDecimalSeparator and Value then
    FData.DecimalSeparator := SysUtils.DecimalSeparator;
end;
TagsNo tags attached.

Activities

Arioch

2013-08-31 02:59

developer   ~0020603

Last edited: 2013-08-31 14:16

I guess proper fix would be to move that lines (unmodified) into .InternalOpen, i made a pull request.

The question is whether those lines should be in the end of .IO method (like it works now), or in its beginning (potentially affecting behaviour of file loading and headers parsing).

I think the "beginning" is generally better, but as i don't use CSV and cannot test, i want to stick as close as it would be to the current behaviour.

Arioch

2013-08-31 03:01

developer   ~0020604

Another way to fix would be

procedure TJvCustomCsvDataSet.SetActive(Value: Boolean);
 begin
   if FUseSystemDecimalSeparator then
     FData.DecimalSeparator := SysUtils.DecimalSeparator;
   inherited;
   FFileDirty := False;
 end;

However i think .SetActive should have as little behaviour as possible, idealyl should not be overriden at all...

2013-08-31 03:27

 

jvcl6193.dpr (655 bytes)

Issue History

Date Modified Username Field Change
2013-08-27 15:53 leodinei New Issue
2013-08-31 02:59 Arioch Note Added: 0020603
2013-08-31 03:01 Arioch Note Added: 0020604
2013-08-31 03:27 Arioch Note Edited: 0020603
2013-08-31 03:27 Arioch File Added: jvcl6193.dpr
2013-08-31 03:28 Arioch Status new => confirmed
2013-08-31 14:16 Arioch Note Edited: 0020603
2013-09-02 10:03 obones Status confirmed => resolved
2013-09-02 10:03 obones Resolution open => fixed
2013-09-02 10:03 obones Assigned To => obones
2013-09-02 10:03 obones Fixed in Version => Daily / SVN
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48