View Issue Details

IDProjectCategoryView StatusLast Update
0001925JEDI VCL00 JVCL Componentspublic2006-02-13 04:17
ReporteranonymousAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionreopened 
Product Version 
Target VersionFixed in Version 
Summary0001925: Access violation in TJvInspector with DevExpress Grid
DescriptionTJvInspector causes an access violation when the app is closed and it is linked to a Developer Express TdxDBGrid.

To reproduce:

1) Load the InspectorSimpleExample Demo
2) Drop a Developer Express TdxDBGrid on the form
3) Add the DevExpress Grid to the Inspector with JvInspector1.AddComponent(dxDBGrid1, 'DBGrid', True); in the FormShow event.
4) Compile and run the application
5) Close the application and you get an AV.
TagsNo tags attached.

Activities

marcelb

2004-07-23 05:42

manager   ~0004818

Possibly caused because the grid is removed before the inspector is cleared. You could try to insert a JvInspector1.Clear call in the form's OnClose event, which should fire before any of the components are destroyed.

obones

2004-07-23 06:25

administrator   ~0004820

Wouldn't a call to Notify be possible to get notification of destructions ?

marcelb

2004-07-23 06:32

manager   ~0004822

In this case yes, but the same problem would occur if you were inspecting a TPersistent object.

However, I think a call to FreeNotification could work when a property of a TComponent descendant is being inspected (which is probably the case 99.9% of the time). That would need to be handled for every TJvInspectorPropData instance that is created, so expect a large number of FreeNotification calls on a TComponent with many properties being inspected.

Still, I reiterate the need to clear the inspector before any inspected TPersistent objects are destroyed.

deanh

2004-07-27 13:34

reporter   ~0004840

Clear in the forms FormDestroy event fixes the problem.

Without the clear:

I get an AV on line 2564.

procedure TJvInspDataReg.Clear;
var
  I: Integer;
begin
  FClearing := True;
  try
    for I := High(FInstanceList) downto Low(FInstanceList) do
      Items[I].Free; // AV Here
  finally
    FClearing := False;
  end;
end;

obones

2004-11-19 00:56

administrator   ~0005659

Reminder sent to marcelb

What should we do with this issue (1925) ?
Close it, add a few words in the online help ?

Cheers

Olivier

marcelb

2004-11-19 01:04

manager   ~0005665

Yes, close the bug, add a note to TJvInspector help that the inspector item list should be cleared before inspected objects are freed. The FreeNotification would be overkill (since it would require it for every property of the inspected class and I know DevExpress has a lot of them).

obones

2005-04-12 08:47

administrator   ~0006971

Text added to the help.

anonymous

2006-02-10 06:44

viewer   ~0008538

lur

Issue History

Date Modified Username Field Change
2004-07-04 10:49 anonymous New Issue
2004-07-23 05:42 marcelb Note Added: 0004818
2004-07-23 05:42 marcelb Status new => feedback
2004-07-23 06:25 obones Note Added: 0004820
2004-07-23 06:32 marcelb Note Added: 0004822
2004-07-27 13:34 deanh Note Added: 0004840
2004-11-19 00:56 obones Note Added: 0005659
2004-11-19 01:04 marcelb Note Added: 0005665
2005-04-12 08:47 obones Status feedback => resolved
2005-04-12 08:47 obones Resolution open => fixed
2005-04-12 08:47 obones Assigned To => obones
2005-04-12 08:47 obones Note Added: 0006971
2006-02-10 06:44 anonymous Status resolved => feedback
2006-02-10 06:44 anonymous Resolution fixed => reopened
2006-02-10 06:44 anonymous Note Added: 0008538
2006-02-13 04:17 obones Status feedback => closed