Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004716 [JEDI VCL] 00 JVCL Components crash always 2009-03-24 10:28 2009-04-29 14:38
Reporter kdk View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.36
Summary 0004716: Crash in TJvDockTree.DoLoadZone (Docking)
Description LastZone is nil on the line 3561 in JvDockTree.pas:

procedure TJvDockTree.DoLoadZone(Stream: TStream);
var
  Level, LastLevel, I: Integer;
  Zone, LastZone, NextZone: TJvDockZone;
begin
  LastLevel := 0;
  LastZone := nil;
  while True do
  begin
    with Stream do
    begin
      if Read(Level, SizeOf(Level)) <> SizeOf(Level) then
        Break;
      if Level = TreeStreamEndFlag then
        Break;
      Zone := FDockZoneClass.Create(Self);
      CustomLoadZone(Stream, Zone);
      if Zone = nil then
        Continue;
    end;
    if Level = 0 then
      FTopZone := Zone
    else
    if Level = LastLevel then
    begin
      LastZone.NextSibling := Zone;
      Zone.FPrevSibling := LastZone;
      Zone.FParentZone := LastZone.FParentZone;
    end
    else
    if Level > LastLevel then
    begin
      LastZone.ChildZones := Zone; <<<<<<<<<<<<<<<<<<<<<<<< here is LastZone nil
      Zone.FParentZone := LastZone;
    end
    else
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0015342)
obones (administrator)
2009-03-24 11:44

Under which conditions?
Please provide the zipped sources of a sample application showing this.
(0015344)
kdk (reporter)
2009-03-24 11:59

Hello,

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

Tim
(0015345)
obones (administrator)
2009-03-24 12:13

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.
(0015347)
AHUser (developer)
2009-03-24 22:31

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.
http://jvcl.svn.sourceforge.net/viewvc/jvcl/trunk/jvcl/run/JvDockTree.pas?view=markup [^]
(0015467)
obones (administrator)
2009-04-29 14:38

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker