Solved

Program Crash When Program minimized

Posted on 2007-04-06
4
471 Views
Last Modified: 2013-12-14
I have a C++ MFC application.  I recently started having the following problem: if I leave it running in the background (minimized ) for 10 or 15 minutes, when I eventually come back to it (select it in the taskbar), my application's windows draw very strangely, and the program crashes. By "strange", I mean that the windows that should be positioned at the bottom of the screen draw at the top, but without borders, when I select menu items, a dialog displays with another window inside it (that isn't supposed to be there), etc.  I get assert error messages also.  

I must note that this problem does NOT happen if I leave my application running and keep it in focus (ie, I DON'T minimize it).

Any help would be greatly appreciated.

0
Comment
Question by:clintMon
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
bikvi_sibro earned 250 total points
ID: 18864414
The first thought that comes to mind is that it might be a refresh issue.  Try running the debugger through the refresh process and see what happens when it is trying to restore itself.
0
 

Author Comment

by:clintMon
ID: 18864602
When you say "refresh process", what specifically do you mean?  Window redrawing?  OnSetActive() routines?
0
 
LVL 8

Assisted Solution

by:mxjijo
mxjijo earned 250 total points
ID: 18865256

Apparently its is hard to say what causing it. You should try to narrow down the problem.
Pls tell us as many details as possible.

1) What does this application do  ?
2) What is the earliest point you got the prob ?
3) Are you doing any large memory handling ?
4) What does the ASSERT say ?
You should be attaching the debugger when the assert/crash happens and  
0
 
LVL 8

Expert Comment

by:mxjijo
ID: 18865281
oops.. hit submit by mistake ..

You should be attaching the debugger when the assert/crash happens and  check the stack trace.
5) As bikvi_sibro suggested, start the app from the debugger and see what happens.

good luck.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now