Solved

Dump on first run...

Posted on 2002-06-08
7
189 Views
Last Modified: 2013-11-20
My mfc app is set up using installshield.

On each first run after reboot - the app dumps giving a stack trace (the program has performed and illegal operation and will be shut down).
After that it runs fine each time, till the first time after boot.

What could be the reason for this to happen?
0
Comment
Question by:bflVijay
  • 4
  • 3
7 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7064206
Could be any number of things...

Have you run ths application in the VC++ debugger and isolated WHERE it is crashing?  That's usually a good placed to start.
0
 

Author Comment

by:bflVijay
ID: 7064270
The problem is that it does not crash on the development environment either debug/release mode.
On target environment (win9X) it crashes only the first time after boot. The second time it runs properly. Since there is consistency, I thought someone might have come across a similar problem...



0
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 7064275
With so little information about all I can do is guess.

Ok, so here'e my guess.  You're calling a Windows API call with an invalid parameter.  It just so happens that AFTER it fails once, it doesn't happen again until a reboot.

Why Win98 and not your unspecified development environment? (Which I assume is NOT Win98!) There are MANY MANY differences between the Win32 API as IMPEMENTED on Win9x vs. WinNT/2000/XP.

How to find it?

1) Review your code and find any places where you've used a variable without initializing it.

2) Review your code and check ALL the Win32 function calls to make sure you are using them according to DOCUMENTED specs.

3) Install your VC++ package on the target system and use its debugger.

4) Get and use a debugger like SoftICE on the target to help locate the problem.

5) Put the ::MessageBox() trace messages in your code to help isolate WHERE this problem is happening in your code.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bflVijay
ID: 7064292
The problem is that it does not crash on the development environment either debug/release mode.
On target environment (win9X) it crashes only the first time after boot. The second time it runs properly. Since there is consistency, I thought someone might have come across a similar problem...



0
 

Author Comment

by:bflVijay
ID: 7064405
The problem is that it does not crash on the development environment either debug/release mode.
On target environment (win9X) it crashes only the first time after boot. The second time it runs properly. Since there is consistency, I thought someone might have come across a similar problem...



0
 
LVL 32

Expert Comment

by:jhance
ID: 7064472
So what are we to do here?  If you cannot or will not supply any information and check the things that have been suggested, HOW CAN YOU EXPECT ANY RESOLUTION?

I gave you 5 concrete things to try and check and you've not indicated that you've checked into ANY of them!!
0
 

Author Comment

by:bflVijay
ID: 7065058
No offence intended - but the browser refresh resulted in the duplicated messages. Also I could not reply till I actually found the suggestion either useful or otherwise.

Well - I opted for option 5 (Msg Boxes) because I felt 1 or 2 was not the possible reason, I cannot have VC on the target environment (it works then!!) - and downloading SoftICE was not possible.

The dump was caused by the following lines of code in the OnSize() of my RichEditView Class (any reasons why??)

ShowScrollBar(SB_BOTH);
GetRichEditCtrl().ShowScrollBar(SB_BOTH);

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 53
sameEnds challenge 3 187
maxBlock challenge 30 145
scoreUp challenge 14 68
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

680 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