Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : An Exception In TIdTCPServer
| Subject: | An Exception In TIdTCPServer |
| Posted by: | "Mohammad" (mohamm..@programminghorizon.com) |
| Date: | Thu, 1 May 2008 02:00:00 +0330 |
What's the reason of exception below? I got this exception when I attemp to
deactivate TIdTCPServer.
For each client disconnected from server i set AContext to nil in
OnDisconnect so Indy wont try to free it.
exception class : EAccessViolation
exception message : Access violation at address 7C918FEA in module
'ntdll.dll'. Write of address 00000010.
thread $834:
7c918fea +5b ntdll.dll
RtlpWaitForCriticalSection
7c901046 +41 ntdll.dll RtlEnterCriticalSection
0046b310 +10 Server.exe Classes 3135 +1 TThreadList.LockList
0046b337 +0f Server.exe Classes 3141 +1 TThreadList.Remove
0052a987 +23 Server.exe IdContext 142 +2 TIdContext.Destroy
00403c28 +08 Server.exe System 8393 +1 TObject.Free
0045b38f +1b Server.exe SysUtils 16274 +3 FreeAndNil
0052b89b +17 Server.exe IdThread 544 +1 TIdThreadWithTask.Destroy
00403c28 +08 Server.exe System 8393 +1 TObject.Free
00474d63 +93 Server.exe Classes 9382 +17 ThreadProc
00404ad8 +28 Server.exe System 11562 +33 ThreadWrapper
0044ea51 +0d Server.exe madExcept CallThreadProcSafe
0044eabb +37 Server.exe madExcept ThreadExceptFrame
Main ($85c):
7c90eb94 +000 ntdll.dll
KiFastSystemCallRet
7c90e9a9 +00a ntdll.dll
NtWaitForMultipleObjects
7c8094dc +000 kernel32.dll
WaitForMultipleObjectsEx
7e4195f3 +000 user32.dll
MsgWaitForMultipleObjectsEx
7e4196a3 +01a user32.dll
MsgWaitForMultipleObjects
004752d8 +054 Server.exe Classes 9716 +11 TThread.WaitFor
0052d29f +07b Server.exe IdTCPServer 664 +10
TIdTCPServer.TerminateListenerThreads
0052d44d +011 Server.exe IdTCPServer 730 +4 TIdTCPServer.Shutdown
0052d05d +049 Server.exe IdTCPServer 578 +12 TIdTCPServer.SetActive
00563495 +195 Server.exe ConfClass 315 +61 TConf.Destroy
00403c28 +008 Server.exe System 8393 +1 TObject.Free
00482681 +021 Server.exe Contnrs 304 +3 TObjectList.Notify
0046ab84 +08c Server.exe Classes 2779 +9 TList.Delete
0046b00e +026 Server.exe Classes 2910 +3 TList.Remove
004826aa +012 Server.exe Contnrs 310 +1 TObjectList.Remove
0056cb51 +015 Server.exe Users 1542 +1
TUserList.DestroyPrivateConf
00561f5b +01b Server.exe MainUnit 194 +1
TMainForm.DestroyPrivateConf
004b3377 +1df Server.exe Controls 4645 +53 TControl.WndProc
004b6f46 +18e Server.exe Controls 6342 +33 TWinControl.WndProc
004d0d9c +478 Server.exe Forms 3097 +103 TCustomForm.WndProc
004b6b18 +034 Server.exe Controls 6237 +3 TWinControl.MainWndProc
004771fc +014 Server.exe Classes 10966 +8 StdWndProc
7e4196c2 +00a user32.dll
DispatchMessageA
004d88b4 +0ac Server.exe Forms 6872 +13
TApplication.ProcessMessage
004d88fb +00f Server.exe Forms 6891 +1
TApplication.HandleMessage
004d8b96 +0a6 Server.exe Forms 6975 +16 TApplication.Run
0056e573 +053 Server.exe Server 29 +4 initialization
disassembling:
[...]
0046b300 3134 push ebp
0046b301 mov ebp, esp
0046b303 add esp, -8
0046b306 mov [ebp-4], eax
0046b309 3135 mov eax, [ebp-4]
0046b30c add eax, 8
0046b30f push eax
0046b310 > call -$63c85 ($407690) ;
Windows.EnterCriticalSection
0046b310
0046b315 3136 mov eax, [ebp-4]
0046b318 mov eax, [eax+4]
0046b31b mov [ebp-8], eax
0046b31e mov eax, [ebp-8]
0046b321 3137 pop ecx
0046b322 pop ecx
[...]