prog.exe exit suddenly ,help! 
Author Message
 prog.exe exit suddenly ,help!

Run your programmer under the de{*filter*} and find out why it exits.

Occasionally an access violation will cause your program to exit
silently, but the de{*filter*} will catch it.

Quote:

> Hi,

> I write a program.Below is some environment info.
> Environment:Win2000,VC6,Debug Version

> This prog.exe is run well on Machine1(NT Server,128M Memory) and
> Machine2(Win2000 Professional,128M Memory).But on Machine3(Win2000
> Professional,64M Memory),the
> prog.exe will exit suddenly sometimes and no error reported.
> What I did next are:
> 1)pulled out 64M memory from Machine2,the prog.exe also exit suddenly on
> Machine2. But
> I don't think my program need so much memory.
> 2)enlarged vitual memory of Machine3,and the result is the same:(
> 3)used BoundsChecker to check my source code and found no problem with
> memory malloc
> or free or bounds overflow.And I think if there is any memory leak or
> overflow,system will
> report "access violation" or "unhandled exception" ,But now no error
> reported.

> I need your help.Thanks in advance.

--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.*-*-*.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.


Sat, 27 Dec 2003 02:03:55 GMT  
 prog.exe exit suddenly ,help!

Quote:
> Run your programmer under the de{*filter*} and find out why it exits.

> Occasionally an access violation will cause your program to exit
> silently, but the de{*filter*} will catch it.

Thanks Bruce Dawson's suggestion.
But I haven't resolved the problem yet.

My program is a Single Document one.When click a menu item ,it
pop up a dialog,and fill the edit ,click OK to let program do something.
After program return "success" messgebox,return to  main menu.

void CCardDoc::OnMenuApply2()
{
    Apply(2);

Quote:
}

void CCardDoc::Apply(int flag)
{
        // do something
    AfxMessageBox("success",MB_OK);
    return;

Quote:
}

I run the program under de{*filter*}.Everything is normal of Apply() and
OnMenuApply2().
Then the de{*filter*} goes into mfc\wincore.cpp .At last ,de{*filter*} goes into
dissembly,and
pop up " NT.DLL0xc0000005"?It doesn't popup "NT.DLL0xc0000005" everytime
under de{*filter*}.

Any suggestion?

Thanks in advance.



Sat, 27 Dec 2003 10:37:34 GMT  
 prog.exe exit suddenly ,help!

Quote:
> Run your programmer under the de{*filter*} and find out why it exits.

> Occasionally an access violation will cause your program to exit
> silently, but the de{*filter*} will catch it.

Thanks Bruce Dawson's suggestion.
But I haven't resolved the problem yet.

My program is a Single Document one.When click a menu item ,it
pop up a dialog,and fill the edit ,click OK to let program do something.
After program return "success" messgebox,return to  main menu.

void CCardDoc::OnMenuApply2()
{
    Apply(2);

Quote:
}

void CCardDoc::Apply(int flag)
{
        // do something
    AfxMessageBox("success",MB_OK);
    return;

Quote:
}

I run the program under de{*filter*}.Everything is normal of Apply() and
OnMenuApply2().
Then the de{*filter*} goes into mfc\wincore.cpp .At last ,de{*filter*} goes into
dissembly,and
pop up " 0xcccccc5"?It doesn't popup "0xcccccc5" everytime under de{*filter*}.

Any suggestion?

Thanks in advance.



Sat, 27 Dec 2003 10:33:56 GMT  
 prog.exe exit suddenly ,help!
It looks like a bad message handler :
have you by any chance added (or removed) parameters from a MCF handler
(Onxxxx functions) ?

Something along the way of :

void CCardDoc::OnMenuApply(int flag)
{
...

Quote:
}

It would compiles OK because MFC macros cast every message handler.
Even funnier, it may run perfectly well in debug mode and crash mysteriously
in release version.
I did it once by accident, it took me half a day to find where was the
problem.

Hope it helps



Quote:


> > Run your programmer under the de{*filter*} and find out why it exits.

> > Occasionally an access violation will cause your program to exit
> > silently, but the de{*filter*} will catch it.

> Thanks Bruce Dawson's suggestion.
> But I haven't resolved the problem yet.

> My program is a Single Document one.When click a menu item ,it
> pop up a dialog,and fill the edit ,click OK to let program do something.
> After program return "success" messgebox,return to  main menu.

> void CCardDoc::OnMenuApply2()
> {
>     Apply(2);
> }
> void CCardDoc::Apply(int flag)
> {
>         // do something
>     AfxMessageBox("success",MB_OK);
>     return;
> }

> I run the program under de{*filter*}.Everything is normal of Apply() and
> OnMenuApply2().
> Then the de{*filter*} goes into mfc\wincore.cpp .At last ,de{*filter*} goes into
> dissembly,and
> pop up " NT.DLL0xc0000005"?It doesn't popup "NT.DLL0xc0000005" everytime
> under de{*filter*}.

> Any suggestion?

> Thanks in advance.



Sat, 27 Dec 2003 18:47:06 GMT  
 prog.exe exit suddenly ,help!
Usually, if the program fails when you return from a function, that is
because the stack is getting corrupted. So, this may happen overruning
a local array or a pointer to a local variable or to a parameter (even
in a function far away the exception)
Check all your local array and pointer to local variables.
This may also happen with CALLBACK function and incorrect calling
conventions, but this is less likely.

Good luck
--
Bobo



Sat, 27 Dec 2003 18:52:26 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. program exit suddenly,help!

2. Suddenly larger .exe file puzzle

3. BGI Error, when exiting prog?

4. Manually exiting prog. causes memory leaks

5. Manually exiting prog. causes memory leaks

6. starting another exe from within prog?

7. HELP EXECUTE a .exe prog within a c prog: i forgot my e-mail!!!

8. Compile a c# prog as standalone .exe

9. exit(1), exit(2), exit(3) ....???

10. Why my EXE server never exits?

11. dllhost.exe has exited with code 0...

12. On exit MSDev.exe process keeps CPU at 100%

 

 
Powered by phpBB® Forum Software