Program hangs on startup with Resource Leak Report enabled

delphi package - automated exception handling
Post Reply
ChrisJ
Posts: 5
Joined: Fri Jan 30, 2015 3:39 am

Program hangs on startup with Resource Leak Report enabled

Post by ChrisJ »

Delphi XE5, 32 bit, on Win10 64 bit, MadExcept 4.0.13.
My program has several data modules, one containing ImageLists, that are created before the main form.

My program runs fine without Resource Leak enabled. But if I enable it, the following happens, sometimes:

* Run outside the IDE, the program hangs during initialisation. I don't see a main form, or any messages, and Madexcept does not show anything. So there is no obvious indication that the program is active at all. The only indication I get is that I can't recompile, because the compiler can't create a new EXE. However, Task Manager shows it under the "Background processes" category - not consuming CPU.

* When I run the program (no breakpoints) inside the IDE, I see an AV exception during startup. Click Continue and the program hangs as described above (nothing from Madexcept). See below for call stack examples if I click Break.

* Setting breakpoints in the .dpr file, the problem is happening during the creation of the first datamodule. I can change the order of datamodule creation, but it always seems to be the first one that causes the problem - that is, it is not related to anything specific in a particular datamodule.

* Now, the weird thing is that this behaviour is inconsistent. Sometimes, changing the order of creation of the various datamodules during startup does seem to clear the error for a while, and the problem seems to just go away - for a while. Sometimes, setting breakpoints and stepping through (either in the .dpr, or in the main form OnCreate) seems to be enough to avoid the AV and allow normal startup, but again this is not consistent.

* Call stack (from IDE) when failing to initialise a datamodule with just tables, queries and datasources:

Code: Select all

:6710305b ; C:\Program Files (x86)\madCollection\madExcept\Dlls\madExcept32.dll
:6cfe0013 
System._GetMem(???)
System.TObject.NewInstance
System._ClassCreate(???,???)
Data.DB.{System.Generics.Collections}TList<Data.DB.TField>.Create
Data.DB.TFields.Create($9C0EA68)
:008a086a TFields.Create + $2A
:00b6c99e TABSDataSet.Create + $36
:00b6f6be TABSTable.Create + $36
System.Classes.CreateComponent
System.Classes.TReader.ReadComponent(nil)
System.Classes.TReader.ReadDataInner(???)
System.Classes.TReader.ReadData($B188920)
System.Classes.TComponent.ReadState(???)
System.Classes.TDataModule.ReadState(???)
System.Classes.TReader.ReadRootComponent($B188920)
System.Classes.TStream.ReadComponent($B188920)
System.Classes.InternalReadComponentRes(???,???,$B188920)
System.Classes.InitComponent(TKeyTables)
System.Classes.InitInheritedComponent($B188920,TDataModule)
System.Classes.TDataModule.Create(???)
Vcl.Forms.TApplication.CreateForm(???,(no value))
TopshareV3.TopshareV3
:74663744 KERNEL32.BaseThreadInitThunk + 0x24
:773c9cd4 ntdll.RtlSetCurrentTransaction + 0xd4
:773c9c9f ntdll.RtlSetCurrentTransaction + 0x9f
* Call stack (from IDE) when failing to initialise a datamodule with Imagelists:

Code: Select all

