V4: entering critical section problem
V4: entering critical section problem
Hi Mathias!
Thank you for new tool version, it looks very useful, especially searching for memory leaks in pascal parts of BCB projects (at least in CB2007 there is no method to find them with standard IDE features).
But I have a problem with entering critical sections. My program works under previous version (v3) but under v4 it often hangs up on entering CS:
Call stack
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:671749c4 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:67179787 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:0049876d ; madExcept::_17341
:1000807f ; C:\WINDOWS\system32\WD_UTILS.DLL
(WD_UTILS.DLL is 3-d party library, which creates its own CSs internally.)
If I switch off the madExept the program runs smoothly again.
My environment: XP-32 (4 CPU cores), CB2007.
Thank you for new tool version, it looks very useful, especially searching for memory leaks in pascal parts of BCB projects (at least in CB2007 there is no method to find them with standard IDE features).
But I have a problem with entering critical sections. My program works under previous version (v3) but under v4 it often hangs up on entering CS:
Call stack
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:671749c4 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:67179787 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:0049876d ; madExcept::_17341
:1000807f ; C:\WINDOWS\system32\WD_UTILS.DLL
(WD_UTILS.DLL is 3-d party library, which creates its own CSs internally.)
If I switch off the madExept the program runs smoothly again.
My environment: XP-32 (4 CPU cores), CB2007.
Re: V4: entering critical section problem
Can you please use the tool "madTraceProcess" (see madExcept\Tools folder) to get a madExcept report about your process, in the moment when it's frozen? If that works, I should get better information about what's going wrong. Generally, madExcept does not hook EnterCriticalSection, but it *does* hook InitializeCriticalSection.
Re: V4: entering critical section problem
Unfortunately, madTraceProcess does not do anything helpful in my case: it doesn't return until I kill my process and then shows an empty report. I've tried to run my prosess from IDE (under debugger) and from command line with the same result.
I've also notised that enabled madExept somehow effects on my USB hardware (mentioned critical sections are part of USB library): if my program hangs up on endless waiting for critical section and I kill the program then next time the USB devices behave ill (I can't connect them for example) until I restart USB driver stack with MS devcon utility. I never seen such problem before. Very strange...
BTW, madTraceProcess doesn't show my program in list of available programs if the program is compiled without madEcept. Is this normal?
I've also notised that enabled madExept somehow effects on my USB hardware (mentioned critical sections are part of USB library): if my program hangs up on endless waiting for critical section and I kill the program then next time the USB devices behave ill (I can't connect them for example) until I restart USB driver stack with MS devcon utility. I never seen such problem before. Very strange...
BTW, madTraceProcess doesn't show my program in list of available programs if the program is compiled without madEcept. Is this normal?
Re: V4: entering critical section problem
madTraceProcess only lists processes that have at least one module (exe or dll) loaded which was compiled with madExcept.
I think the problem probably only occurs if you activate the leak reporting? Or does it also occur without that?
Is there any chance you can reproduce the problem with a simple test project, and that this test project would allow me to reproduce the problem on my PC, too?
I think the problem probably only occurs if you activate the leak reporting? Or does it also occur without that?
Is there any chance you can reproduce the problem with a simple test project, and that this test project would allow me to reproduce the problem on my PC, too?
Re: V4: entering critical section problem
I see no problem if leak reporting is turned off.
Unfortunately I have no time to continue this investigation right now but I'll try to create the test this weekend.
Unfortunately I have no time to continue this investigation right now but I'll try to create the test this weekend.
Re: V4: entering critical section problem
Ok, please let me know if there's anything I can do to help figuring the problem out. It's going to be difficult for me, though, if I can't reproduce the problem. One alternative solution would be to setup a TeamViewer (or similar) remote connection so that I can debug the problem directly on your PC.
Re: V4: entering critical section problem
I've tried creating small test without using specific hardware/drivers but I can't reproduce the problem in it ...
No idea what to do now (except setting leak reports=off where I see no problems).
The program can start smoothly for the first time. On finish I see a report about minor leaks in VCL (expected leak in Indy and not important leak in some other components):
Next time the program hangs up (I think) on endless CS entering. I press "Pause" in IDE. All theads in applicalion do nothing special (mainly wait for a sync events except thread 500 which runs endlessly somewhere in APC routines):
I can reset the program. Next time it can work or don't work at all (until resettind USB driver stack).
I don't know if this problem of madExcept or some hidden problem of drivers...
If leak report is off I see no problems.
No idea what to do now (except setting leak reports=off where I see no problems).
The program can start smoothly for the first time. On finish I see a report about minor leaks in VCL (expected leak in Indy and not important leak in some other components):
Code: Select all
allocation number: 1619
program up time: 876 ms
type: TIdCriticalSection
address: $3a42fe4
size: 28
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00466122 FPAVIS.exe system 8807 TObject.NewInstance
004664f3 FPAVIS.exe system 9472 @ClassCreate
0060eb95 FPAVIS.exe syncobjs 333 TCriticalSection.Create
00716411 FPAVIS.exe idstack 832 initialization
0072f7b2 FPAVIS.exe __init_exit_proc
00712c92 FPAVIS.exe __startup
memory dump:
03a42fe4 98 c0 71 00 50 fb 6e 03 - ff ff ff ff 00 00 00 00 ..q.P.n.........
03a42ff4 00 00 00 00 00 00 00 00 - 00 00 00 00 ............
allocation number: 1620
program up time: 876 ms
type: InitializeCriticalSection
address: $3a42fe8
access rights: read/write
main thread ($598):
6717ae48 madExcept32.dll madExceptDbg InitializeCriticalSectionCallback
0060ebab FPAVIS.exe syncobjs 335 TCriticalSection.Create
00716411 FPAVIS.exe idstack 832 initialization
0072f7b2 FPAVIS.exe __init_exit_proc
00712c92 FPAVIS.exe __startup
allocation number: 1647
program up time: 880 ms
type: TIdThreadSafeInteger
address: $4f2cff4
size: 12
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00466122 FPAVIS.exe system 8807 TObject.NewInstance
004664f3 FPAVIS.exe system 9472 @ClassCreate
0072b1b5 FPAVIS.exe idthreadsafe 223 TIdThreadSafe.Create
0071eafd FPAVIS.exe idthread 606 initialization
0072f7b2 FPAVIS.exe __init_exit_proc
00712c92 FPAVIS.exe __startup
memory dump:
04f2cff4 8c b1 72 00 e4 af f2 04 - 00 00 00 00 ..r.........
allocation number: 1649
program up time: 880 ms
type: InitializeCriticalSection
address: $4f2afe8
access rights: read/write
main thread ($598):
6717ae48 madExcept32.dll madExceptDbg InitializeCriticalSectionCallback
0060ebab FPAVIS.exe syncobjs 335 TCriticalSection.Create
0072b1d1 FPAVIS.exe idthreadsafe 225 TIdThreadSafe.Create
0071eafd FPAVIS.exe idthread 606 initialization
0072f7b2 FPAVIS.exe __init_exit_proc
00712c92 FPAVIS.exe __startup
allocation number: 12581
program up time: 1.37 s
type: Thread Handle
handle: $85c
access rights: $1f03ff
threadId: $c00
processId: $dfc
process exe: D:\User\AlexB\Defect2009\FPAVIS\Debug\FPAVIS.exe
main thread ($598):
67179782 madExcept32.dll madExceptDbg CreateThreadCallback
004a74cf FPAVIS.exe madExcept _17341
77e8ca1b RPCRT4.dll I_RpcServerUseProtseqEp2W
77e8ca67 RPCRT4.dll RpcServerUseProtseqEpExW
77e8ca9c RPCRT4.dll RpcServerUseProtseqEpW
774fe5d1 OLE32.DLL CoMarshalInterface
774ef17d OLE32.DLL CoCreateInstanceEx
774ef1eb OLE32.DLL CoCreateInstance
006faecf FPAVIS.exe ADODB 1137 CreateADOObject
006fb796 FPAVIS.exe ADODB 1540 TADOConnection.Create
005bf985 FPAVIS.exe Classes 6503 CreateComponent
005bfbb4 FPAVIS.exe Classes 6549 TReader.ReadComponent
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfda4 FPAVIS.exe Classes 6594 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
005bdf56 FPAVIS.exe Classes 5341 TStream.ReadComponent
005ba11b FPAVIS.exe Classes 2649 InternalReadComponentRes
005ba2a5 FPAVIS.exe Classes 2706 InitComponent
005ba336 FPAVIS.exe Classes 2718 InitInheritedComponent
005c59e0 FPAVIS.exe Classes 11362 TDataModule.Create
00418c9f FPAVIS.exe database.cpp 65 TdmDataBase.Create
0058d42a FPAVIS.exe forms 8182 TApplication.CreateForm
00418b25 FPAVIS.exe fpavis.cpp 39 WinMain
00712cf8 FPAVIS.exe __startup
allocation number: 53400
program up time: 6.01 s
type: VirtualAlloc
address: $f960000
size: 4096
access rights: read/exec/write
main thread ($598):
671766ee madExcept32.dll madExceptDbg VirtualAllocCallback
005c5fca FPAVIS.exe Classes 11607 MakeObjectInstance
005a107b FPAVIS.exe Controls 5990 TWinControl.Create
005ce98a FPAVIS.exe stdctrls 1810 TCustomEdit.Create
005d659e FPAVIS.exe mask 169 TCustomMaskEdit.Create
0046d996 FPAVIS.exe JvExMask TJvExCustomMaskEdit.Create
0046fb4e FPAVIS.exe JvSpin TJvCustomSpinEdit.Create
00471fea FPAVIS.exe JvSpin TJvSpinEdit.Create
00505f8b FPAVIS.exe jvspineditenh.cpp 21 TJvSpinEditEnh.Create
005bf985 FPAVIS.exe Classes 6503 CreateComponent
005bfbb4 FPAVIS.exe Classes 6549 TReader.ReadComponent
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfdd3 FPAVIS.exe Classes 6600 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
0059d425 FPAVIS.exe Controls 3760 TControl.ReadState
005a135d FPAVIS.exe Controls 6096 TWinControl.ReadState
005e995f FPAVIS.exe ComCtrls 4971 TTabSheet.ReadState
005bfc4b FPAVIS.exe Classes 6561 TReader.ReadComponent
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfdd3 FPAVIS.exe Classes 6600 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
0059d425 FPAVIS.exe Controls 3760 TControl.ReadState
005a135d FPAVIS.exe Controls 6096 TWinControl.ReadState
005bfc4b FPAVIS.exe Classes 6561 TReader.ReadComponent
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfdd3 FPAVIS.exe Classes 6600 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
005e995f FPAVIS.exe ComCtrls 4971 TTabSheet.ReadState
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfdd3 FPAVIS.exe Classes 6600 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
005bfc4b FPAVIS.exe Classes 6561 TReader.ReadComponent
005bfe65 FPAVIS.exe Classes 6615 TReader.ReadDataInner
005bfda4 FPAVIS.exe Classes 6594 TReader.ReadData
005c4d31 FPAVIS.exe Classes 10603 TComponent.ReadState
00584315 FPAVIS.exe forms 3038 TCustomForm.ReadState
005c0c64 FPAVIS.exe Classes 6996 TReader.ReadRootComponent
005bdf56 FPAVIS.exe Classes 5341 TStream.ReadComponent
005ba11b FPAVIS.exe Classes 2649 InternalReadComponentRes
005ba2a5 FPAVIS.exe Classes 2706 InitComponent
005ba336 FPAVIS.exe Classes 2718 InitInheritedComponent
00583bb9 FPAVIS.exe forms 2851 TCustomForm.Create
0040c93b FPAVIS.exe forms.hpp 1022 Forms.TForm.Create
0041acc5 FPAVIS.exe setup.cpp 158 TfrmSetup.Create
0043ee86 FPAVIS.exe main.cpp 255 TfrmMain.btnSetupClick
0059fd64 FPAVIS.exe Controls 5229 TControl.Click
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
005a39a7 FPAVIS.exe Controls 7353 DoControlMsg
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
7c90e470 ntdll.dll KiUserCallbackDispatcher
7e3792de USER32.dll SendMessageW
7e37a993 USER32.dll CallWindowProcA
005a3953 FPAVIS.exe Controls 7334 TWinControl.DefaultHandler
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
memory dump:
0f960000 00 00 07 01 59 e9 7a 5f - c6 f0 e8 f5 ff ff ff 00 ....Y.z_........
0f960010 00 00 00 00 00 00 00 e8 - e8 ff ff ff 0a 00 96 0f ................
0f960020 00 00 00 00 e8 db ff ff - ff 17 00 96 0f 00 00 00 ................
0f960030 00 e8 ce ff ff ff 24 00 - 96 0f 00 00 00 00 e8 c1 ......$.........
0f960040 ff ff ff 31 00 96 0f 00 - 00 00 00 e8 b4 ff ff ff ...1............
0f960050 3e 00 96 0f 00 00 00 00 - e8 a7 ff ff ff 4b 00 96 >............K..
0f960060 0f 00 00 00 00 e8 9a ff - ff ff 58 00 96 0f 00 00 ..........X.....
0f960070 00 00 e8 8d ff ff ff 65 - 00 96 0f 00 00 00 00 e8 .......e........
0f960080 80 ff ff ff 72 00 96 0f - 00 00 00 00 e8 73 ff ff ....r........s..
0f960090 ff 7f 00 96 0f 00 00 00 - 00 e8 66 ff ff ff 8c 00 ..........f.....
0f9600a0 96 0f 00 00 00 00 e8 59 - ff ff ff 99 00 96 0f 00 .......Y........
0f9600b0 00 00 00 e8 4c ff ff ff - a6 00 96 0f 00 00 00 00 ....L...........
0f9600c0 e8 3f ff ff ff b3 00 96 - 0f 00 00 00 00 e8 32 ff .?............2.
0f9600d0 ff ff c0 00 96 0f 00 00 - 00 00 e8 25 ff ff ff cd ...........%....
0f9600e0 00 96 0f 00 00 00 00 e8 - 18 ff ff ff da 00 96 0f ................
0f9600f0 00 00 00 00 e8 0b ff ff - ff e7 00 96 0f 00 00 00 ................
0f960100 00 e8 fe fe ff ff f4 00 - 96 0f 00 00 00 00 e8 f1 ................
0f960110 fe ff ff 01 01 96 0f 00 - 00 00 00 e8 e4 fe ff ff ................
0f960120 0e 01 96 0f 00 00 00 00 - e8 d7 fe ff ff 1b 01 96 ................
0f960130 0f 00 00 00 00 e8 ca fe - ff ff 28 01 96 0f 00 00 ..........(.....
allocation number: 442908
program up time: 58.97 s
type: GetMem
address: $55c4ff0
size: 16
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00687ace FPAVIS.exe DB 10950 TDataSet.GetBookmark
004bf300 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004befb7 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.DataSetChanged
0068238d FPAVIS.exe DB 7693 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
006829cf FPAVIS.exe DB 7980 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068650b FPAVIS.exe DB 10065 TDataSet.EnableControls
004bf3b5 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004beeeb FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.SetDataField
004bef48 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.ActiveChanged
00682191 FPAVIS.exe DB 7599 TDataLink.SetActive
006821c0 FPAVIS.exe DB 7614 TDataLink.UpdateState
006822de FPAVIS.exe DB 7675 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
00682793 FPAVIS.exe DB 7894 TDataSource.SetState
006827de FPAVIS.exe DB 7907 TDataSource.UpdateState
006829bc FPAVIS.exe DB 7977 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068455c FPAVIS.exe DB 9102 TDataSet.SetState
00684ae7 FPAVIS.exe DB 9277 TDataSet.OpenCursorComplete
00684a17 FPAVIS.exe DB 9248 TDataSet.SetActive
00684a5b FPAVIS.exe DB 9255 TDataSet.SetActive
004191f9 FPAVIS.exe database.cpp 180 TdmDataBase.Reconnect
00419091 FPAVIS.exe database.cpp 144 TdmDataBase.RollBack
0041e307 FPAVIS.exe setup.cpp 620 TfrmSetup.btnCancelClick
0059fd64 FPAVIS.exe Controls 5229 TControl.Click
005d2396 FPAVIS.exe stdctrls 3745 TButton.Click
005d2494 FPAVIS.exe stdctrls 3797 TButton.CNCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
0059f4ec FPAVIS.exe Controls 5021 TControl.Perform
005a39a7 FPAVIS.exe Controls 7353 DoControlMsg
005a439f FPAVIS.exe Controls 7616 TWinControl.WMCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
005a0184 FPAVIS.exe Controls 5360 TControl.WMLButtonUp
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
memory dump:
055c4ff0 05 00 00 00 00 00 00 00 - 00 00 00 00 00 00 80 40 ...............@
allocation number: 442914
program up time: 58.97 s
type: GetMem
address: $86c2ff0
size: 16
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00687ace FPAVIS.exe DB 10950 TDataSet.GetBookmark
004bf300 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004befb7 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.DataSetChanged
0068238d FPAVIS.exe DB 7693 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
006829cf FPAVIS.exe DB 7980 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068650b FPAVIS.exe DB 10065 TDataSet.EnableControls
004bf3b5 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004beeeb FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.SetDataField
004bef48 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.ActiveChanged
00682191 FPAVIS.exe DB 7599 TDataLink.SetActive
006821c0 FPAVIS.exe DB 7614 TDataLink.UpdateState
006822de FPAVIS.exe DB 7675 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
00682793 FPAVIS.exe DB 7894 TDataSource.SetState
006827de FPAVIS.exe DB 7907 TDataSource.UpdateState
006829bc FPAVIS.exe DB 7977 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068455c FPAVIS.exe DB 9102 TDataSet.SetState
00684ae7 FPAVIS.exe DB 9277 TDataSet.OpenCursorComplete
00684a17 FPAVIS.exe DB 9248 TDataSet.SetActive
00684a5b FPAVIS.exe DB 9255 TDataSet.SetActive
004191f9 FPAVIS.exe database.cpp 180 TdmDataBase.Reconnect
00419091 FPAVIS.exe database.cpp 144 TdmDataBase.RollBack
0041e307 FPAVIS.exe setup.cpp 620 TfrmSetup.btnCancelClick
0059fd64 FPAVIS.exe Controls 5229 TControl.Click
005d2396 FPAVIS.exe stdctrls 3745 TButton.Click
005d2494 FPAVIS.exe stdctrls 3797 TButton.CNCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
0059f4ec FPAVIS.exe Controls 5021 TControl.Perform
005a39a7 FPAVIS.exe Controls 7353 DoControlMsg
005a439f FPAVIS.exe Controls 7616 TWinControl.WMCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
005a0184 FPAVIS.exe Controls 5360 TControl.WMLButtonUp
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
memory dump:
086c2ff0 05 00 00 00 00 00 00 00 - 00 00 00 00 00 08 80 40 ...............@
allocation number: 442918
program up time: 58.97 s
type: GetMem
address: $15ce8ff0
size: 16
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00687ace FPAVIS.exe DB 10950 TDataSet.GetBookmark
004bf300 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004befb7 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.DataSetChanged
0068238d FPAVIS.exe DB 7693 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
006829cf FPAVIS.exe DB 7980 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068650b FPAVIS.exe DB 10065 TDataSet.EnableControls
004bf3b5 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004beeeb FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.SetDataField
004bef48 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.ActiveChanged
00682191 FPAVIS.exe DB 7599 TDataLink.SetActive
006821c0 FPAVIS.exe DB 7614 TDataLink.UpdateState
006822de FPAVIS.exe DB 7675 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
00682793 FPAVIS.exe DB 7894 TDataSource.SetState
006827de FPAVIS.exe DB 7907 TDataSource.UpdateState
006829bc FPAVIS.exe DB 7977 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068455c FPAVIS.exe DB 9102 TDataSet.SetState
00684ae7 FPAVIS.exe DB 9277 TDataSet.OpenCursorComplete
00684a17 FPAVIS.exe DB 9248 TDataSet.SetActive
00684a5b FPAVIS.exe DB 9255 TDataSet.SetActive
004191f9 FPAVIS.exe database.cpp 180 TdmDataBase.Reconnect
00419091 FPAVIS.exe database.cpp 144 TdmDataBase.RollBack
0041e307 FPAVIS.exe setup.cpp 620 TfrmSetup.btnCancelClick
0059fd64 FPAVIS.exe Controls 5229 TControl.Click
005d2396 FPAVIS.exe stdctrls 3745 TButton.Click
005d2494 FPAVIS.exe stdctrls 3797 TButton.CNCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
0059f4ec FPAVIS.exe Controls 5021 TControl.Perform
005a39a7 FPAVIS.exe Controls 7353 DoControlMsg
005a439f FPAVIS.exe Controls 7616 TWinControl.WMCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
005a0184 FPAVIS.exe Controls 5360 TControl.WMLButtonUp
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
memory dump:
15ce8ff0 05 00 00 00 00 00 00 00 - 00 00 00 00 00 10 80 40 ...............@
allocation number: 442922
program up time: 58.97 s
type: GetMem
address: $1747aff0
size: 16
access rights: read/write
main thread ($598):
67174f55 madExcept32.dll madExceptDbg GetMemCallback
00464bb0 FPAVIS.exe system 2654 @GetMem
00687ace FPAVIS.exe DB 10950 TDataSet.GetBookmark
004bf300 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004befb7 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.DataSetChanged
0068238d FPAVIS.exe DB 7693 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
006829cf FPAVIS.exe DB 7980 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068650b FPAVIS.exe DB 10065 TDataSet.EnableControls
004bf3b5 FPAVIS.exe Jvdbsearchcombobox TJvDBCustomSearchComboBox.ReadList
004beeeb FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.SetDataField
004bef48 FPAVIS.exe Jvdbsearchcombobox TJvSearchComboBoxLink.ActiveChanged
00682191 FPAVIS.exe DB 7599 TDataLink.SetActive
006821c0 FPAVIS.exe DB 7614 TDataLink.UpdateState
006822de FPAVIS.exe DB 7675 TDataLink.DataEvent
00682973 FPAVIS.exe DB 7965 TDataSource.NotifyLinkTypes
00682995 FPAVIS.exe DB 7971 TDataSource.NotifyDataLinks
00682793 FPAVIS.exe DB 7894 TDataSource.SetState
006827de FPAVIS.exe DB 7907 TDataSource.UpdateState
006829bc FPAVIS.exe DB 7977 TDataSource.DataEvent
0068646d FPAVIS.exe DB 10036 TDataSet.DataEvent
00700e34 FPAVIS.exe ADODB 3921 TCustomADODataSet.DataEvent
0068455c FPAVIS.exe DB 9102 TDataSet.SetState
00684ae7 FPAVIS.exe DB 9277 TDataSet.OpenCursorComplete
00684a17 FPAVIS.exe DB 9248 TDataSet.SetActive
00684a5b FPAVIS.exe DB 9255 TDataSet.SetActive
004191f9 FPAVIS.exe database.cpp 180 TdmDataBase.Reconnect
00419091 FPAVIS.exe database.cpp 144 TdmDataBase.RollBack
0041e307 FPAVIS.exe setup.cpp 620 TfrmSetup.btnCancelClick
0059fd64 FPAVIS.exe Controls 5229 TControl.Click
005d2396 FPAVIS.exe stdctrls 3745 TButton.Click
005d2494 FPAVIS.exe stdctrls 3797 TButton.CNCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
0059f4ec FPAVIS.exe Controls 5021 TControl.Perform
005a39a7 FPAVIS.exe Controls 7353 DoControlMsg
005a439f FPAVIS.exe Controls 7616 TWinControl.WMCommand
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
005c5f98 FPAVIS.exe Classes 11583 StdWndProc
005a0184 FPAVIS.exe Controls 5360 TControl.WMLButtonUp
0059f85f FPAVIS.exe Controls 5146 TControl.WndProc
005a3857 FPAVIS.exe Controls 7304 TWinControl.WndProc
005d2240 FPAVIS.exe stdctrls 3684 TButtonControl.WndProc
005a2f80 FPAVIS.exe Controls 7073 TWinControl.MainWndProc
memory dump:
1747aff0 05 00 00 00 00 00 00 00 - 00 00 00 00 00 18 80 40 ...............@
Code: Select all
Main:
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:67174a7e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:6717ad1e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:10006399 WD_UTILS.WDC_DMASyncCpu + 0xc9
:00408110 nsBaseUsb7::TBaseUsb7::ReadTransaction(this=:0708EFB4, Cmd=:0012F23D, SizeofCmd=1, Buf=:0012F23E, SizeofBuf=1, ErrMsg=:00755B35, Timeout=0)
:0045586D TDefectController::GetPorts(this=:0708EF78, Mask='\x01')
:00455905 TDefectController::GetPort(this=:0708EF78, Cnl='\0')
:0041E7B4 TfrmSetup::tmrControllerTimer(this=:050A4840, Sender=:085A4FBC)
:0059368A Extctrls::TTimer::Timer(Self=????)
3704
:7c90e514 ntdll.KiFastSystemCallRet
:7c90d9da ntdll.ZwReadFile + 0xc
:67153c33 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
madExcept - HandleExceptionThread
:7c90e514 ntdll.KiFastSystemCallRet
:7c90d9da ntdll.ZwReadFile + 0xc
:67153c33 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
IdThread
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:09d5107f ; C:\WINDOWS\system32\mswsock.dll
:71a9307e WS2_32.recvfrom + 0x87
:007201FD Idwinsock2::Stub_recvfrom(s=2356, Buf=:050A9000, len=8192, flags=0, from=:09EEFDE4, fromlen=:09EEFDF4)
:00722F4C Idstackwindows::TIdStackWindows::RecvFrom(Self=:09D38FF0, ASocket=2356, VBuffer=:050A9000, ALength=8192, AFlags=0, VIP=:09EEFE84, VPort=:09EEFE7C, AIPVersion=0 /* Id_IPv4 */)
:0072C26F Idstackbsdbase::TIdStackBSDBase::ReceiveFrom(Self=:09D38FF0, ASocket=2356, VBuffer=:080E8FE8, VIP=:09EEFE84, VPort=:09EEFE7C, AIPVersion=0 /* Id_IPv4 */)
:00710A1D Idudpserver::TIdUDPListenerThread::Run(Self=:080E8F70)
:0071E46D Idthread::TIdThread::Execute(Self=:080E8F70)
:004a7089 madExcept::_17336() + 0x2D
:005C4247 Classes::ThreadProc(Thread=:080E8F70)
:00467056 System::ThreadWrapper(Parameter=:080CEFF8)
:004a6f6b madExcept::_17334() + 0xF
:004a6fd8 ; madExcept::_17335
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
500 (the only working thread)
:7c90e450 ; ntdll.dll
ntdll.KiUserApcDispatcher:
>> 7C90E450 8D7C2410 lea edi,[esp+$10]
7C90E454 58 pop eax
7C90E455 FFD0 call eax
7C90E457 6A01 push $01
7C90E459 57 push edi
7C90E45A E8FFEBFFFF call $7c90d05e
7C90E45F 90 nop
....
3932
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:67174a7e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:6717ad1e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:10006399 WD_UTILS.WDC_DMASyncCpu + 0xc9
:0040838C nsBaseUsb7::TBaseUsb7::WriteTransaction(this=:15E9EFB4, Cmd=:18F2FE5C, SizeofCmd=4, ErrMsg=:00750912, Timeout=0)
:0044A03F TCamPlatformI::Run(this=:15E9EEC0)
:00448F03 TBaseCam::FrameReader(this=:15E9EEC0, Data=NULL)
:0044649A TMethodThreader::Execute(this=:076C0FB0)
:004a7089 madExcept::_17336() + 0x2D
:005C4247 Classes::ThreadProc(Thread=:076C0FB0)
:00467056 System::ThreadWrapper(Parameter=:076B0FF8)
:004a6f6b madExcept::_17334() + 0xF
:004a6fd8 ; madExcept::_17335
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
3984
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:1000638e WD_UTILS.WDC_DMASyncCpu + 0xbe
:004a6f6b madExcept::_17334() + 0xF
:004a6fd8 ; madExcept::_17335
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
1716
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:67174a7e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:6717ad46 ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:7c9193b6 ; ntdll.dll
:7c919bb8 ntdll.RtlpUnWaitCriticalSection + 0x59
:7c9193a6 ; ntdll.dll
:7c9010fd ntdll.RtlLeaveCriticalSection + 0x1d
:67174a7e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:6717ad1e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:10006399 WD_UTILS.WDC_DMASyncCpu + 0xc9
:0040838C nsBaseUsb7::TBaseUsb7::WriteTransaction(this=:0F25EFB4, Cmd=:18BAFE5C, SizeofCmd=4, ErrMsg=:00750912, Timeout=0)
:0044A03F TCamPlatformI::Run(this=:0F25EEC0)
:00448F03 TBaseCam::FrameReader(this=:0F25EEC0, Data=NULL)
:0044649A TMethodThreader::Execute(this=:18818FB0)
:004a7089 madExcept::_17336() + 0x2D
:005C4247 Classes::ThreadProc(Thread=:18818FB0)
:00467056 System::ThreadWrapper(Parameter=:18816FF8)
:004a6f6b madExcept::_17334() + 0xF
:004a6fd8 ; madExcept::_17335
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
680
:7c90e514 ntdll.KiFastSystemCallRet
:7c90df5a ntdll.NtWaitForSingleObject + 0xc
:7c901046 ntdll.RtlEnterCriticalSection + 0x46
:67174a7e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:6717ad1e ; C:\Program Files\madCollection\madExcept\Dlls\madExcept32.dll
:10006399 WD_UTILS.WDC_DMASyncCpu + 0xc9
:0041EA0F TfrmSetup::tdInterruptExecute(this=:050A4840, Sender=:15CFAF80, Params=NULL)
:00475792 ; Jvthread::TJvBaseThread::Execute
:004a7089 madExcept::_17336() + 0x2D
:005C4247 Classes::ThreadProc(Thread=:15CFAF80)
:00467056 System::ThreadWrapper(Parameter=:15CFEFF8)
:004a6f6b madExcept::_17334() + 0xF
:004a6fd8 ; madExcept::_17335
:7c80b729 ; C:\WINDOWS\system32\kernel32.dll
I don't know if this problem of madExcept or some hidden problem of drivers...
If leak report is off I see no problems.
Re: V4: entering critical section problem
Just to make sure, can you double check with the latest beta build?
http://madshi.net/madCollectionBeta.exe (2.7.1.14)
http://madshi.net/madCollectionBeta.exe (2.7.1.14)
Re: V4: entering critical section problem
Unfortunately I see no difference.
The problem looks like a classic multithreading conflict. I don't know where it is located; it can be some bug either in madTools or in my program (which works at least for year without noticeable errors).
The problem looks like a classic multithreading conflict. I don't know where it is located; it can be some bug either in madTools or in my program (which works at least for year without noticeable errors).
Re: V4: entering critical section problem
Can you please create another thread report with the latest build you're using. Then please upload the thread report together with the exact madExcept32.dll and WD_UTILS.dll files you're using. Maybe I can find out something with a disassembler then. Thanks!
Re: V4: entering critical section problem
See data on
https://rapidshare.com/files/169580413/Data.rar
But I think the case is too complicated for investigation...
https://rapidshare.com/files/169580413/Data.rar
But I think the case is too complicated for investigation...
Re: V4: entering critical section problem
Ok, it seems to be related to CloseHandle/NtCloseHandle calls which madExcept hooks to track resource leaks. Does this build fix the problem?
http://madshi.net/madCollectionBeta.exe (2.7.1.16)
http://madshi.net/madCollectionBeta.exe (2.7.1.16)
Re: V4: entering critical section problem
Hi Mathias!
WOW, now the program works as expected, no visible problems!!! Miracle!
Many thanks!!!
WOW, now the program works as expected, no visible problems!!! Miracle!
Many thanks!!!
Re: V4: entering critical section problem
Glad to hear that...