View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001925 | JEDI VCL | 00 JVCL Components | public | 2004-07-04 10:49 | 2006-02-13 04:17 |
| Reporter | anonymous | Assigned To | obones | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | reopened | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0001925: Access violation in TJvInspector with DevExpress Grid | ||||
| Description | TJvInspector 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. | ||||
| Tags | No tags attached. | ||||
|
|
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. |
|
|
Wouldn't a call to Notify be possible to get notification of destructions ? |
|
|
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. |
|
|
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; |
|
|
Reminder sent to marcelb What should we do with this issue (1925) ? Close it, add a few words in the online help ? Cheers Olivier |
|
|
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). |
|
|
Text added to the help. |
|
|
lur |
| 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 |