Solved

Dump on first run...

Posted on 2002-06-08
7
180 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 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