:6710305b ; C:\Program Files (x86)\madCollection\madExcept\Dlls\madExcept32.dll
:671cc359 ; C:\Program Files (x86)\madCollection\madExcept\Dlls\madExcept32.dll
:671d42df ; C:\Program Files (x86)\madCollection\madExcept\Dlls\madExcept32.dll
Vcl.Graphics.TBitmap.ReadDIB($B1D1518,???,$19FAC0)
Vcl.Graphics.TBitmap.ReadStream($B1D1518,1078)
Vcl.Graphics.TBitmap.ReadData($B1D1518)
:0059de73 TBitmap.ReadStream + $67
System.Classes.TReader.DefineBinaryProperty(???,(cxGraphics.TcxBitmap.ReadData,$B1F85B0),(cxGraphics.TcxBitmap.WriteData,$B1F85B0),???)
Vcl.Graphics.TGraphic.DefineProperties($B1E1B48)
System.Classes.TReader.ReadProperty($B1EF8B0)
System.Classes.TReader.ReadCollection($B1DE928)
:007989fd TcxImageList.ReadImageInfo + $25
:007987da TcxImageList.DefineProperties + $CE
System.Classes.TReader.ReadProperty($B1D26A8)
System.Classes.TReader.ReadDataInner($B1D26A8)
System.Classes.TReader.ReadData($B1D26A8)
System.Classes.TComponent.ReadState(???)
System.Classes.TReader.ReadComponent(nil)
System.Classes.TReader.ReadDataInner(???)
System.Classes.TReader.ReadData($B0E8920)
System.Classes.TComponent.ReadState(???)
System.Classes.TDataModule.ReadState(???)
System.Classes.TReader.ReadRootComponent($B0E8920)
System.Classes.TStream.ReadComponent($B0E8920)
System.Classes.InternalReadComponentRes(???,???,$B0E8920)
System.Classes.InitComponent(TImageListsDM)
System.Classes.InitInheritedComponent($B0E8920,TDataModule)
System.Classes.TDataModule.Create(???)
Vcl.Forms.TApplication.CreateForm(???,(no value))
TopshareV3.TopshareV3
:74663744 KERNEL32.BaseThreadInitThunk + 0x24
:773c9cd4 ntdll.RtlSetCurrentTransaction + 0xd4
:773c9c9f ntdll.RtlSetCurrentTransaction + 0x9f
Any ideas????

Thanks,
Chris.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Program hangs on startup with Resource Leak Report enabl

Post by madshi »

Hi Chris,

and sorry for the late reply!

In the situation where the EXE is hanging, can you try running the madExcept "madTraceProcess.exe" tool to get a freeze report about the problem? If that doesn't work, we'll have to find some other way to debug the problem.
ChrisJ
Posts: 5
Joined: Fri Jan 30, 2015 3:39 am

Re: Program hangs on startup with Resource Leak Report enabl

Post by ChrisJ »

Hi Madshi

Of course, things have fixed themselves in the meantime! I did say the behaviour was inconsistent.

When/if it turns up again, I'll try TraceProcess and will restart this thread.
ChrisJ
Posts: 5
Joined: Fri Jan 30, 2015 3:39 am

Re: Program hangs on startup with Resource Leak Report enabl

Post by ChrisJ »

OK, here is a trace report. Any clues??

Code: Select all

date/time          : 2016-01-27, 11:47:49, 796ms
computer name      : CHRIS-2015
user name          : Chris
registered owner   : Windows User
operating system   : Windows 10 x64 build 10240
system language    : English
system up time     : 3 days
program up time    : 16 seconds
processors         : 8x Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
physical memory    : 4591/8057 MB (free/total)
free disk space    : (C:) 108.18 GB (D:) 1568.90 GB
display mode       : 1920x1200, 32 bit
process id         : $150c
allocated memory   : 54.60 MB
largest free block : 1.42 GB
executable         : TopshareV3.exe
exec. date/time    : 2016-01-27 11:45
version            : 1.0.0.0
compiled with      : Delphi XE5
madExcept version  : 4.0.12
callstack crc      : $70beec68, $0c106540, $0c106540

main thread ($1444):
751913c2 +092 KERNELBASE.dll                           SleepEx
7519131a +00a KERNELBASE.dll                           Sleep
6710344c +0b0 madExcept32.dll System           380  +0 SysFreeMem
671044ac +004 madExcept32.dll System           380  +0 @FreeMem
671ccd7b +127 madExcept32.dll madExceptDbg    1687 +36 FreeMemCallback
004067c8 +004 TopshareV3.exe  System          4364 +20 @FreeMem
004082bc +00c TopshareV3.exe  System         15456  +2 TObject.FreeInstance
004abf25 +019 TopshareV3.exe  madExcept                InterceptClassDestroy
005450f1 +02d TopshareV3.exe  System.Classes   817  +4 {System.Generics.Collections}TList<System.Classes.TCollectionItem>.Destroy
0040848c +008 TopshareV3.exe  System         15524  +1 TObject.Free
00528c51 +02d TopshareV3.exe  System.Classes  5405  +5 TCollection.Destroy
0040848c +008 TopshareV3.exe  System         15524  +1 TObject.Free
00960c8d +055 TopshareV3.exe  ABSMain                  TABSDataSet.Destroy
0096c109 +065 TopshareV3.exe  ABSMain                  TABSQuery.Destroy
00408b31 +041 TopshareV3.exe  System         16788 +36 @ClassCreate
776eab7a +00a ntdll.dll                                KiUserExceptionDispatcher
00408af7 +007 TopshareV3.exe  System         16757  +5 @ClassCreate
0040845b +007 TopshareV3.exe  System         15511  +0 TObject.Create
00544fb8 +038 TopshareV3.exe  System.Classes   793  +7 {System.Generics.Collections}TList<System.Classes.TCollectionItem>.Create
00544f41 +039 TopshareV3.exe  System.Classes   782  +1 {System.Generics.Collections}TList<System.Classes.TCollectionItem>.Create
00408af7 +007 TopshareV3.exe  System         16757  +5 @ClassCreate
0052b7f9 +009 TopshareV3.exe  System.Classes  6821  +0 TStringList.Create
0096c00f +02f TopshareV3.exe  ABSMain                  TABSQuery.Create
005344f5 +0ad TopshareV3.exe  System.Classes 10129 +15 CreateComponent
00534720 +088 TopshareV3.exe  System.Classes 10175 +11 TReader.ReadComponent
005349d1 +089 TopshareV3.exe  System.Classes 10241  +9 TReader.ReadDataInner
00534910 +038 TopshareV3.exe  System.Classes 10220  +5 TReader.ReadData
0053fa65 +001 TopshareV3.exe  System.Classes 15947  +0 TComponent.ReadState
00541959 +00d TopshareV3.exe  System.Classes 16922  +1 TDataModule.ReadState
005358cf +1d7 TopshareV3.exe  System.Classes 10667 +37 TReader.ReadRootComponent
0052f7ca +032 TopshareV3.exe  System.Classes  8269  +3 TStream.ReadComponent
0052519f +057 TopshareV3.exe  System.Classes  3834  +7 InternalReadComponentRes
00526af3 +05f TopshareV3.exe  System.Classes  3891  +4 InitComponent
00526b81 +061 TopshareV3.exe  System.Classes  3903  +6 InitInheritedComponent
00541408 +078 TopshareV3.exe  System.Classes 16788  +6 TDataModule.Create
006ba716 +076 TopshareV3.exe  Vcl.Forms      10407 +13 TApplication.CreateForm
0105ae96 +04e TopshareV3.exe  TopshareV3        82  +4 initialization
005344f5 +0ad TopshareV3.exe  System.Classes 10129 +15 CreateComponent
00534720 +088 TopshareV3.exe  System.Classes 10175 +11 TReader.ReadComponent
005349d1 +089 TopshareV3.exe  System.Classes 10241  +9 TReader.ReadDataInner
00534910 +038 TopshareV3.exe  System.Classes 10220  +5 TReader.ReadData
0053fa65 +001 TopshareV3.exe  System.Classes 15947  +0 TComponent.ReadState
006ba716 +076 TopshareV3.exe  Vcl.Forms      10407 +13 TApplication.CreateForm
0105ae96 +04e TopshareV3.exe  TopshareV3        82  +4 initialization
74d93742 +022 KERNEL32.DLL                             BaseThreadInitThunk
00408b65 +01d TopshareV3.exe  System         16805  +2 @AfterConstruction
0040e259 +009 TopshareV3.exe  System         35447  +6 @IntfCopy
00408b65 +01d TopshareV3.exe  System         16805  +2 @AfterConstruction
00408af7 +007 TopshareV3.exe  System         16757  +5 @ClassCreate
0052b7f9 +009 TopshareV3.exe  System.Classes  6821  +0 TStringList.Create
0096c00f +02f TopshareV3.exe  ABSMain                  TABSQuery.Create
005344f5 +0ad TopshareV3.exe  System.Classes 10129 +15 CreateComponent
00534720 +088 TopshareV3.exe  System.Classes 10175 +11 TReader.ReadComponent
005349d1 +089 TopshareV3.exe  System.Classes 10241  +9 TReader.ReadDataInner
00534910 +038 TopshareV3.exe  System.Classes 10220  +5 TReader.ReadData
0053fa65 +001 TopshareV3.exe  System.Classes 15947  +0 TComponent.ReadState
00541959 +00d TopshareV3.exe  System.Classes 16922  +1 TDataModule.ReadState
005358cf +1d7 TopshareV3.exe  System.Classes 10667 +37 TReader.ReadRootComponent
0052f7ca +032 TopshareV3.exe  System.Classes  8269  +3 TStream.ReadComponent
0052519f +057 TopshareV3.exe  System.Classes  3834  +7 InternalReadComponentRes
00526af3 +05f TopshareV3.exe  System.Classes  3891  +4 InitComponent
00526b81 +061 TopshareV3.exe  System.Classes  3903  +6 InitInheritedComponent
00541408 +078 TopshareV3.exe  System.Classes 16788  +6 TDataModule.Create
006ba716 +076 TopshareV3.exe  Vcl.Forms      10407 +13 TApplication.CreateForm
0105ae96 +04e TopshareV3.exe  TopshareV3        82  +4 initialization
74d93742 +022 KERNEL32.DLL                             BaseThreadInitThunk

