Solved

Strange occurances with MFC App

Posted on 2000-04-19
7
177 Views
Last Modified: 2013-11-20
Hi,

I've got a strange problem, that I was hoping someone could shread some light on, or point me in the right direction.

I have a MFC Dialog Application (VC 6, SP3), which has about 12 screens.  During testing I've found no problems.  

My problem is that the system is now live on a crane system.  After a time a couple of buttons dissappear from one of the displays (always same buttons I think).  More strange is that a certain screen (always the same one) shrinks.  All the buttons/edit boxes on the form shrink to the top left, to such a level that the buttons are almost too small to push.

Re-booting the machine solves the problem.  The time-span until this problem arises differs.  Unfortuantetly I have not been present during any of these funnies, and just working on reports that I've been given.

I originally wrote the program in VC 5, no serices packs, and when the problem arose moved to the latest version, but the funnies keep happening.

I appreciate that I've been vague, but this is all I have to work on at the moment, until more reports come in.

Any ideas will be greatly appreciated.

Lee.
0
Comment
Question by:LeeOgley
  • 3
  • 3
7 Comments
 
LVL 11

Expert Comment

by:mikeblas
ID: 2731510
Sounds like you're leaking resources in USER. I think you should do some more aggressive testing--maybe try a tool like BoundsChecker to detect leaks, or do some code reviews with your team.

..B ekiM
0
 
LVL 4

Expert Comment

by:inpras
ID: 2735229
Increase the RAM on other m/c where UR running application.
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2736941
More memory will delay the onset the symptoms. I think Lee wants to eradicate their cause.

..B ekiM
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:LeeOgley
ID: 2755623
mikeblas,

I thought of this, but I don't use commands like new or memalloc anywhere, could I still be leaking resources.

Lee.
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 75 total points
ID: 2756097
new isn't a command, it's an operator. I've never heard of memalloc; do you mean malloc()?

Anyway, yes. You might leak memory by misusing other classes without calling those functions directly, yourself.

But those functions never leak resources. If you're incorrectly creating, using, or not properly destroying Windows resources--like Windows, atoms, brushes, pens, fonts, synchronization objects, and so on, you'll leak them.

..B ekiM
0
 

Author Comment

by:LeeOgley
ID: 2816215
not a viable solution, would only delay onset of problem
0
 

Author Comment

by:LeeOgley
ID: 2816218
this is probably the problem - just hard to trace

thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

22 Experts available now in Live!

Get 1:1 Help Now