Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages
Started by mike
Wed, 22 Jun 2005 13:31
Need help with ServerSocket problem
Author: mike
Date: Wed, 22 Jun 2005 13:31
Date: Wed, 22 Jun 2005 13:31
84 lines
3343 bytes
3343 bytes
Hello, I hope someone can give me some insight into what is happening in my problem explained below. I will try and describe this problem as best I can, but if I need to provide additional information please ask me. I have a central application which has a ServerSocket defined and I open this socket in a blocking format. Each time a client connects I create a thread for the client. This all works well and I have many applications running without the following problem, but I have a case where when the thread was being created I received a call stack overflow exception. After reviewing the exception logs it appears the following was happening. -Client connects to ServerSocket - ServerSocket attempts to create the required thread - then this happens |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |7C910856|ntdll.dll | | |RtlImageNtHeader | | |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |7C910856|ntdll.dll | | |RtlImageNtHeader | | |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |7C9010ED|ntdll.dll | | |RtlLeaveCriticalSection | | |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |71A9169E|wshtcpip.dll| | |WSHGetSocketInformation | | |7C90D8ED|ntdll.dll | | |NtDeviceIoControlFile | | |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |71AA15B9|WS2HELP.dll | | |WahOpenCurrentThread | | |7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |7C9106E6|ntdll.dll | | |RtlAllocateHeap | | Once the the following starts it goes on for a long time until finally I get a call stack exception. 7C90EAF5|ntdll.dll | | |KiUserApcDispatcher | | |7C910949|ntdll.dll | | |RtlAcquirePebLock | | |7C910856|ntdll.dll | | |RtlImageNtHeader | | So it appears some kind of a loop is occuring in the ntdll.dll but I have no idea why this may be happening or how to correct it. The other thing is can I catch this exception to take some kind of action. So I hope someone can help me understand this problem and provide me som insight on how to deal with it. Thanks very much for any information, I appreciate it. Mike
Re: Need help with ServerSocket problem
Author: Steve Aletto
Date: Wed, 22 Jun 2005 15:18
Date: Wed, 22 Jun 2005 15:18
18 lines
1645 bytes
1645 bytes
> I have a central application which has a ServerSocket defined > and I open this socket in a blocking format. Each time a > client connects I create a thread for the client. This all > works well and I have many applications running without the > following problem, but I have a case where when the thread was > being created I received a call stack overflow exception. Not sure I will help, but: How do you create the thread? Suspended or not? If not Suspended, do you have any initialization code in the thread constructor? If so, then try to create the thread Suspended and then Resume it explicitly. HTH, Steve.
Re: Need help with ServerSocket problem
Author: mike
Date: Wed, 22 Jun 2005 18:21
Date: Wed, 22 Jun 2005 18:21
28 lines
1927 bytes
1927 bytes
Steve, Well thanks for answering. Hmmm I had not thought of this but sure am willing to give it a try. Wonder if this will assist in the problem. Thanks Mike "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> wrote in message news:42b9811a@newsgroups.borland.com... >> I have a central application which has a ServerSocket defined and I open >> this socket in a blocking format. Each time a client connects I create a >> thread for the client. This all works well and I have many applications >> running without the following problem, but I have a case where when the >> thread was being created I received a call stack overflow exception. > > Not sure I will help, but: > > How do you create the thread? Suspended or not? > If not Suspended, do you have any initialization code in the thread > constructor? > If so, then try to create the thread Suspended and then Resume it > explicitly. > > HTH, > > Steve. >
Re: Need help with ServerSocket problem
Author: mike
Date: Fri, 01 Jul 2005 17:00
Date: Fri, 01 Jul 2005 17:00
40 lines
2431 bytes
2431 bytes
Well it seems this may have helped the problem I have described earlier as I don't seem to be getting the problem right now. I will watch it closely and seehow it works over a longer period of time. Thanks for the information, I appreciate it. Mike "mike" <mfbrowne@earthlink.nnet> wrote in message news:42b9d65a$1@newsgroups.borland.com... > Steve, > > Well thanks for answering. Hmmm I had not thought of this but sure am > willing to give it a try. Wonder if this will assist in the problem. > > Thanks > > Mike > "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> wrote in message > news:42b9811a@newsgroups.borland.com... >>> I have a central application which has a ServerSocket defined and I open >>> this socket in a blocking format. Each time a client connects I create a >>> thread for the client. This all works well and I have many applications >>> running without the following problem, but I have a case where when the >>> thread was being created I received a call stack overflow exception. >> >> Not sure I will help, but: >> >> How do you create the thread? Suspended or not? >> If not Suspended, do you have any initialization code in the thread >> constructor? >> If so, then try to create the thread Suspended and then Resume it >> explicitly. >> >> HTH, >> >> Steve. >> > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads