Solved

VB6 invalid page fault in MFC42.DLL

Posted on 2001-08-30
15
566 Views
Last Modified: 2008-02-01
I am having trouble with the VB6 (SP5) IDE crashing as it completes execution of a program.

It raises the following errors:

VB6 caused an invalid page fault in
module MFC42.DLL at 0157:5f407140.
Registers:
EAX=057a0810 CS=0157 EIP=5f407140 EFLGS=00010246
EBX=11013854 SS=015f ESP=007ff7c8 EBP=007ff7e4
ECX=02d33550 DS=015f ESI=02d33550 FS=0cd7
EDX=817bf72c ES=015f EDI=00000000 GS=0000
Bytes at CS:EIP:
ff 50 18 8b 45 f0 8b 4d ec 89 48 04 eb 35 8b 41
Stack dump:
00000000 110138a4 00000000 005f770c 007ffe28 5f4964ab 00000000 007ff810 5f416a72 660292dc 02d33560 110138a4 11013854 11013854 007ff81c 00000000

then:

VB6 caused an invalid page fault in
module SSSCC.DLL at 0157:60550eb3.
Registers:
EAX=00000000 CS=0157 EIP=60550eb3 EFLGS=00010246
EBX=60480000 SS=015f ESP=03d6fbe0 EBP=03d6fc10
ECX=00000000 DS=015f ESI=03860650 FS=4e8f
EDX=817fb990 ES=015f EDI=00000001 GS=0cc6
Bytes at CS:EIP:
8b 71 04 85 f6 57 74 23 8b 7c 24 0c 33 d2 8b c7
Stack dump:
03860650 60554198 00000e68 60480000 00000001 03860650 60553ffa 03860650 03860650 03d6fc20 6056ed2c 00000000 03d6fc2c 6055f583 03860650 03860650

I am using version 6.00.8665.0 of MFC42.dll and version 06.00.8987 of sssc.dll, running on Windows 95.

Any thoughts?

Jon.
0
Comment
Question by:LordSauce
  • 5
  • 4
  • 3
  • +3
15 Comments
 
LVL 20

Expert Comment

by:hes
ID: 6441436
Check to see if you have more than 1 mfc32.dll on your system. If you do rename all of the mfc42.dll except for the one in the windows\system folder.
0
 

Author Comment

by:LordSauce
ID: 6441503
Tried renaming the second copy I found - no change.
0
 
LVL 27

Expert Comment

by:Ark
ID: 6443625
Hi
First dump:
>>EDI=00000000<< usually pointer to a function. It means that some API function not present/incorrect version.
second dump:
>>EAX=00000000<< >>ECX=00000000<< this regisers usually use for memory addresses to copy. Zero address cause GPF.

AFAIK, MFC42 was developed for win95 OSR2 and higher, so if you haven't OSR2 pack for w95, some functions may not be present. Try to install OSR2 for w95, or better w98.

Cheers
0
 
LVL 2

Expert Comment

by:JaganMohan
ID: 6443710
Try this

Replace MFC42.DLL located in windows\system with the MFC42.DLL from Visual Studio CD os\system.


or

If Microsoft Visual SourceSafe is integrated with Visual Basic:

Click Start, and then click Run. Type the following commands in the text box:


regsvr32 "<x>:\<path>\ssscc.dll"

where <x>:\<path> is the location of the Ssscc.dll file



If Microsoft Visual SourceSafe is not integrated with Visual Basic:

1. Start Visual Basic.
2. From the Add-Ins menu, click Add-In-Manager.
3. Under Available Add-Ins, select Source Code Control.
4. In the Loaded Behavior option box, clear the Loaded/Unloaded and Load on Startup check boxes.
5. Exit Visual Basic.


0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6451713
Sounds like you are in DLL hell.

An older copy of MFC42 has been installed and registered on your computer by the looks of it.

Question 1 when did this happen. i.e. after a install of another application ?

Ok try the following:

Reapply Service pack 5 for Visual Studio this should install the correct version of MFC42

If this has happened I'd say other DLL's have been copied over also. So reapplying the service pack may solve this.

Vin.





0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6451716
A note to JaganMohan.

It's common practice to post comments not propose answers on this forum.

Please look at the guidelines for proposing answers.
 
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp

Vin.
0
 

Author Comment

by:LordSauce
ID: 6452529
Thanks all for your comments.

Ark - not sure how to tell if I'm on OSR2 or not - system properties says MS Win 95 4.00.950 B.

JaganMohan - VSS is integrated with VB, the dll is registered, no change. Also, replaced MFC42.dll with the one from the SP5 CD, still no change.

Vin - Not quite sure what originally happened to cause the problem. Since I originally posted I've re-installed VB and SP5 - problem still occurs.

One thing which seems strange to me is that it the crash does not happen every time I use VB - I can cause it by creating a project with a reference to a certain ActiveX dll, but if the project for the dll is added then it stops crashing... Without a reference to the dll VB seems much more stable.
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.

 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6452573
Have you tried rebuilding the other DLL it sounds like it is expecting an newer version of MFC42 for example if it was developed with VC++ 6 and you are using VB5.

Vin.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6452580
Sorry about that you are using VB6.

Another thing that Microsoft in their wisdom have done is changed the ordinal numbers on some of the DLL entry points in MFC42.
Try rebuilding the other DLL in your current environment.

Vin.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6452588
Forgot to mention they did this between sp3 and sp5 of Visual Studio causing all kinds of trouble.

Vin.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6697162
If this proposed answer has helped you, please accept it, grade it and close this question.  If it did not, reject it and add comments as to your progress and what else is needed.  If no action is taken here by next week, we'll need to decide this outcome.  Expert input always welcome as well.

Thanks,
Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:LordSauce
ID: 6721291
As explained in comments of 09/04/2001 01:26AM PST, the proposed answer did not work.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6721474
Would you like a refund for this so that I can close it and move it to the PAQ, after which you can repost, include this link and draw current attention?  This is a very high volume topic area and few are likely to find questions this old.

Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:LordSauce
ID: 6723113
Moondancer - thanks, that sounds like a good plan.
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6724186
LordSauce --->  Thanks for the update.

I have refunded these points to you and will now close it by moving it at zero points to our PAQ.

You can now post it new, if you wish, to draw current attention, and include this link so that you don't have to bother rekeying information already provided here.

Good luck on achieving your goal in excellent style.

Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 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

20 Experts available now in Live!

Get 1:1 Help Now