Post Reply  Post Thread 
Cant find leak
Author Message
fred
Junior Member
**


Posts: 1
Group: Registered
Joined: Aug 2008
Status: Offline
Reputation: 0
Post: #1
Cant find leak

Hi -
Thanks for this software - I think it will prove very popular!
I dont know enough about XP to investigate the problem I have
- however this is a short explanation:

Im using Delphi7 and XP prof.

Im loading a panel on my app. with objects from disk (child panels, labels etc) and I get a continuous leak when the program runs. I'm swapping the contents of the panel from disk quite often using readcomponent from a Tfilestream. Before I load the panel I clear it as follows:

for x:=(panel1.ControlCount-1) downto 0 do
panel1.controls[x].free;

I then start Denomo, (leak begin) switch panels a few times and finish on the same one then (leak end) I dont really understand the output below.

EF0A0E13 GDI object -- Font
Allocator function: CreateFontIndirectA
(I presume this is one of the causes of the leak)

Totally output 9 blocks 3 handles in 0 seconds.
Eliminated derived object's fields leak of 33 blocks.
Eliminated leaks on same calling path of 10 blocks.
The most places blocks on same calling path occurs in:
Same count: 3

Can you explain them please? Thanks.

Filters: MemTyps: [Memory blocks], [Objects], [String], [Dynamic array], [GDI objects] Session ID: 0
Begin incremental session leak dectection at group 1
Filters: MemTyps: [Memory blocks], [Objects], [String], [Dynamic array], [GDI objects] Session ID: 1
00FA7F98 BlockSize: 16 String: Ref: 1 Len: 6 "clone2"
ST: 0042FB8C [Classes] [TReader.ReadRootComponent] [6539]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
ST: 00496FE4 [ThdTimer] [TThreadedTimer.DoTimer] [121]
ST: 00430F40 [Classes] [CheckSynchronize] [9339]
ST: 0048118C [Forms] [TApplication.WndProc] [6671]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []

01A42980 BlockSize: 12 String: Ref: 1 Len: 3 "t39"
ST: 0042EBD4 [Classes] [TReader.ReadComponent] [6137]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]
ST: 0042EE04 [Classes] [TReader.ReadData] [6190]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]
ST: 0045DA1D [Controls] [TWinControl.ReadState] [5475]
ST: 0042FCC6 [Classes] [TReader.ReadRootComponent] [6567]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]

01A42A18 BlockSize: 400 Class: TLabel
ST: 0042EC15 [Classes] [TReader.ReadComponent] [6144]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]
ST: 0042EE04 [Classes] [TReader.ReadData] [6190]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]
ST: 0045DA1D [Controls] [TWinControl.ReadState] [5475]
ST: 0042FCC6 [Classes] [TReader.ReadRootComponent] [6567]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]

01A5EF1C BlockSize: 13 GETMEM
ST: 0040A49E [SysUtils] [StrNew] [6410]
ST: 0045BFD8 [Controls] [TControl.DefaultHandler] [4663]
ST: 0045BF42 [Controls] [TControl.WndProc] [4646]
ST: 0045BC4D [Controls] [TControl.Perform] [4553]
ST: 0045A413 [Controls] [TControl.SetTextBuf] [3795]
ST: 0045A4B1 [Controls] [TControl.SetText] [3809]
ST: 00426EE4 [TypInfo] [SetLongStrProp] [1592]
ST: 0042F906 [Classes] [TReader.ReadPropValue] [6469]
ST: 0042F4EE [Classes] [TReader.ReadProperty] [6385]
ST: 0042EE52 [Classes] [TReader.ReadDataInner] [6202]

01A6D658 BlockSize: 60 GETMEM
ST: 0043487E [Graphics] [TResourceManager.ChangeResource] [1199]
ST: 0043549A [Graphics] [TFont.SetData] [1522]
ST: 00435838 [Graphics] [TFont.SetStyle] [1645]
ST: 00426DF0 [TypInfo] [SetOrdProp] [1253]
ST: 0042F4EE [Classes] [TReader.ReadProperty] [6385]
ST: 0042EE52 [Classes] [TReader.ReadDataInner] [6202]
ST: 0042EE34 [Classes] [TReader.ReadData] [6196]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]
ST: 0042ECA8 [Classes] [TReader.ReadComponent] [6157]

01A6EB68 BlockSize: 16 Class: TList
ST: 0045E69E [Controls] [TWinControl.Insert] [5818]
ST: 0045E741 [Controls] [TWinControl.InsertControl] [5838]
ST: 0045A266 [Controls] [TControl.SetParent] [3723]
ST: 004591B4 [Controls] [TControl.SetParentComponent] [3274]
ST: 0042EA6C [Classes] [SetCompName] [6112]
ST: 0042EC5B [Classes] [TReader.ReadComponent] [6150]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]
ST: 0042EE04 [Classes] [TReader.ReadData] [6190]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]