thread $2224:
74d93742 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $f4:
74d93742 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $1c70:
74d93742 +22 KERNEL32.DLL  BaseThreadInitThunk

modules:
00380000 WINMMBASE.dll        6.2.10240.16384     C:\WINDOWS\SYSTEM32
00400000 TopshareV3.exe       1.0.0.0             d:\Users\Chris\Documents\XE5 Programming shared\Topshare V3 New UI\Win32\Debug
05420000 cscapi.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
055c0000 WINSTA.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
0af30000 gdiplus.dll          6.2.10240.16603     C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.10240.16603_none_d15a3826af6dca5f
0b0e0000 msimg32.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
0b7d0000 WindowsCodecs.dll    6.2.10240.16384     C:\WINDOWS\SYSTEM32
67100000 madExcept32.dll      4.0.5.0             C:\Program Files (x86)\madCollection\madExcept\Dlls
69380000 wininet.dll          11.0.10240.16515    C:\WINDOWS\SYSTEM32
6a850000 wsock32.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
6fe40000 oleacc.dll           7.2.10240.16384     C:\WINDOWS\SYSTEM32
6fea0000 winmm.dll            6.2.10240.16384     C:\WINDOWS\SYSTEM32
71150000 dbgcore.DLL          6.2.10240.16384     C:\WINDOWS\SYSTEM32
71180000 dbghelp.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
712c0000 FaultRep.dll         6.2.10240.16384     C:\WINDOWS\SYSTEM32
71c60000 propsys.dll          7.0.10240.16384     C:\WINDOWS\system32
72080000 comctl32.dll         6.10.10240.16384    C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10240.16384_none_3bccb1ff6bcd1849
723a0000 wtsapi32.dll         6.2.10240.16384     C:\WINDOWS\SYSTEM32
72b50000 wkscli.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
72e90000 dwmapi.dll           6.2.10240.16392     C:\WINDOWS\system32
73200000 uxtheme.dll          6.2.10240.16397     C:\WINDOWS\system32
73420000 avghookx.dll         16.31.0.7357        C:\Program Files (x86)\AVG\Av
74620000 ntmarta.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
74650000 DEVOBJ.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
74680000 bcrypt.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
746a0000 winspool.drv         6.2.10240.16384     C:\WINDOWS\SYSTEM32
74710000 version.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
74720000 bcryptPrimitives.dll 6.2.10240.16384     C:\WINDOWS\SYSTEM32
74780000 CRYPTBASE.dll        6.2.10240.16384     C:\WINDOWS\SYSTEM32
74790000 SspiCli.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
747b0000 RPCRT4.dll           6.2.10240.16412     C:\WINDOWS\SYSTEM32
74870000 ole32.dll            6.2.10240.16384     C:\WINDOWS\SYSTEM32
74960000 shcore.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
74d80000 KERNEL32.DLL         6.2.10240.16384     C:\WINDOWS\SYSTEM32
74e70000 powrprof.dll         6.2.10240.16384     C:\WINDOWS\SYSTEM32
74ec0000 cfgmgr32.dll         6.2.10240.16384     C:\WINDOWS\SYSTEM32
74f00000 NSI.dll              6.2.10240.16384     C:\WINDOWS\SYSTEM32
74f10000 msvcrt.dll           7.0.10240.16384     C:\WINDOWS\SYSTEM32
74fd0000 sechost.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
75070000 shlwapi.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
750e0000 KERNELBASE.dll       6.2.10240.16384     C:\WINDOWS\SYSTEM32
75260000 WS2_32.dll           6.2.10240.16384     C:\WINDOWS\SYSTEM32
75320000 oleaut32.dll         6.2.10240.16384     C:\WINDOWS\SYSTEM32
753c0000 IMM32.DLL            6.2.10240.16384     C:\WINDOWS\SYSTEM32
75400000 clbcatq.dll          2001.12.10941.16384 C:\WINDOWS\SYSTEM32
75490000 profapi.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
754a0000 shell32.dll          6.2.10240.16542     C:\WINDOWS\SYSTEM32
769e0000 windows.storage.dll  6.2.10240.16515     C:\WINDOWS\SYSTEM32
76ec0000 kernel.appcore.dll   6.2.10240.16384     C:\WINDOWS\SYSTEM32
76ed0000 comdlg32.dll         6.2.10240.16603     C:\WINDOWS\SYSTEM32
76f90000 MSCTF.dll            6.2.10240.16384     C:\WINDOWS\SYSTEM32
77150000 user32.dll           6.2.10240.16603     C:\WINDOWS\SYSTEM32
77290000 combase.dll          6.2.10240.16384     C:\WINDOWS\SYSTEM32
77450000 GDI32.dll            6.2.10240.16644     C:\WINDOWS\SYSTEM32
77600000 advapi32.dll         6.2.10240.16644     C:\WINDOWS\SYSTEM32
77680000 ntdll.dll            6.2.10240.16603     C:\WINDOWS\SYSTEM32

processes:
0000 Idle                                   0 0    0
0004 System                                 0 0    0
01c8 smss.exe                               0 0    0
026c avgrsa.exe                             0 0    0
02e8 avgcsrva.exe                           0 0    0
056c csrss.exe                              0 0    0
05d8 wininit.exe                            0 0    0
0620 services.exe                           0 0    0
062c lsass.exe                              0 0    0
06c0 svchost.exe                            0 0    0
06f8 svchost.exe                            0 0    0
075c svchost.exe                            0 0    0
0780 svchost.exe                            0 0    0
07e0 svchost.exe                            0 0    0
0590 svchost.exe                            0 0    0
04ac svchost.exe                            0 0    0
0570 nvvsvc.exe                             0 0    0
061c nvSCPAPISvr.exe                        0 0    0
0848 igfxCUIService.exe                     0 0    0
0898 WUDFHost.exe                           0 0    0
0914 svchost.exe                            0 0    0
0a9c svchost.exe                            0 0    0
09bc spoolsv.exe                            0 0    0
0bd8 dasHost.exe                            0 0    0
0c4c svchost.exe                            0 0    0
0c54 avgsvca.exe                            0 0    0
0c5c avgwdsvcx.exe                          0 0    0
0c6c ibguard.exe                            0 0    0
0c88 avgidsagent.exe                        0 0    0
0cc8 QSStarterService.exe                   0 0    0
0cd0 ss_conn_service.exe                    0 0    0
0d00 svchost.exe                            0 0    0
0d14 svchost.exe                            0 0    0
0d90 ibserver.exe                           0 0    0
1170 avgnsa.exe                             0 0    0
1194 avgemca.exe                            0 0    0
1414 PresentationFontCache.exe              0 0    0
1824 SearchIndexer.exe                      0 0    0
1cc8 HPSupportSolutionsFrameworkService.exe 0 0    0
0278 jhi_service.exe                        0 0    0
1cf4 LMS.exe                                0 0    0
1548 svchost.exe                            0 0    0
21c8 csrss.exe                              3 0    0
09e4 winlogon.exe                           3 0    0
2028 dwm.exe                                3 0    0
1b88 nvxdsync.exe                           3 0    0
2010 nvvsvc.exe                             3 0    0
1b8c sihost.exe                             3 4    10   normal C:\Windows\System32
168c taskhostw.exe                          3 13   16   normal C:\Windows\System32
20ec itype.exe                              3 15   38   normal C:\Program Files\Microsoft Mouse and Keyboard Center
199c ipoint.exe                             3 16   47   normal C:\Program Files\Microsoft Mouse and Keyboard Center
1d58 igfxEM.exe                             3 13   14   normal C:\Windows\System32
1650 explorer.exe                           3 585  408  normal C:\Windows
17e0 RuntimeBroker.exe                      3 36   15   normal C:\Windows\System32
1d04 ShellExperienceHost.exe                3 4    42   normal C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy
1aec SearchUI.exe                           3 21   60   normal C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy
1d78 dllhost.exe                            3 4    4    normal C:\Windows\System32
12c4 nvtray.exe                             3 81   4    normal C:\Program Files\NVIDIA Corporation\Display
1a70 NvBackend.exe                          3 4    1    normal C:\Program Files (x86)\NVIDIA Corporation\Update Core
1954 RtkNGUI64.exe                          3 41   29   normal C:\Program Files\Realtek\Audio\HDA
04a0 SpiderOak.exe                          3 22   26   normal C:\Program Files\SpiderOak
2008 SpiderOak.exe                          3 4    2    normal C:\Program Files\SpiderOak
1110 ScanToPCActivationApp.exe              3 53   27   normal C:\Program Files\HP\HP Officejet Pro 8600\Bin
1a5c OneDrive.exe                           3 22   19   normal D:\Users\Chris\AppData\Local\Microsoft\OneDrive
222c ONENOTEM.EXE                           3 13   6    normal C:\Program Files (x86)\Microsoft Office\Office12
1c64 avgui.exe                              3 152  86   normal C:\Program Files (x86)\AVG\Av
0e3c avguix.exe                             3 9    13   normal C:\Program Files (x86)\AVG\Framework\Common
2094 windows_dir_watcher.exe                3 4    1    normal C:\Program Files\SpiderOak
15fc QuickShadow.exe                        3 0    0
1de8 fontdrvhost.exe                        3 0    0
23f8 ctfmon.exe                             3 9    8    normal C:\Windows\SysWOW64
1568 HPNetworkCommunicator.exe              3 4    1    normal C:\Program Files\HP\HP Officejet Pro 8600\Bin
23ac svchost.exe                            3 4    1    normal C:\Windows\System32
1458 bds.exe                                3 2787 1328 normal C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin
00e8 splwow64.exe                           3 4    3    normal C:\Windows
23d8 firefox.exe                            3 38   81   normal C:\Program Files (x86)\Mozilla Firefox
0788 WINWORD.EXE                            3 354  114  normal C:\Program Files (x86)\Microsoft Office\Office12
1900 madExceptViewer.exe                    3 68   37   normal C:\Program Files (x86)\madCollection\madExcept\Tools
0c64 taskhostw.exe                          3 0    0
1674 notepad.exe                            3 23   21   normal C:\Windows\System32
1960 madExceptViewer.exe                    3 68   37   normal C:\Program Files (x86)\madCollection\madExcept\Tools
2130 madExceptViewer.exe                    3 68   37   normal C:\Program Files (x86)\madCollection\madExcept\Tools
2018 chrome.exe                             3 44   45   normal C:\Program Files (x86)\Google\Chrome\Application
0fc8 chrome.exe                             3 7    8    normal C:\Program Files (x86)\Google\Chrome\Application
1ce4 chrome.exe                             3 0    0    normal C:\Program Files (x86)\Google\Chrome\Application
137c chrome.exe                             3 0    0    idle   C:\Program Files (x86)\Google\Chrome\Application
1e74 madExceptViewer.exe                    3 68   37   normal C:\Program Files (x86)\madCollection\madExcept\Tools
2350 dexplore.exe                           3 183  185  normal C:\Program Files (x86)\Common Files\Microsoft Shared\Help 9
1b4c SnippingTool.exe                       3 112  50   normal C:\Windows\System32
0a18 SearchProtocolHost.exe                 0 0    0
0b48 Taskmgr.exe                            3 0    0
150c TopshareV3.exe                         3 281  74   normal D:\Users\Chris\Documents\XE5 Programming shared\Topshare V3 New UI\Win32\Debug
1478 madTraceProcess32.exe                  3 36   24   normal C:\Program Files (x86)\madCollection\madExcept\Tools

