View Issue Details

IDProjectCategoryView StatusLast Update
0003657JEDI VCL00 JVCL Componentspublic2006-04-24 13:51
ReporterKarlheinzAssigned ToAHUser 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSW2KOS Version
Product Version 
Target VersionFixed in Version3.30 
Summary0003657: Error in JvDBSearchcomboBox Revision 10423 and Mantis 3215
DescriptionPlease create a new form.
Place one TJvDBSearchComboBox at the form.
Switch to text view of the form.
You will get the error message in German "Element JvDBSearchComboBox1
hat kein übergeordnetes Fenster".
After that I get the error and when I try to close the files I get the
error and also "invalid pointer operation".
The file unit1 will not close. I must close Delphi with the TaskManager.

In English similar
"Element JvDBSearchComboBox1 does not have a superordinate window"

I found this with D7 and the actual SVN version.

The error comes with revision 10423 in file JvDBSearchcomboBox.

destructor TJvDBCustomSearchComboBox.Destroy;
begin
  ClearList; <== that introduced the failure
  FDataLink.Free;
  FDataLink := nil; // Notification() is called by inherited Destroy
  inherited Destroy;
end;

The reason for this line was
Mantis 3215: Added call to ClearList in destructor to avoid memory leak

See also the discussion in the newsgroup
TagsNo tags attached.

Activities

elahn

2006-04-23 04:12

developer   ~0009171

Now fixed in SVN.

In procedure ClearList:

if not (csDestroying in ComponentState) then //line added
  Items.Clear;

Karlheinz

2006-04-23 10:02

reporter   ~0009172

Problem is not solved for me.
If I have a form with only one JvDBSearchcomboBox on it. I don't get the error.
In my application I have several forms with many components but only one JvDBSearchComboBox I get the same error.
Only if I comment out the line ClearList the problem is solved.

destructor TJvDBCustomSearchComboBox.Destroy;
begin
// ClearList;
  FDataLink.Free;
  FDataLink := nil; // Notification() is called by inherited Destroy
  inherited Destroy;
end;

Any ideas?

AHUser

2006-04-24 11:05

developer   ~0009177

elahn's solution only works as long as you do not assign a DataSource. But if you do so, the "for 0 to Items.Count - 1" tries to recreate the handle.

I have commited a version that introduces a new FBookmarks: TList field, that allows to destroy the bookmarks without accessing "Items".

Karlheinz

2006-04-24 13:27

reporter   ~0009179

Hello Andreas,

That is the result with the new version during creation of the form outside of delphi as single application.
Inside the IDE the problem is solved.

--------------------------------2006/4/24 21:26:51--------------------------------
FastMM has detected an error during a FreeMem operation. An attempt has been made to free/reallocate an unallocated block.

The block size is: 56

Stack trace of when this block was allocated (return addresses):
402EFC [system.pas][System][@GetMem][2439]
500E51 [DB.pas][DB][TDataSet.GetBookmark][10502]
6BDC1B [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvDBCustomSearchComboBox.ReadList][348]
6BD81E [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvSearchComboBoxLink.SetDataField][197]
6BD85D [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvSearchComboBoxLink.ActiveChanged][214]
4F973C [DB.pas][DB][TDataLink.SetActive][7228]
4F9796 [DB.pas][DB][TDataLink.UpdateState][7243]
4F9961 [DB.pas][DB][TDataLink.DataEvent][7304]
4FFA2C [DB.pas][DB][TDataSet.GetNextRecord][9834]

The allocation number was: 224335

Stack trace of when the block was previously freed (return addresses):
402F27 [system.pas][System][@FreeMem][2466]
500E90 [DB.pas][DB][TDataSet.FreeBookmark][10510]
6BDD53 [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvDBCustomSearchComboBox.ClearList][369]
6BD8C0 [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvSearchComboBoxLink.DataSetChanged][231]
4F9A53 [DB.pas][DB][TDataLink.DataEvent][7322]
4FA260 [DB.pas][DB][TDataSource.NotifyLinkTypes][7594]
4FA28F [DB.pas][DB][TDataSource.NotifyDataLinks][7600]
4FA2DB [DB.pas][DB][TDataSource.DataEvent][7609]
4FF2D4 [DB.pas][DB][TDataSet.DataEvent][9619]