01A6EBB4 BlockSize: 16 GETMEM
ST: 0042A59D [Classes] [TList.Grow] [2842]
ST: 0042A32C [Classes] [TList.Add] [2755]
ST: 004584C2 [Controls] [ListAdd] [2909]
ST: 0045E69E [Controls] [TWinControl.Insert] [5818]
ST: 0045E741 [Controls] [TWinControl.InsertControl] [5838]
ST: 0045A266 [Controls] [TControl.SetParent] [3723]
ST: 004591B4 [Controls] [TControl.SetParentComponent] [3274]
ST: 0042EA6C [Classes] [SetCompName] [6112]
ST: 0042EC5B [Classes] [TReader.ReadComponent] [6150]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]

01A73150 BlockSize: 552 Class: TPanel
ST: 0042FB7E [Classes] [TReader.ReadRootComponent] [6538]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
ST: 00496FE4 [ThdTimer] [TThreadedTimer.DoTimer] [121]
ST: 00430F40 [Classes] [CheckSynchronize] [9339]
ST: 0048118C [Forms] [TApplication.WndProc] [6671]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []

01A738DC BlockSize: 32 GETMEM
ST: 0043487E [Graphics] [TResourceManager.ChangeResource] [1199]
ST: 00435DDA [Graphics] [TBrush.SetData] [1875]
ST: 00435E7E [Graphics] [TBrush.SetColor] [1908]
ST: 00461D07 [Controls] [TWinControl.CMColorChanged] [7328]
ST: 0045BF42 [Controls] [TControl.WndProc] [4646]
ST: 0045FB13 [Controls] [TWinControl.WndProc] [6343]
ST: 0045BC4D [Controls] [TControl.Perform] [4553]
ST: 0045A714 [Controls] [TControl.SetColor] [3901]
ST: 00426DF0 [TypInfo] [SetOrdProp] [1253]
ST: 0042F4EE [Classes] [TReader.ReadProperty] [6385]

