Solved

Program Crash When Program minimized

Posted on 2007-04-06
4
479 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

832 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