View Issue Details

IDProjectCategoryView StatusLast Update
0004716JEDI VCL00 JVCL Componentspublic2009-04-29 14:38
ReporterkdkAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.36 
Target VersionFixed in Version3.37 
Summary0004716: Crash in TJvDockTree.DoLoadZone (Docking)
DescriptionLastZone is nil on the line 3561 in JvDockTree.pas:

procedure TJvDockTree.DoLoadZone(Stream: TStream);
  Level, LastLevel, I: Integer;
  Zone, LastZone, NextZone: TJvDockZone;
  LastLevel := 0;
  LastZone := nil;
  while True do
    with Stream do
      if Read(Level, SizeOf(Level)) <> SizeOf(Level) then
      if Level = TreeStreamEndFlag then
      Zone := FDockZoneClass.Create(Self);
      CustomLoadZone(Stream, Zone);
      if Zone = nil then
    if Level = 0 then
      FTopZone := Zone
    if Level = LastLevel then
      LastZone.NextSibling := Zone;
      Zone.FPrevSibling := LastZone;
      Zone.FParentZone := LastZone.FParentZone;
    if Level > LastLevel then
      LastZone.ChildZones := Zone; <<<<<<<<<<<<<<<<<<<<<<<< here is LastZone nil
      Zone.FParentZone := LastZone;
TagsNo tags attached.



2009-03-24 11:44

administrator   ~0015342

Under which conditions?
Please provide the zipped sources of a sample application showing this.


2009-03-24 11:59

reporter   ~0015344


the app is not quite small. Is there anything you can do without the full application source code?



2009-03-24 12:13

administrator   ~0015345

No we can't, especially since we found out that many errors seen in large applications are not reproducible in small ones, because they are caused by code that is not ours but the user's.
Please try to reproduce in a small application and we'll look into it then.


2009-03-24 22:31

developer   ~0015347

I have committed code (rev. 12259) that should a fix this bug. But because I can't reproduce it, I'm not able to guarantee that the fix works for your case.

My guess is that the stream contains malformed data and the first "Read(Level, SizeOf(Level))" doesn't read "0" into Level but a different value. With my fix this is now catched.


2009-04-29 14:38

administrator   ~0015467

Assuming this is fixed.

Issue History

Date Modified Username Field Change
2009-03-24 10:28 kdk New Issue
2009-03-24 11:44 obones Note Added: 0015342
2009-03-24 11:44 obones Status new => feedback
2009-03-24 11:59 kdk Note Added: 0015344
2009-03-24 12:13 obones Note Added: 0015345
2009-03-24 22:31 AHUser Note Added: 0015347
2009-04-29 14:38 obones Note Added: 0015467
2009-04-29 14:38 obones Status feedback => resolved
2009-04-29 14:38 obones Fixed in Version => Daily / SVN
2009-04-29 14:38 obones Resolution open => fixed
2009-04-29 14:38 obones Assigned To => obones