View Issue Details

IDProjectCategoryView StatusLast Update
0005261JEDI VCL00 JVCL Componentspublic2011-09-21 14:10
ReporterkorecekAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.45 
Summary0005261: Latest JVCL SVN, TJvFormStorage and AV
DescriptionHi,
after long time under released JCL & JVCLI decided to switch
into latest SVN of both (JCL & JVCL).

I decided to start with BCB6 (C++ Builder V6) under Win XP.

Installation of the new SVN with new package names was without
problems but I found problem with AV (Access violation) after
compilation of an old project. This AV was never generated with
older JEDI release (see above).

I decided to little investigate and I found following problem:

- AV is generated when the TJvFormStorage component is activated
  and during closing of form where the TJvFormStorage is placed.

I add my old example Example and also some videos which could show little more.
Additional Information  First I thought that it have connection with linker setting - in
  "Project/Options" here - "Use dynamic RTL" under "Linker"
  Tab is Checked but....
  ...I also installed latest JCL & JVCL SVN
  on another PC with BCB6 and to be fair I must
  say that:
  1. My supposition regarding "Project/Options"
   and "Use dynamic RTL" under "Linker" Tab
   is not in all probability true because
   AV behaviour on second PC is different.
   AV is generated any time.
  2. It seems to me that AV is related to the
   Borlad C++ Builder 6 because BDS2006 don't
   generate AV (BDS2006 is AV less).
  3. Older JVCL release with old package names
   don't generate AV.
TagsNo tags attached.

Relationships

related to 0005249 resolvedobones JvPropertyStorage bug on CBuilder 6 

Activities

2010-06-08 18:13

 

AppStorageFIni2.7z (4,117 bytes)

2010-06-08 18:13

 

AppIniFStorageVideo.7z (592,009 bytes)

vez

2010-06-09 09:44

reporter   ~0017480

Will see my issue 005246

vez

2010-06-09 09:45

reporter   ~0017481

Sorry, 5249

SurFan

2010-07-31 19:21

reporter   ~0017543

Assigning PropertyName to a tep storage seems to cure this problem too (at least in delphi6):
procedure TJvPropertyStorage.WriteProperty(const APath, AStorageName: string; const PersObj: TPersistent; const PropName: {$IFDEF RTL200_UP}ShortString{$ELSE}string{$ENDIF RTL200_UP});
var
  sTempPropName: string;
begin
  sTempPropName := string(PropName);
  if Assigned(AppStorage) then
    if (PropType(PersObj, sTempPropName) = tkClass) and (GetObjectProp(PersObj, sTempPropName) is TComponent) then
      AppStorage.WriteString(AppStorage.ConcatPaths([APath, AppStorage.TranslatePropertyName(PersObj, AStorageName, False)]), TComponent(GetObjectProp(PersObj, sTempPropName)).Name)
    else
      AppStorage.WriteProperty(AppStorage.ConcatPaths([APath, AppStorage.TranslatePropertyName(PersObj, AStorageName, False)]), PersObj, sTempPropName, True);
end;

fegyvej

2010-10-17 11:41

reporter   ~0017914

Just run into the same problem because of upgrade also.

I think the problem is caused by the string() typecast of PropName which is declared as ShortString in the header.

Delphi help:
A ShortString is 0 to 255 characters long. While the length of a ShortString can change dynamically, its memory is a statically allocated 256 bytes;

By typecasting it to string, probably delphi starts to handle it dynamically and frees and reallocates its memory as needed and on next call fastmm reported to me that the variable is already freed.

fegyvej

2010-10-17 11:42

reporter   ~0017915

I removed the string() typecasts and the memory problems are gone.

korecek

2010-12-08 14:52

reporter   ~0018240

I just tested SurFan's suggestion under BCB6, BDS2006 and RAD Studio 2010.
Installation and tested program without problems in all above mentioned versions.
Please could you implement it (even) temporarily before final solution will be done?

obones

2011-06-08 12:25

administrator   ~0018658

A fix has been put in SVN

Issue History

Date Modified Username Field Change
2010-06-08 18:13 korecek New Issue
2010-06-08 18:13 korecek File Added: AppStorageFIni2.7z
2010-06-08 18:13 korecek File Added: AppIniFStorageVideo.7z
2010-06-09 09:44 vez Note Added: 0017480
2010-06-09 09:45 vez Note Added: 0017481
2010-06-09 10:06 obones Relationship added related to 0005249
2010-06-09 10:06 obones Assigned To => obones
2010-06-09 10:07 obones Status new => assigned
2010-07-31 19:21 SurFan Note Added: 0017543
2010-10-17 11:41 fegyvej Note Added: 0017914
2010-10-17 11:42 fegyvej Note Added: 0017915
2010-12-08 14:52 korecek Note Added: 0018240
2011-06-08 12:25 obones Note Added: 0018658
2011-06-08 12:25 obones Status assigned => resolved
2011-06-08 12:25 obones Fixed in Version => Daily / SVN
2011-06-08 12:25 obones Resolution open => fixed
2011-09-21 14:10 obones Fixed in Version Daily / SVN => 3.45