Re: EXE terminates automatically.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thank you for your response,Tom.

1. Application doesnt have "exit" statements.
2. Handled exceptions are also fine.
3. Memory leaks: I am guessing here. I have to find out all leaks. Actually
it is developed by somebody else. I have to find out memory leaks. Is there
any easiet way to find out leaks using tools or libraries?


--
Thanks & Regards,
siri.


"Tom Serface" wrote:

There are lots of reasons your program could terminate automatically.
Unhandled exceptions, someone calling exit() in a subroutine, etc.

If you compile in debug mode you'll get more information about both the
termination (if it's an unhandled exception) or memory leaks (in the output
window).

Tom

"Durga" <Durga@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0A3D466B-938D-45D1-8928-4CAFA30B5899@xxxxxxxxxxxxxxxx
Hi all,

I have developed one application with support of "Win32 console
application and MFC". I used sockets(OpenSSL), threads (are created using
AfxBeginThread),Databases.

It works fine for some connections.

But my application is terminating automatically. I couldn't simulate
this.
What may be the problem?

How do I find memory leaks? Any freewares available in the net?

Please suggest me if available.

In which scenarios, exe applications terminates automatically?

Please give me your ideas.

I tried to find memory leaks using below code snippet. But I didnt get
memory leaks.
It is giving always memory leaks.

code:
#ifdef _DEBUG
CMemoryState oldMemState, newMemState, diffMemState;
oldMemState.Checkpoint();
#endif


#ifdef _DEBUG
newMemState.Checkpoint();
if( diffMemState.Difference( oldMemState, newMemState ) )
{
//TRACE( "Memory leaked!\n" );
AfxMessageBox(" Memory leaked!\n");
}
#endif


Are there any limitations with sockets? I am load balance also.
My application terminates automatically. why?
sometimes it is giving, "Abnormal program termination" dialog box.



.



Relevant Pages

  • Re: VS_VERSION_INFO static ctrl
    ... It had better throw exceptions! ... I already pointed out, you did not initialize it, ... if(lpVersionInfo) ... spend brain cycles:) to track these kind of memory leaks. ...
    (microsoft.public.vc.mfc)
  • Re: Structured Exception Handling and Resume Next
    ... problems with memory leaks, but you should write it like this (note this ... just an example and not a a guideline to which exceptions you always should ... is it true then that if I have multiple lines ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: memory leaks in 2.6.6...
    ... > Thanks to smatch I have found few memory leaks and other related issues ... See the patch in attachment. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: memory leak?
    ... It depends on what you mean by "near the exit of the program". ... The C debug runtime does ... its check for memory leaks before static destructors are called, and I'm not sure where it ...
    (microsoft.public.vc.mfc)
  • Re: Problems with using auto_ptr and _CRTDBG_MAP_ALLOC
    ... memory leaks in my application development by doing the following: ... That shouldn't compile, and only does due to a serious bug in VC8's ...
    (microsoft.public.vc.language)