hardware:
+ {1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}
  - Fax
  - HPB6E35F (HP Officejet Pro 8600)
  - Microsoft Print to PDF
  - Microsoft XPS Document Writer
  - Root Print Queue
+ {36fc9e60-c465-11cf-8056-444553540000}
  - Generic USB Hub
  - Generic USB Hub
  - Intel(R) USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)
  - Microsoft Mouse and Keyboard Detection Driver (USB)
  - Standard Enhanced PCI to USB Host Controller
  - Standard Enhanced PCI to USB Host Controller
  - USB Mass Storage Device
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub (xHCI)
+ {4d36e965-e325-11ce-bfc1-08002be10318}
  - ATAPI iHAS124   E
+ {4d36e966-e325-11ce-bfc1-08002be10318}
  - ACPI x64-based PC
+ {4d36e967-e325-11ce-bfc1-08002be10318}
  - KINGSTON SV300S37A240G
  - SAMSUNG HM500JI USB Device
  - ST2000DM001-1ER164
+ {4d36e968-e325-11ce-bfc1-08002be10318}
  - Intel(R) HD Graphics 4600 (driver 10.18.15.4256)
  - NVIDIA GeForce GT 610  (driver 10.18.13.5362)
+ {4d36e96a-e325-11ce-bfc1-08002be10318}
  - Standard SATA AHCI Controller
