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
0003879 [JEDI VCL] 00 JVCL Components crash always 2006-08-30 05:00 2006-08-30 07:23
Reporter ivobauer View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0003879: TJvTabBar is broken in the latest SVN snapshot
Description If you have a TJvTabBar on the form and it contains at least one tab, you will experience a crash (access violation) as soon as you try to close/destroy the form. I've tested this with daily SVN JCL/JVCL build (both are dated 2006-08-29).
Additional Information I have debugged this problem and came to the following conclusion:

1. When TJvTabBar is being destroyed, it tries to free the internal tab item collection it holds by calling "FreeAndNil(FTabs);" in the TJvTabBar.Destroy method.

2. This in turn causes a series of method calls to occur, namely invoking the destructor of FTabs collection which in turn tries to remove the items one by one.

3. The next method called in this chain is TJvTabBarItems.Notification which contains the following code snippet:

    if TabBar.LeftTab = Item then
      TabBar.LeftTab := TabBar.LeftTab.GetPreviousVisible;

The problem occurs while accessing the LeftTab property of TabBar because the getter method GetLeftTab tries to access the FTabs.Count property but since the TJvTabBar destructor uses FreeAndNil to free the tabs collection, the private field FTabs is already NILLED at this time, this is why the AV occurs.

Proposed fix: Replace this line in TJvTabBar.Destroy method:

  FreeAndNil(FTabs);

by this one:

  FTabs.Free; //FreeAndNil(FTabs);

I've recompiled the JVCL installation on my machine and the problem no longer occurs. So I'd say this fix works just fine for me.
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0010035)
obones (administrator)
2006-08-30 07:23

This is now fixed in SVN

- Issue History
Date Modified Username Field Change
2006-08-30 05:00 ivobauer New Issue
2006-08-30 05:01 ivobauer Issue Monitored: ivobauer
2006-08-30 07:23 obones Status new => resolved
2006-08-30 07:23 obones Fixed in Version => Daily / SVN
2006-08-30 07:23 obones Resolution open => fixed
2006-08-30 07:23 obones Assigned To => obones
2006-08-30 07:23 obones Note Added: 0010035


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