The current stack trace leading to this error (return addresses):
402F27 [system.pas][System][@FreeMem][2466]
500E90 [DB.pas][DB][TDataSet.FreeBookmark][10510]
6BDD53 [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvDBCustomSearchComboBox.ClearList][369]
6BD8C0 [JvDBSearchComboBox.pas][JvDBSearchComboBox][TJvSearchComboBoxLink.DataSetChanged][231]
4F9A53 [DB.pas][DB][TDataLink.DataEvent][7322]
4FA260 [DB.pas][DB][TDataSource.NotifyLinkTypes][7594]
4FA28F [DB.pas][DB][TDataSource.NotifyDataLinks][7600]
4FA2DB [DB.pas][DB][TDataSource.DataEvent][7609]
4FF2D4 [DB.pas][DB][TDataSet.DataEvent][9619]

Current memory dump of 256 bytes starting at pointer address 512A098:
80 9C 93 00 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 CF 5F ED FA 80 80 80 80
00 00 00 00 31 A0 12 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6A 6C 03 00 FC 2E 40 00
51 0E 50 00 B3 04 50 00 1B DC 6B 00 1E D8 6B 00 5D D8 6B 00 3C 97 4F 00 96 97 4F 00 61 99 4F 00
27 2F 40 00 90 0E 50 00 53 DD 6B 00 C0 D8 6B 00 53 9A 4F 00 60 A2 4F 00 8F A2 4F 00 DB A2 4F 00
D4 F2 4F 00 38 00 00 00 01 30 2E 36 E0 A0 12 05 80 9C 93 00 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 1F 5F ED FA 80 80 80 80 00 00 00 00 E1 A0 12 05 00 00 00 00 00 00 00 00
€ œ “ . € € € € € € € € € € € € € € € € € € € € € € € € € € € €
€ € € € € € € € € € € € € € € € € € € € € € € € Ï _ í ú € € € €
. . . . 1   . . . . . . . . . . . . . . . . . . j l . . ü . @ .
Q . P . ³ . P . . Ü k . . Ø k . ] Ø k . < — O . – — O . a ™ O .
' / @ .  . P . S Ý k . À Ø k . S š O . ` ¢ O .  ¢ O . Û ¢ O .
Ô ò O . 8 . . . . 0 . 6 à   . . € œ “ . € € € € € € € € € € € €
€ € € € € € € € € € € € € € € € € € € € € € € € € € € € € € € €
€ € € € € € € € . _ í ú € € € € . . . . á   . . . . . . . . . .

AHUser

2006-04-24 13:51

developer   ~0009180

Sorry. I forgot the FBookmarks.Clear in .ClearList. This is now fixed.

Issue History

Date Modified Username Field Change
2006-04-23 01:41 Karlheinz New Issue
2006-04-23 04:12 elahn Status new => resolved
2006-04-23 04:12 elahn Resolution open => fixed
2006-04-23 04:12 elahn Assigned To => elahn
2006-04-23 04:12 elahn Note Added: 0009171
2006-04-23 10:02 Karlheinz Status resolved => feedback
2006-04-23 10:02 Karlheinz Resolution fixed => reopened
2006-04-23 10:02 Karlheinz Note Added: 0009172
2006-04-24 11:05 AHUser Status feedback => resolved
2006-04-24 11:05 AHUser Resolution reopened => fixed
2006-04-24 11:05 AHUser Note Added: 0009177
2006-04-24 13:27 Karlheinz Assigned To elahn => AHUser
2006-04-24 13:27 Karlheinz Status resolved => feedback
2006-04-24 13:27 Karlheinz Resolution fixed => reopened
2006-04-24 13:27 Karlheinz Note Added: 0009179
2006-04-24 13:51 AHUser Status feedback => resolved
2006-04-24 13:51 AHUser Resolution reopened => fixed
2006-04-24 13:51 AHUser Note Added: 0009180