+ {4d36e96b-e325-11ce-bfc1-08002be10318}
  - Microsoft USB Dual Receiver Wireless Keyboard (Mouse and Keyboard Center)
+ {4d36e96c-e325-11ce-bfc1-08002be10318}
  - Intel(R) Display Audio (driver 6.16.0.3137)
  - NVIDIA High Definition Audio (driver 1.3.34.3)
  - Realtek High Definition Audio (driver 6.0.1.7535)
+ {4d36e96e-e325-11ce-bfc1-08002be10318}
  - BenQ G2222HDH (HDMI) (driver 1.0.0.0)
  - Generic PnP Monitor
+ {4d36e96f-e325-11ce-bfc1-08002be10318}
  - Microsoft USB Dual Receiver Wireless Mouse (Mouse and Keyboard Center)
+ {4d36e972-e325-11ce-bfc1-08002be10318}
  - Microsoft ISATAP Adapter
  - Microsoft ISATAP Adapter #2
  - Microsoft Kernel Debug Network Adapter
  - Microsoft Teredo Tunneling Adapter
  - Realtek PCIe GBE Family Controller (driver 9.1.401.2015)
  - VirtualBox Host-Only Ethernet Adapter #2 (driver 5.0.8.0)
  - WAN Miniport (IKEv2)
  - WAN Miniport (IP)
  - WAN Miniport (IPv6)
  - WAN Miniport (L2TP)
  - WAN Miniport (Network Monitor)
  - WAN Miniport (PPPOE)
  - WAN Miniport (PPTP)
  - WAN Miniport (SSTP)
+ {4d36e978-e325-11ce-bfc1-08002be10318}
  - Communications Port (COM1)
  - Printer Port (LPT1)
+ {4d36e979-e325-11ce-bfc1-08002be10318}
  - HP Officejet Pro 8600 (driver 9.84.0.1189)
+ {4d36e97b-e325-11ce-bfc1-08002be10318}
  - Microsoft Storage Spaces Controller