EF0A0E13 GDI object -- Font
Allocator function: CreateFontIndirectA
ST: 00435637 [Graphics] [TFont.GetHandle] [1576]
ST: 00436BF6 [Graphics] [TCanvas.CreateFont] [2500]
ST: 00436B68 [Graphics] [TCanvas.RequiredState] [2482]
ST: 004369F3 [Graphics] [TCanvas.GetHandle] [2430]
ST: 0044D300 [StdCtrls] [TCustomLabel.DoDrawText] [1469]
ST: 0044D4EF [StdCtrls] [TCustomLabel.AdjustBounds] [1525]
ST: 0044D474 [StdCtrls] [TCustomLabel.Loaded] [1508]
ST: 0042FD03 [Classes] [TReader.ReadRootComponent] [6569]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
ST: 00496FE4 [ThdTimer] [TThreadedTimer.DoTimer] [121]
ST: 00430F40 [Classes] [CheckSynchronize] [9339]
ST: 0048118C [Forms] [TApplication.WndProc] [6671]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []
ST: 7E4189CD [] [Unknown function at GetWindowLongW] []
ST: 7E4196C7 [] [DispatchMessageA] []
ST: 0048183D [Forms] [TApplication.ProcessMessage] [6873]
ST: 00481884 [Forms] [TApplication.HandleMessage] [6892]
ST: 00481B1F [Forms] [TApplication.Run] [6976]
ST: 004D8610 [sentinel2] [initialization] []
ST: 7C816FD7 [] [Unknown function at RegisterWaitForInputIdle] []
9E0A101F GDI object -- Font
Allocator function: CreateFontIndirectA
ST: 00435637 [Graphics] [TFont.GetHandle] [1576]
ST: 00436BF6 [Graphics] [TCanvas.CreateFont] [2500]
ST: 00436B68 [Graphics] [TCanvas.RequiredState] [2482]
ST: 004369F3 [Graphics] [TCanvas.GetHandle] [2430]
ST: 0044D300 [StdCtrls] [TCustomLabel.DoDrawText] [1469]
ST: 0044D4EF [StdCtrls] [TCustomLabel.AdjustBounds] [1525]
ST: 0044D474 [StdCtrls] [TCustomLabel.Loaded] [1508]
ST: 0042FD03 [Classes] [TReader.ReadRootComponent] [6569]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
ST: 00496FE4 [ThdTimer] [TThreadedTimer.DoTimer] [121]
ST: 00430F40 [Classes] [CheckSynchronize] [9339]
ST: 0048118C [Forms] [TApplication.WndProc] [6671]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []
ST: 7E4189CD [] [Unknown function at GetWindowLongW] []
ST: 7E4196C7 [] [DispatchMessageA] []
ST: 0048183D [Forms] [TApplication.ProcessMessage] [6873]
ST: 00481884 [Forms] [TApplication.HandleMessage] [6892]
ST: 00481B1F [Forms] [TApplication.Run] [6976]
ST: 004D8610 [sentinel2] [initialization] []
ST: 7C816FD7 [] [Unknown function at RegisterWaitForInputIdle] []
961006FC GDI object -- Brush
Allocator function: CreateBrushIndirect
ST: 00435F43 [Graphics] [TBrush.GetHandle] [1942]
ST: 0046072E [Controls] [TWinControl.WMEraseBkgnd] [6646]
ST: 0045BF42 [Controls] [TControl.WndProc] [4646]
ST: 0045FB13 [Controls] [TWinControl.WndProc] [6343]
ST: 0045F6E3 [Controls] [TWinControl.MainWndProc] [6237]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []
ST: 7E41B4C0 [] [Unknown function at DefWindowProcW] []
ST: 7E41B50C [] [Unknown function at DefWindowProcW] []
ST: 7C90EAE3 [] [KiUserCallbackDispatcher] []
ST: 0045BF42 [Controls] [TControl.WndProc] [4646]
ST: 0045FB13 [Controls] [TWinControl.WndProc] [6343]
ST: 0045BC4D [Controls] [TControl.Perform] [4553]
ST: 0045F565 [Controls] [TWinControl.UpdateShowing] [6193]
ST: 0045F518 [Controls] [TWinControl.UpdateShowing] [6186]
ST: 0045F5E9 [Controls] [TWinControl.UpdateControlState] [6212]
ST: 0045E7BD [Controls] [TWinControl.InsertControl] [5847]
ST: 0045A266 [Controls] [TControl.SetParent] [3723]
ST: 004BB5D4 [sentmain2] [swap_panel] [1045]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
ST: 00496FE4 [ThdTimer] [TThreadedTimer.DoTimer] [121]
ST: 00430F40 [Classes] [CheckSynchronize] [9339]
ST: 0048118C [Forms] [TApplication.WndProc] [6671]
ST: 00432E46 [Classes] [StdWndProc] [10967]
ST: 7E418734 [] [Unknown function at GetDC] []
ST: 7E418816 [] [Unknown function at GetDC] []
ST: 7E4189CD [] [Unknown function at GetWindowLongW] []
ST: 7E4196C7 [] [DispatchMessageA] []
ST: 0048183D [Forms] [TApplication.ProcessMessage] [6873]
Totally output 9 blocks 3 handles in 0 seconds.
Eliminated derived object's fields leak of 33 blocks.
Eliminated leaks on same calling path of 10 blocks.
The most places blocks on same calling path occurs in:
Same count: 3
ST: 0042EC15 [Classes] [TReader.ReadComponent] [6144]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]
ST: 0042EE04 [Classes] [TReader.ReadData] [6190]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]
ST: 0045DA1D [Controls] [TWinControl.ReadState] [5475]
ST: 0042FCC6 [Classes] [TReader.ReadRootComponent] [6567]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
Same count: 3
ST: 0042EBD4 [Classes] [TReader.ReadComponent] [6137]
ST: 0042EECB [Classes] [TReader.ReadDataInner] [6210]
ST: 0042EE04 [Classes] [TReader.ReadData] [6190]
ST: 00431D93 [Classes] [TComponent.ReadState] [9988]
ST: 00459426 [Controls] [TControl.ReadState] [3358]
ST: 0045DA1D [Controls] [TWinControl.ReadState] [5475]
ST: 0042FCC6 [Classes] [TReader.ReadRootComponent] [6567]
ST: 0042CE18 [Classes] [TStream.ReadComponent] [4975]
ST: 004BB57A [sentmain2] [swap_panel] [1039]
ST: 004BBD6D [sentmain2] [TForm1.AlarmtimerTimer] [1304]
End incremental session leak dectection at group 1

08-01-2008 08:08 PM
Find all posts by this user Quote this message in a reply
Qi
Administrator
*******


Posts: 46
Group: Administrators
Joined: Oct 2007
Status: Offline
Reputation: 0
Post: #2
RE: Cant find leak

Hello, Fred,

In Denomo directory, in the Help directory, there is an inspector.html, in which there is a section called "Understand output information".
The document is mainly for memory leaks information, but for resource and GDI leaks, the information is most likely the same.

Seems all leaks are from the method swap_panel in the unit sentmain2, so you may pay attention to that method and to see why the memory allocated by it is not freed.

Hope this helps.

I think I should write a detailed document on the output information, whenever I get enough free time. Smile

08-03-2008 04:08 PM
Visit this users website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: