Win 98 "Invalid Page Fault", works fine on W2K, NT 
Author Message
 Win 98 "Invalid Page Fault", works fine on W2K, NT

I have a VC++ application, winsock oriented, that I've developed on my W2K
system.  It's multi-threaded.  Runs great on W2K and NT, but generates an
error message on Win 98 that I'm failing to understand.
----------------------------------------------------------------
CLIENT caused an invalid page fault in
module KERNEL32.DLL at 0177:bff8abea.
Registers:
EAX=00000000 CS=0177 EIP=bff8abea EFLGS=00000246
EBX=00000008 SS=017f ESP=0122d400 EBP=0122d40c
ECX=0122d7f4 DS=017f ESI=0122d82c FS=4dd7
EDX=00000002 ES=017f EDI=0122d480 GS=0000
Bytes at CS:EIP:
a1 08 9d fc bf 50 e8 c3 95 fe ff ff 76 04 e8 35
Stack dump:
0122d478 00464bed 0122d82c 0122d428 004639df 0122d82c 0122d7f4 0122d7f4
00462953 0122d7f4 0122d480 00408b73 0122ff58 0122d478 00000008 cccccccc
----------------------------------------------------------------

Anybody seen this before or know of a workaround?  I don't see how my app
can cause an "invalid page fault".

ed



Sun, 25 Apr 2004 20:16:21 GMT  
 Win 98 "Invalid Page Fault", works fine on W2K, NT
Ed,

Usually it's just an attempt to write to or read from an invalid memory
address. In your case, it appears that something that is ultimately being
passed to the system is, or results in the use of, a NULL pointer since the
EAX register is zero. Without a full stack dump it's pretty much a craps
shoot. Some things you can do:

-Research and generate a .map file for your app.  This will create a listing
of all of your app's functions along with their addresses. It's takes a bit
of getting used to because the addresses aren't direct, they're based on
your module's base load address plus an offset (which is 0x400000 for an
exe) I believe (for an exe at least) you need to subtract 0x410000 from
addresses in the mapfile.
- Even a mapfile isn't going to help you directly with blowups inside of
system dll's. What you really need is a better stack dump that shows you
what part of *your* code actually called what crashed. For that, have your
user run Dr. Watson before executing your program. I believe it's
drwtsn32.exe or something similar on a win98 system. When your app dies, a
log will be created which will (hopefully) give you a more meaningful stack
dump.
- Lastly, you could compile your release build with debug symbols (.pdb's).
If you put the pdb's in the same directory as your affected dll/exe, the Dr.
Watson log should show you real function names in the stack when the crash
occurs. Then it's a matter of  tracking down what part of your code called
it (or called something else that is being a bad citizen).

Hope this sheds a little light on your little dilemma. Yes Win98 is a toy,
but boy does it help find {*filter*} little bugs. NT based systems are
notoriously more foregiving in many circumstances!

Regards,
Mike



Quote:
> I have a VC++ application, winsock oriented, that I've developed on my W2K
> system.  It's multi-threaded.  Runs great on W2K and NT, but generates an
> error message on Win 98 that I'm failing to understand.
> ----------------------------------------------------------------
> CLIENT caused an invalid page fault in
> module KERNEL32.DLL at 0177:bff8abea.
> Registers:
> EAX=00000000 CS=0177 EIP=bff8abea EFLGS=00000246
> EBX=00000008 SS=017f ESP=0122d400 EBP=0122d40c
> ECX=0122d7f4 DS=017f ESI=0122d82c FS=4dd7
> EDX=00000002 ES=017f EDI=0122d480 GS=0000
> Bytes at CS:EIP:
> a1 08 9d fc bf 50 e8 c3 95 fe ff ff 76 04 e8 35
> Stack dump:
> 0122d478 00464bed 0122d82c 0122d428 004639df 0122d82c 0122d7f4 0122d7f4
> 00462953 0122d7f4 0122d480 00408b73 0122ff58 0122d478 00000008 cccccccc
> ----------------------------------------------------------------

> Anybody seen this before or know of a workaround?  I don't see how my app
> can cause an "invalid page fault".

> ed



Sun, 25 Apr 2004 22:39:03 GMT  
 Win 98 "Invalid Page Fault", works fine on W2K, NT
Mike,
I will investigate generating the map and the stack trace as well.

One very unusual thing to add:  the error message appears very early in my
code, as I open some sockets, create some semaphores/mutexes, and launch
some threads.  When the error message does appear, if I *do not* click OK on
the popup, and just let the popup sit there, my code executes just fine, all
threads continue execution, and the program runs to absolutely normal
completion (about 5 min).  So, whatever the problem is, it is not a "real"
problem.  However, if I *do* click OK on the popup, the program is
prematurely ended.

ed



Quote:
> Ed,

> Usually it's just an attempt to write to or read from an invalid memory
> address. In your case, it appears that something that is ultimately being
> passed to the system is, or results in the use of, a NULL pointer since
the
> EAX register is zero. Without a full stack dump it's pretty much a craps
> shoot. Some things you can do:

> -Research and generate a .map file for your app.  This will create a
listing
> of all of your app's functions along with their addresses. It's takes a
bit
> of getting used to because the addresses aren't direct, they're based on
> your module's base load address plus an offset (which is 0x400000 for an
> exe) I believe (for an exe at least) you need to subtract 0x410000 from
> addresses in the mapfile.
> - Even a mapfile isn't going to help you directly with blowups inside of
> system dll's. What you really need is a better stack dump that shows you
> what part of *your* code actually called what crashed. For that, have your
> user run Dr. Watson before executing your program. I believe it's
> drwtsn32.exe or something similar on a win98 system. When your app dies, a
> log will be created which will (hopefully) give you a more meaningful
stack
> dump.
> - Lastly, you could compile your release build with debug symbols
(.pdb's).
> If you put the pdb's in the same directory as your affected dll/exe, the
Dr.
> Watson log should show you real function names in the stack when the crash
> occurs. Then it's a matter of  tracking down what part of your code called
> it (or called something else that is being a bad citizen).

> Hope this sheds a little light on your little dilemma. Yes Win98 is a toy,
> but boy does it help find {*filter*} little bugs. NT based systems are
> notoriously more foregiving in many circumstances!

> Regards,
> Mike



> > I have a VC++ application, winsock oriented, that I've developed on my
W2K
> > system.  It's multi-threaded.  Runs great on W2K and NT, but generates
an
> > error message on Win 98 that I'm failing to understand.
> > ----------------------------------------------------------------
> > CLIENT caused an invalid page fault in
> > module KERNEL32.DLL at 0177:bff8abea.
> > Registers:
> > EAX=00000000 CS=0177 EIP=bff8abea EFLGS=00000246
> > EBX=00000008 SS=017f ESP=0122d400 EBP=0122d40c
> > ECX=0122d7f4 DS=017f ESI=0122d82c FS=4dd7
> > EDX=00000002 ES=017f EDI=0122d480 GS=0000
> > Bytes at CS:EIP:
> > a1 08 9d fc bf 50 e8 c3 95 fe ff ff 76 04 e8 35
> > Stack dump:
> > 0122d478 00464bed 0122d82c 0122d428 004639df 0122d82c 0122d7f4 0122d7f4
> > 00462953 0122d7f4 0122d480 00408b73 0122ff58 0122d478 00000008 cccccccc
> > ----------------------------------------------------------------

> > Anybody seen this before or know of a workaround?  I don't see how my
app
> > can cause an "invalid page fault".

> > ed



Mon, 26 Apr 2004 01:06:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems running MDI app on w2k,se platform, works fine on 95, 98, NT4 (wks, see)

2. Program runs ONCE in 98/ME, works fine in Xp/NT/2000

3. "It works fine under the debugger..."

4. Win 2000 built OCX won't load on a WIn NT or 98 system

5. Problem: Developing on Win 98 and running on Win NT

6. Printing on Win NT Vs. Win 98 ?

7. Problem: Develop on Win 98 and run on Win NT

8. Problem: Developing on Win 98 and running on Win NT

9. Win NT vs Win 95/98

10. "New Win95/98 Menu/Toolbar Interface"

11. Directorytree for W95/98/NT/W2K

12. 95/98 "Out of Environment Space"

 

 
Powered by phpBB® Forum Software