+ {4d36e97d-e325-11ce-bfc1-08002be10318}
  - ACPI Fan
  - ACPI Fan
  - ACPI Fan
  - ACPI Fan
  - ACPI Fan
  - ACPI Fixed Feature Button
  - ACPI Power Button
  - ACPI Processor Aggregator
  - ACPI Sleep Button
  - ACPI Thermal Zone
  - ACPI Thermal Zone
  - Composite Bus Enumerator
  - Direct memory access controller
  - High Definition Audio Controller
  - High Definition Audio Controller
  - High Definition Audio Controller
  - High precision event timer
  - Intel Device (driver 10.0.20.0)
  - Intel(R) Extreme Tuning Utility Device Driver (driver 5.0.0.0)
  - Intel(R) Management Engine Interface  (driver 10.0.30.1054)
  - IWD Bus Enumerator (driver 5.5.55.0)
  - Legacy device
  - Microsoft ACPI-Compliant System
  - Microsoft Basic Display Driver
  - Microsoft Basic Render Driver
  - Microsoft System Management BIOS Driver
  - Microsoft Virtual Drive Enumerator
  - Motherboard resources
  - Motherboard resources
  - Motherboard resources
  - Motherboard resources
  - Motherboard resources
  - Motherboard resources
  - NDIS Virtual Network Adapter Enumerator
  - Numeric data processor
  - PCI Express Root Complex
  - PCI standard host CPU bridge
  - PCI standard ISA bridge
  - PCI-to-PCI Bridge
  - PCI-to-PCI Bridge
  - PCI-to-PCI Bridge
  - PCI-to-PCI Bridge
  - PCI-to-PCI Bridge
  - Plug and Play Software Device Enumerator
  - Printer Port Logical Interface
  - Programmable interrupt controller
  - Remote Desktop Device Redirector Bus
  - System board
  - System CMOS/real time clock
  - System timer
  - UMBus Root Bus Enumerator
  - Volume Manager
+ {50127dc3-0f36-415e-a6cc-4cb3be910b65}
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
+ {533c5b84-ec70-11d2-9505-00c04f79deaf}
  - Generic volume shadow copy
  - Generic volume shadow copy
  - Generic volume shadow copy
  - Generic volume shadow copy
+ {62f9c741-b25a-46ce-b54c-9bccce08b6f2}
  - HPB6E35F (HP Officejet Pro 8600)
  - HPB6E35F (HP Officejet Pro 8600)
  - Microsoft Device Association Root Enumerator
  - Microsoft GS Wavetable Synth
  - Microsoft IPv4 IPv6 Transition Adapter Bus
  - Microsoft Radio Device Enumeration Bus
  - Microsoft RRAS Root Enumerator
+ {6bdd1fc6-810f-11d0-bec7-08002be2092f}
  - HP Officejet Pro 8600 (NET) (driver 26.0.0.0)
+ {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
  - HID-compliant consumer control device
  - HID-compliant consumer control device
  - HID-compliant consumer control device
  - HID-compliant system controller
  - HID-compliant vendor-defined device
  - Microsoft Hardware USB Keyboard
  - Microsoft Hardware USB Mouse
  - USB Input Device
+ {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}
  - BenQ G2222HDH-4 (NVIDIA High Definition Audio)
  - Realtek Digital Output (Realtek High Definition Audio)
  - Speakers (Realtek High Definition Audio)
+ {c30ecea0-11ef-4ef9-b02e-6af81e6e65c0}
  - HPB6E35F (HP Officejet Pro 8600)
+ {eec5ad98-8080-425f-922a-dabf3de3f69a}
  - Iomega_HDD

disassembling:
[...]
6710343e       lock cmpxchg [ebx], ah
67103442       jz      loc_671033b7
67103448       push    ecx
67103449       push    edx
6710344a       push    $a
6710344c     > call    -$b19 ($67102938)      ; System.Sleep (madExcept32.dll)
67103451       pop     edx
67103452       pop     ecx
67103453       jmp     loc_67103418
67103458       mov     eax, $100
6710345d       lock cmpxchg [$671efa68], ah
[...]


ChrisJ
Posts: 5
Joined: Fri Jan 30, 2015 3:39 am

Re: Program hangs on startup with Resource Leak Report enabl

Post by ChrisJ »

Madshi - any response to my last post?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Program hangs on startup with Resource Leak Report enabl

Post by madshi »

Hmmm... It seems that unit TopshareV3 creates a form in line 82, and for some reason there's some exception, and as a result the class is going to be destroyed, but madExcept32.dll's internal memory manager goes into a sleep loop while trying to free that class. I'm not sure why that's happening. The sleep loop seems to be in the FastMM4 memory manager used by the madExcept32.dll... :(
Post Reply