View Issue Details

IDProjectCategoryView StatusLast Update
0003601JEDI VCL00 JVCL Componentspublic2006-09-29 06:41
ReportermarcgeldonAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.10 
Target VersionFixed in Version3.30 
Summary0003601: TJvCustomDBTreeView Bug (with bugfix, please add to CVS!)
DescriptionThere is a bug in the following function: "TJvCustomDBTreeView.ValidDataSet". If you open the TJvDBLookupTreeViewCombo and let it open while closing the parent / the window, you'll receive an EAccessViolation.

Here is a bug fix:

+++ OLD VERSION (CURRENT VERSION) +++
function TJvCustomDBTreeView.ValidDataSet: Boolean;
begin
  Result := FDataLink.Active and Assigned(FDataLink.DataSet) and FDataLink.DataSet.Active;
end;

+++ NEW VERSION (WITHOUT BUG) +++
function TJvCustomDBTreeView.ValidDataSet: Boolean;
begin
  Result := Assigned(FDataLink) and FDataLink.Active and Assigned(FDataLink.DataSet) and FDataLink.DataSet.Active;
end;


We have to check if the FDataLink still exists, before access it!
TagsNo tags attached.

Activities

marcgeldon

2006-04-05 06:58

reporter   ~0008991

Please, can someone change this in CVS? Bugfix can be found here in the bug description!

obones

2006-04-05 08:22

administrator   ~0009000

But FDataLink is only destroyed in the destructor. Does this mean ValidDataSet is called after a call to Destroy?
If so, I'd be very surprised, and would like to know the call stack leading to this.

obones

2006-06-08 07:27

administrator   ~0009474

Any remarks?

obones

2006-06-27 08:33

administrator   ~0009697

Marc, please provide a sample application, I really need to see this happening.

marcgeldon

2006-08-23 08:40

reporter   ~0010006

I think there is no demo application needed. This is just more a "Assigned"-check. Is that okay?

obones

2006-08-24 00:48

administrator   ~0010010

Well, sure, having the "Assigned" test will avoid this.
What I don't understand, and why I want to see it happening, is how it gets set to nil. Looking at the source, I can't see this happening, hence the question.

Issue History

Date Modified Username Field Change
2006-03-21 06:43 marcgeldon New Issue
2006-04-05 06:58 marcgeldon Note Added: 0008991
2006-04-05 08:22 obones Note Added: 0009000
2006-04-05 08:22 obones Status new => feedback
2006-06-08 07:27 obones Note Added: 0009474
2006-06-27 08:33 obones Note Added: 0009697
2006-08-23 08:40 marcgeldon Note Added: 0010006
2006-08-24 00:48 obones Note Added: 0010010
2006-09-29 06:41 obones Status feedback => resolved
2006-09-29 06:41 obones Fixed in Version => Daily / SVN
2006-09-29 06:41 obones Resolution open => fixed
2006-09-29 06:41 obones Assigned To => obones