Nasty debugging problem 
Author Message
 Nasty debugging problem

I have a VC++ application that is crashing with an "In Page Error".
I have my own Dr-Watson style dump and the exception address.

Both crashes are at function entry, entering two different functions.
The only thing happening at this line in both functions is a push ebp, part
of the function prolog.
This line saves the stack frame register and is generated by the complier.
Both functions that are crashing have no arguments and are members of a
class, with no calling convention specified.  This means that they will have
the thiscall calling convention.

I suspect that the problem has something to do with the stack, calling
convention, or memory corruption of some kind. I have only been able to
determine one thing that both crashes have in common: It is both at push
ebp, and the ebp register contains the same value in both crashes. It seems
that is OK, because all the activity takes place at the top of the stack so
it is likely this could be valid.

I have been beating my head against the wall, reading $50 debugging books to
no avail.

Anybody seen something like this before or have some advice?
I have included the two crash dumps below for those interested.
Thanks in advance.
Scott

EDM32 caused an In Page Error in module EDM32.EXE at 0157:00412628.
Exception handler called in Main Thread.
Error occurred at 1/19/2001 09:27:16.
M:\EDM32CS\EDM32.EXE, run by enp.
1 processor(s), type 586.
128 MBytes physical memory.

Registers:
EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
Bytes at CS:EIP:
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Stack dump:
0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111 0059f6d8
5f402a49
0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c 00000000
00000000
0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000 00000000
00000000
0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008 00000000
00000000
0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d 005b4d8d
0056023c
0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000 00000000
0059f7cc
0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c 00000000
0059f7cc
0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c 0059f868
00000b0c
0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
00000008
0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79 ffffffff
0059f7ec
0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111 00000000
0059f84c
0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c 0059f8e8
00000b0c
0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
00000008
0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1 00000000
0059f868
0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c 0059f894
5f401a33
0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c 0059f8d0
5f492b6d
0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008 00000b0c
88e6413f
0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000 bff7197c
00598906
0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000 02020000
89440000
0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7 16af3bfa
00000004
0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8 01110ae8
00000008
0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7 89888ddc
00030000
0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580 00028ddc
00fa168f
0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580 075689a2
0000174f
0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8 37f70002
00008a50
0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50 1d5e89ec
89e00147
0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00 00001777
000d001c
0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777 001c0000
0000000d
0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000 0000000d
0b0c0202
0059fa30: 174f102e 02020b0c 00000000 000d001c 00000000 c02a0000 00050000
16af2c18
0059fa50: bff714d9 014f0157 0059fa60 8a70015f 00001177 005b4d8d 005b4d8d
0056023c
0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c 00000202 00000000 000d001c
005b4d8d
0059fa90: 0059faac 5f401b7a 00000202 00000000 000d001c 00000202 00000000
0059fb0c
0059fab0: 5f401aec 00000202 00000000 000d001c 0059fb5c 00008bca 0059fba6
00000000
0059fad0: 00000000 00000000 00000000 00000000 00000000 00000000 5f401018
00000008
0059faf0: 0059fb5c 00008bca 0056023c 0059fac0 0059fb48 5f492bf1 00000000
0059fb28
0059fb10: 5f401a74 00000000 00000b0c 00000202 00000000 000d001c 0059fb54
5f401a33
0059fb30: 00000b0c 00000202 00000000 000d001c 00000000 0056023c 0059fb90
5f492b6d
0059fb50: 00000000 0059fb74 bff735d9 00000b0c 00000202 00000000 000d001c
8ba4396f
0059fb70: 0000015f 0059fb88 bff9222f 413f8bca 0000413f 00000000 bff7197c
00008bc4
0059fb90: 0059fd78 bff71831 8ba4396f 00000000 413f8ba4 00000000 00000246
00028c02
0059fbb0: 00023b2e 0000168f 01472737 413f0000 413f8bca 3bfa8c08 000416af
00000000
0059fbd0: 19fa0000 001c5f40 0000000d 02020000 0b0c0000 0b0c0000 00000202
001c0000
0059fbf0: 7a1b000d 00000001 0000c02a 000116af 413f413f 8c7c7580 00008c34
19fa0003
0059fc10: 0e915f40 00001777 000d001c 02020000 02020b0c 168f0b0c 00027580
00028c7c
0059fc30: 022e0229 41718c5c 0001174f 140f09c2 8cac168f ea0c0000 00000044
7580413f
0059fc50: 00020002 00000000 00027580 47c38c6e 0001174f 413f8c7c 00028ddc
8cac47c8
0059fc70: 16af388a 8c7c0001 0ae8413f 02020b0c 001c0000 3b55000d 01ee005b
0000028d
0059fc90: 02020b0c 00000000 000d001c 5f401018 c02a0000 00040000 16af2c18
bff714d9
0059fcb0: 00000157 0059fcbc 0059015f 00001177 0044ea0c 005b4c14 00000000
0044ea0c
0059fcd0: 5f418a9d 00000002 00000ae8 00000000 0044ea0c 005b4c14 5f404195
0044ea0c
0059fcf0: 5f418a68 0044ea0c 0044ea0c 00000ae8 5f4014ce 0044ea0c 0044ea0c
007329e0
0059fd10: 5f40147a 000004ac 0044ea0c 0044ea0c 0044e9d8 5f401316 0044ea0c
00000000
0059fd30: 0044e9d8 5f40c34b 00000000 0044e9d8 0059fd88 00000000 00000002
5f40c2fb
0059fd50: 8175652b 00434dbf 00000000 8175652b 00000000 00433eeb ffffffff
0044e9d8
0059fd70: 0059fd58 0059f4c0 0059fe28 00437702 00440f90 00000000 0059fe38
00437fe5
0059fd90: 00400000 00000000 8175652b 00000001 00437510 00400000 00000000
8175652b
0059fdb0: 00000001 00000000 81756398 00580000 0059ff68 8175652b 00730e70
00000000
0059fdd0: 00000000 00730e00 00000001 00000044 00000000 00000000 00000000
00000000
0059fdf0: 00000000 00000000 00000000 00000000 00000000 00000000 00000001
00000001
0059fe10: 00000000 00000000 00000000 00000000 0059fdb4 81756398 0059ff68
00437702
0059fe30: 00441128 00000000 0059ff78 bff89349 00000000 81756398 00580000
336d6445
0059fe50: 58450032 00000045 00000000 00000000 00000000 00000000 00000000
00000000
0059fe70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059fe90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059feb0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059fed0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059fef0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059ff10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059ff30: 00000000 00000000 00000040 81756584 c0f5bf20 bff7873e 81707050
004373dc
0059ff50: bff79957 00000000 817563b8 39160000 0059fe40 00580000 ffffffff
bffb88a8
0059ff70: bff780b0 00000000 0059fff4 bff891fb 817565a4 00000008 81756398
00000000
0059ff90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059ffb0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0059ffd0: 0002ffff 0000f259 0059e000 005a0000 00000000 ffffffff 8173f408
00000000
0059fff0: 38273916 82d06fec bff87c38 00000000

 Module list: names, addresses, sizes, time stamps and file times:
M:\EDM32CS\EDM32.EXE, loaded at 0x00400000 - 364588 bytes - 3a64eb30 - file
date is 1/16/2001 16:45:36
C:\WINDOWS\SYSTEM\WS2_32.DLL, loaded at 0x00710000 - 55808 bytes -
349849b7 - file date is 3/20/1998 18:00:00
C:\WINDOWS\SYSTEM\MSWSOCK.DLL, loaded at 0x00940000 - 70144 bytes -
34db8c3e - file date is 3/20/1998 18:00:00
C:\WINDOWS\SYSTEM\MSAFD.DLL, loaded at 0x05270000 - 27648 bytes - 34984c8f -
file date is 3/20/1998 18:00:00
C:\PROGRAM FILES\MICROSOFT HARDWARE\MOUSE\MSH_ZWF.DLL, loaded at
0x0d2d0000 - 41984 bytes - 351b41ef - file date is 3/23/1998 00:00:00
M:\EDM32CS\C4DLL.DLL, loaded at 0x10000000 - 339968 bytes - 39060c07 - file
date is 4/25/2000 15:20:10
C:\WINDOWS\SYSTEM\MFC42.DLL, loaded at 0x5f400000 - 995383 bytes -
360d2836 - file date is 9/26/1998 00:00:00
C:\WINDOWS\SYSTEM\WININET.DLL, loaded at 0x70200000 - 459024 bytes -
36f1d8d8 - file date is 3/18/1999 00:00:00
C:\WINDOWS\SYSTEM\SHLWAPI.DLL, loaded at 0x70bd0000 - 282896 bytes -
36f1d8da - file date is 3/18/1999 00:00:00
C:\WINDOWS\SYSTEM\SHFOLDER.DLL, loaded at 0x71760000 - 37632 bytes -
36f1d8e1 - file date is 3/18/1999 00:00:00
C:\WINDOWS\SYSTEM\MSVCRT.DLL, loaded at 0x78000000 - 266293 bytes -
36b69d5d - file date is 2/2/1999 00:00:00
C:\WINDOWS\SYSTEM\WS2HELP.DLL, loaded at 0x79800000 - 5120 bytes -
34984899 - file date is 3/20/1998 18:00:00
C:\WINDOWS\SYSTEM\WSOCK32.DLL, loaded at 0x7a000000 - 21504 bytes -
34984b0e - file date is 3/20/1998 18:00:00
C:\WINDOWS\SYSTEM\SHELL32.DLL, loaded at 0x7fdc0000 - 819200 bytes -
320d0368 - file date is 8/24/1996 11:11:10
C:\WINDOWS\SYSTEM\COMDLG32.DLL, loaded at 0x7fe90000 - 92672 bytes -
320d0367 - file date is 8/24/1996 11:11:10
C:\WINDOWS\SYSTEM\COMCTL32.DLL, loaded at 0xbfb70000 - 577808 bytes -
36f1d8d8 - file date is 3/18/1999 00:00:00
C:\WINDOWS\SYSTEM\VERSION.DLL, loaded at 0xbfeb0000 - 6656 bytes -
320d0358 - file date is 8/24/1996 11:11:10
C:\WINDOWS\SYSTEM\ADVAPI32.DLL, loaded at 0xbfed0000 - 41472 bytes -
326768d3 - file date is 3/18/1999 00:00:00 ...

read more »



Thu, 10 Jul 2003 05:49:57 GMT  
 Nasty debugging problem
Being curious what an 'in page error' is anyway as I've never seen one
of those I did a google search. This is an excerpt from what I found in
some mailing list :

Quote:
> EXCEPTION_IN_PAGE_ERROR = $C0000006;
>{The thread tried to access a page that was not present, and the system was
>unable to load the page. For example, this exception might occur if a
>network connection is lost while running a program over the network.}

Hope this helps...


Thu, 10 Jul 2003 06:56:20 GMT  
 Nasty debugging problem
Hey - you're using my exception handler! Cool!

Note the Bytes at CS:EIP section - it's all question marks. That means
that the code was not readable. In order to execute code, the CPU needs
to be able to read it - so that's why you crashed.

Why was the code not re adable? Dunno. Could be a bad hard-drive,
dirty CD, or something. Whatever the program was stored on was
getting a read error. This sort of problem most commonly happens
with CD-ROMs I think.

The specific instruction is not relevant - because the instruction never
made it to the CPU.

Quote:

> I have a VC++ application that is crashing with an "In Page Error".
> I have my own Dr-Watson style dump and the exception address.

> Both crashes are at function entry, entering two different functions.
> The only thing happening at this line in both functions is a push ebp, part
> of the function prolog.
> This line saves the stack frame register and is generated by the complier.
> Both functions that are crashing have no arguments and are members of a
> class, with no calling convention specified.  This means that they will have
> the thiscall calling convention.

> I suspect that the problem has something to do with the stack, calling
> convention, or memory corruption of some kind. I have only been able to
> determine one thing that both crashes have in common: It is both at push
> ebp, and the ebp register contains the same value in both crashes. It seems
> that is OK, because all the activity takes place at the top of the stack so
> it is likely this could be valid.

> I have been beating my head against the wall, reading $50 debugging books to
> no avail.

> Anybody seen something like this before or have some advice?
> I have included the two crash dumps below for those interested.
> Thanks in advance.
> Scott

> EDM32 caused an In Page Error in module EDM32.EXE at 0157:00412628.
> Exception handler called in Main Thread.
> Error occurred at 1/19/2001 09:27:16.
> M:\EDM32CS\EDM32.EXE, run by enp.
> 1 processor(s), type 586.
> 128 MBytes physical memory.

> Registers:
> EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> Bytes at CS:EIP:
> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> Stack dump:
> 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111 0059f6d8
> 5f402a49
> 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c 00000000
> 00000000
> 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000 00000000
> 00000000
> 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008 00000000
> 00000000
> 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d 005b4d8d
> 0056023c
> 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000 00000000
> 0059f7cc
> 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c 00000000
> 0059f7cc
> 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c 0059f868
> 00000b0c
> 0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> 00000008
> 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79 ffffffff
> 0059f7ec
> 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111 00000000
> 0059f84c
> 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c 0059f8e8
> 00000b0c
> 0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> 00000008
> 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1 00000000
> 0059f868
> 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c 0059f894
> 5f401a33
> 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c 0059f8d0
> 5f492b6d
> 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008 00000b0c
> 88e6413f
> 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000 bff7197c
> 00598906
> 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000 02020000
> 89440000
> 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7 16af3bfa
> 00000004
> 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8 01110ae8
> 00000008
> 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7 89888ddc
> 00030000
> 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580 00028ddc
> 00fa168f
> 0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580 075689a2
> 0000174f
> 0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8 37f70002
> 00008a50
> 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50 1d5e89ec
> 89e00147
> 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00 00001777
> 000d001c
> 0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777 001c0000
> 0000000d
> 0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000 0000000d
> 0b0c0202
> 0059fa30: 174f102e 02020b0c 00000000 000d001c 00000000 c02a0000 00050000
> 16af2c18
> 0059fa50: bff714d9 014f0157 0059fa60 8a70015f 00001177 005b4d8d 005b4d8d
> 0056023c
> 0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c 00000202 00000000 000d001c
> 005b4d8d
> 0059fa90: 0059faac 5f401b7a 00000202 00000000 000d001c 00000202 00000000
> 0059fb0c
> 0059fab0: 5f401aec 00000202 00000000 000d001c 0059fb5c 00008bca 0059fba6
> 00000000
> 0059fad0: 00000000 00000000 00000000 00000000 00000000 00000000 5f401018
> 00000008
> 0059faf0: 0059fb5c 00008bca 0056023c 0059fac0 0059fb48 5f492bf1 00000000
> 0059fb28
> 0059fb10: 5f401a74 00000000 00000b0c 00000202 00000000 000d001c 0059fb54
> 5f401a33
> 0059fb30: 00000b0c 00000202 00000000 000d001c 00000000 0056023c 0059fb90
> 5f492b6d
> 0059fb50: 00000000 0059fb74 bff735d9 00000b0c 00000202 00000000 000d001c
> 8ba4396f
> 0059fb70: 0000015f 0059fb88 bff9222f 413f8bca 0000413f 00000000 bff7197c
> 00008bc4
> 0059fb90: 0059fd78 bff71831 8ba4396f 00000000 413f8ba4 00000000 00000246
> 00028c02
> 0059fbb0: 00023b2e 0000168f 01472737 413f0000 413f8bca 3bfa8c08 000416af
> 00000000
> 0059fbd0: 19fa0000 001c5f40 0000000d 02020000 0b0c0000 0b0c0000 00000202
> 001c0000
> 0059fbf0: 7a1b000d 00000001 0000c02a 000116af 413f413f 8c7c7580 00008c34
> 19fa0003
> 0059fc10: 0e915f40 00001777 000d001c 02020000 02020b0c 168f0b0c 00027580
> 00028c7c
> 0059fc30: 022e0229 41718c5c 0001174f 140f09c2 8cac168f ea0c0000 00000044
> 7580413f
> 0059fc50: 00020002 00000000 00027580 47c38c6e 0001174f 413f8c7c 00028ddc
> 8cac47c8
> 0059fc70: 16af388a 8c7c0001 0ae8413f 02020b0c 001c0000 3b55000d 01ee005b
> 0000028d
> 0059fc90: 02020b0c 00000000 000d001c 5f401018 c02a0000 00040000 16af2c18
> bff714d9
> 0059fcb0: 00000157 0059fcbc 0059015f 00001177 0044ea0c 005b4c14 00000000
> 0044ea0c
> 0059fcd0: 5f418a9d 00000002 00000ae8 00000000 0044ea0c 005b4c14 5f404195
> 0044ea0c
> 0059fcf0: 5f418a68 0044ea0c 0044ea0c 00000ae8 5f4014ce 0044ea0c 0044ea0c
> 007329e0
> 0059fd10: 5f40147a 000004ac 0044ea0c 0044ea0c 0044e9d8 5f401316 0044ea0c
> 00000000
> 0059fd30: 0044e9d8 5f40c34b 00000000 0044e9d8 0059fd88 00000000 00000002
> 5f40c2fb
> 0059fd50: 8175652b 00434dbf 00000000 8175652b 00000000 00433eeb ffffffff
> 0044e9d8
> 0059fd70: 0059fd58 0059f4c0 0059fe28 00437702 00440f90 00000000 0059fe38
> 00437fe5
> 0059fd90: 00400000 00000000 8175652b 00000001 00437510 00400000 00000000
> 8175652b
> 0059fdb0: 00000001 00000000 81756398 00580000 0059ff68 8175652b 00730e70
> 00000000
> 0059fdd0: 00000000 00730e00 00000001 00000044 00000000 00000000 00000000
> 00000000
> 0059fdf0: 00000000 00000000 00000000 00000000 00000000 00000000 00000001
> 00000001
> 0059fe10: 00000000 00000000 00000000 00000000 0059fdb4 81756398 0059ff68
> 00437702
> 0059fe30: 00441128 00000000 0059ff78 bff89349 00000000 81756398 00580000
> 336d6445
> 0059fe50: 58450032 00000045 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059fe70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059fe90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059feb0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059fed0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059fef0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059ff10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059ff30: 00000000 00000000 00000040 81756584 c0f5bf20 bff7873e 81707050
> 004373dc
> 0059ff50: bff79957 00000000 817563b8 39160000 0059fe40 00580000 ffffffff
> bffb88a8
> 0059ff70: bff780b0 00000000 0059fff4 bff891fb 817565a4 00000008 81756398
> 00000000
> 0059ff90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059ffb0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 0059ffd0: 0002ffff 0000f259 0059e000 005a0000 00000000 ffffffff 8173f408
> 00000000
> 0059fff0: 38273916 82d06fec bff87c38 00000000

>  Module list: names, addresses, sizes, time stamps and file times:
> M:\EDM32CS\EDM32.EXE, loaded at 0x00400000 - 364588 bytes - 3a64eb30 - file
> date is 1/16/2001 16:45:36
> C:\WINDOWS\SYSTEM\WS2_32.DLL, loaded at 0x00710000 - 55808 bytes -
> 349849b7 - file date is 3/20/1998 18:00:00
> C:\WINDOWS\SYSTEM\MSWSOCK.DLL, loaded at 0x00940000 - 70144 bytes -
> 34db8c3e - file date is 3/20/1998 18:00:00
> C:\WINDOWS\SYSTEM\MSAFD.DLL, loaded at 0x05270000 - 27648 bytes - 34984c8f -
> file date is 3/20/1998 18:00:00
> C:\PROGRAM FILES\MICROSOFT HARDWARE\MOUSE\MSH_ZWF.DLL, loaded at
> 0x0d2d0000 - 41984 bytes - 351b41ef - file date is 3/23/1998 00:00:00
> M:\EDM32CS\C4DLL.DLL, loaded at 0x10000000 - 339968 bytes - 39060c07 - file
> date is 4/25/2000 15:20:10
> C:\WINDOWS\SYSTEM\MFC42.DLL, loaded at 0x5f400000 - 995383 bytes -
> 360d2836 - file date is 9/26/1998 00:00:00
> C:\WINDOWS\SYSTEM\WININET.DLL, loaded at 0x70200000 - 459024 bytes -
> 36f1d8d8 - file date is 3/18/1999 00:00:00
> C:\WINDOWS\SYSTEM\SHLWAPI.DLL, loaded at 0x70bd0000 - 282896 bytes -
> 36f1d8da - file date is 3/18/1999 00:00:00
> C:\WINDOWS\SYSTEM\SHFOLDER.DLL,

...

read more »



Sat, 12 Jul 2003 01:48:09 GMT  
 Nasty debugging problem
Bruce,
I replied to you earlier using Deja, but I didn't see it show up so I'm
doing it again. Sorry if this makes a duplicate message.
Yes, I'm using your exception handler. I got it from a post you made on
another thread last week. It has saved me a lot of time, thanks much!
I am having a problem with your exception handler though, I don't think it
is logging all the errors. The users are sending me screen shots of crashes
that are not getting logged.
I suspect there are some additional crash handling methods that I need to
implement to trap the rest of the errors. Have you researched this? I bought
some fairly expensive debugging books and have been reading up, but haven't
got to coding yet.
I suspect that I need to implement the _set_se_translator and
SetUnhandledExceptionFilter methods of trapping errors as documented in John
Robbins' book. Have you also had problems getting all the errors logged?
Thanks again for your exception handler!
Scott


Quote:
> Hey - you're using my exception handler! Cool!

> Note the Bytes at CS:EIP section - it's all question marks. That means
> that the code was not readable. In order to execute code, the CPU needs
> to be able to read it - so that's why you crashed.

> Why was the code not re adable? Dunno. Could be a bad hard-drive,
> dirty CD, or something. Whatever the program was stored on was
> getting a read error. This sort of problem most commonly happens
> with CD-ROMs I think.

> The specific instruction is not relevant - because the instruction never
> made it to the CPU.


> > I have a VC++ application that is crashing with an "In Page Error".
> > I have my own Dr-Watson style dump and the exception address.

> > Both crashes are at function entry, entering two different functions.
> > The only thing happening at this line in both functions is a push ebp,
part
> > of the function prolog.
> > This line saves the stack frame register and is generated by the
complier.
> > Both functions that are crashing have no arguments and are members of a
> > class, with no calling convention specified.  This means that they will
have
> > the thiscall calling convention.

> > I suspect that the problem has something to do with the stack, calling
> > convention, or memory corruption of some kind. I have only been able to
> > determine one thing that both crashes have in common: It is both at push
> > ebp, and the ebp register contains the same value in both crashes. It
seems
> > that is OK, because all the activity takes place at the top of the stack
so
> > it is likely this could be valid.

> > I have been beating my head against the wall, reading $50 debugging
books to
> > no avail.

> > Anybody seen something like this before or have some advice?
> > I have included the two crash dumps below for those interested.
> > Thanks in advance.
> > Scott

> > EDM32 caused an In Page Error in module EDM32.EXE at 0157:00412628.
> > Exception handler called in Main Thread.
> > Error occurred at 1/19/2001 09:27:16.
> > M:\EDM32CS\EDM32.EXE, run by enp.
> > 1 processor(s), type 586.
> > 128 MBytes physical memory.

> > Registers:
> > EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > Bytes at CS:EIP:
> > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > Stack dump:
> > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111 0059f6d8
> > 5f402a49
> > 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c 00000000
> > 00000000
> > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000 00000000
> > 00000000
> > 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008 00000000
> > 00000000
> > 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d 005b4d8d
> > 0056023c
> > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000 00000000
> > 0059f7cc
> > 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c 00000000
> > 0059f7cc
> > 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c 0059f868
> > 00000b0c
> > 0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> > 00000008
> > 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79 ffffffff
> > 0059f7ec
> > 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111 00000000
> > 0059f84c
> > 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c 0059f8e8
> > 00000b0c
> > 0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> > 00000008
> > 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1 00000000
> > 0059f868
> > 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c 0059f894
> > 5f401a33
> > 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c 0059f8d0
> > 5f492b6d
> > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008 00000b0c
> > 88e6413f
> > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000 bff7197c
> > 00598906
> > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000 02020000
> > 89440000
> > 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7 16af3bfa
> > 00000004
> > 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8 01110ae8
> > 00000008
> > 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7 89888ddc
> > 00030000
> > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580 00028ddc
> > 00fa168f
> > 0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580 075689a2
> > 0000174f
> > 0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8 37f70002
> > 00008a50
> > 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50 1d5e89ec
> > 89e00147
> > 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00 00001777
> > 000d001c
> > 0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777 001c0000
> > 0000000d
> > 0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000 0000000d
> > 0b0c0202
> > 0059fa30: 174f102e 02020b0c 00000000 000d001c 00000000 c02a0000 00050000
> > 16af2c18
> > 0059fa50: bff714d9 014f0157 0059fa60 8a70015f 00001177 005b4d8d 005b4d8d
> > 0056023c
> > 0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c 00000202 00000000 000d001c
> > 005b4d8d
> > 0059fa90: 0059faac 5f401b7a 00000202 00000000 000d001c 00000202 00000000
> > 0059fb0c
> > 0059fab0: 5f401aec 00000202 00000000 000d001c 0059fb5c 00008bca 0059fba6
> > 00000000
> > 0059fad0: 00000000 00000000 00000000 00000000 00000000 00000000 5f401018
> > 00000008
> > 0059faf0: 0059fb5c 00008bca 0056023c 0059fac0 0059fb48 5f492bf1 00000000
> > 0059fb28
> > 0059fb10: 5f401a74 00000000 00000b0c 00000202 00000000 000d001c 0059fb54
> > 5f401a33
> > 0059fb30: 00000b0c 00000202 00000000 000d001c 00000000 0056023c 0059fb90
> > 5f492b6d
> > 0059fb50: 00000000 0059fb74 bff735d9 00000b0c 00000202 00000000 000d001c
> > 8ba4396f
> > 0059fb70: 0000015f 0059fb88 bff9222f 413f8bca 0000413f 00000000 bff7197c
> > 00008bc4
> > 0059fb90: 0059fd78 bff71831 8ba4396f 00000000 413f8ba4 00000000 00000246
> > 00028c02
> > 0059fbb0: 00023b2e 0000168f 01472737 413f0000 413f8bca 3bfa8c08 000416af
> > 00000000
> > 0059fbd0: 19fa0000 001c5f40 0000000d 02020000 0b0c0000 0b0c0000 00000202
> > 001c0000
> > 0059fbf0: 7a1b000d 00000001 0000c02a 000116af 413f413f 8c7c7580 00008c34
> > 19fa0003
> > 0059fc10: 0e915f40 00001777 000d001c 02020000 02020b0c 168f0b0c 00027580
> > 00028c7c
> > 0059fc30: 022e0229 41718c5c 0001174f 140f09c2 8cac168f ea0c0000 00000044
> > 7580413f
> > 0059fc50: 00020002 00000000 00027580 47c38c6e 0001174f 413f8c7c 00028ddc
> > 8cac47c8
> > 0059fc70: 16af388a 8c7c0001 0ae8413f 02020b0c 001c0000 3b55000d 01ee005b
> > 0000028d
> > 0059fc90: 02020b0c 00000000 000d001c 5f401018 c02a0000 00040000 16af2c18
> > bff714d9
> > 0059fcb0: 00000157 0059fcbc 0059015f 00001177 0044ea0c 005b4c14 00000000
> > 0044ea0c
> > 0059fcd0: 5f418a9d 00000002 00000ae8 00000000 0044ea0c 005b4c14 5f404195
> > 0044ea0c
> > 0059fcf0: 5f418a68 0044ea0c 0044ea0c 00000ae8 5f4014ce 0044ea0c 0044ea0c
> > 007329e0
> > 0059fd10: 5f40147a 000004ac 0044ea0c 0044ea0c 0044e9d8 5f401316 0044ea0c
> > 00000000
> > 0059fd30: 0044e9d8 5f40c34b 00000000 0044e9d8 0059fd88 00000000 00000002
> > 5f40c2fb
> > 0059fd50: 8175652b 00434dbf 00000000 8175652b 00000000 00433eeb ffffffff
> > 0044e9d8
> > 0059fd70: 0059fd58 0059f4c0 0059fe28 00437702 00440f90 00000000 0059fe38
> > 00437fe5
> > 0059fd90: 00400000 00000000 8175652b 00000001 00437510 00400000 00000000
> > 8175652b
> > 0059fdb0: 00000001 00000000 81756398 00580000 0059ff68 8175652b 00730e70
> > 00000000
> > 0059fdd0: 00000000 00730e00 00000001 00000044 00000000 00000000 00000000
> > 00000000
> > 0059fdf0: 00000000 00000000 00000000 00000000 00000000 00000000 00000001
> > 00000001
> > 0059fe10: 00000000 00000000 00000000 00000000 0059fdb4 81756398 0059ff68
> > 00437702
> > 0059fe30: 00441128 00000000 0059ff78 bff89349 00000000 81756398 00580000
> > 336d6445
> > 0059fe50: 58450032 00000045 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059fe70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059fe90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059feb0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059fed0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059fef0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059ff10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000
> > 0059ff30: 00000000 00000000 00000040 81756584 c0f5bf20 bff7873e 81707050
> > 004373dc
> > 0059ff50: bff79957 00000000 817563b8 39160000 0059fe40 00580000 ffffffff
> > bffb88a8
> > 0059ff70: bff780b0 00000000 0059fff4 bff891fb 817565a4 00000008 81756398
> > 00000000

...

read more »



Sat, 12 Jul 2003 10:13:59 GMT  
 Nasty debugging problem
Bruce,
Yes, I am using your exception handler. You are
awesome for providing it, thanks muchly. I got it
from one of the articles you responded to a few
days back. Saved me several days of programming
time and reading books.
I am having a problem with it maybe you can help
with: I don't think it is catching all of the
errors. I setup a text file in a common area to
write to and I am collecting all the errors it
logs in one place. The problem is, the users are
sending me more screen shots for errors than I am
logging with your handler.
I think there may be a piece missing. I invested
$100 in books on the subject, but haven't had the
time to get coding on that, been too busy trying
to track down this elusive bug. What I read and
meant to look into further (from John Robbins'
book) was the use of combining SEH and C++
exception handling with the use of
set_se_translator and also possibly using
SetUnhandledExceptionFilter().
Thanks again for your help, you're the man.
Scott



Quote:
> Hey - you're using my exception handler! Cool!

> Note the Bytes at CS:EIP section - it's all

question marks. That means
Quote:
> that the code was not readable. In order to

execute code, the CPU needs
Quote:
> to be able to read it - so that's why you
crashed.

> Why was the code not re adable? Dunno. Could be
a bad hard-drive,
> dirty CD, or something. Whatever the program
was stored on was
> getting a read error. This sort of problem most
commonly happens
> with CD-ROMs I think.

> The specific instruction is not relevant -

because the instruction never
Quote:
> made it to the CPU.


> > I have a VC++ application that is crashing

with an "In Page Error".
Quote:
> > I have my own Dr-Watson style dump and the
exception address.

> > Both crashes are at function entry, entering

two different functions.
Quote:
> > The only thing happening at this line in both

functions is a push ebp, part
Quote:
> > of the function prolog.
> > This line saves the stack frame register and

is generated by the complier.
Quote:
> > Both functions that are crashing have no

arguments and are members of a
Quote:
> > class, with no calling convention specified.

This means that they will have
Quote:
> > the thiscall calling convention.

> > I suspect that the problem has something to

do with the stack, calling
Quote:
> > convention, or memory corruption of some

kind. I have only been able to
Quote:
> > determine one thing that both crashes have in

common: It is both at push
Quote:
> > ebp, and the ebp register contains the same

value in both crashes. It seems
Quote:
> > that is OK, because all the activity takes

place at the top of the stack so
Quote:
> > it is likely this could be valid.

> > I have been beating my head against the wall,

reading $50 debugging books to
Quote:
> > no avail.

> > Anybody seen something like this before or
have some advice?
> > I have included the two crash dumps below for
those interested.
> > Thanks in advance.
> > Scott

> > EDM32 caused an In Page Error in module

EDM32.EXE at 0157:00412628.
Quote:
> > Exception handler called in Main Thread.
> > Error occurred at 1/19/2001 09:27:16.
> > M:\EDM32CS\EDM32.EXE, run by enp.
> > 1 processor(s), type 586.
> > 128 MBytes physical memory.

> > Registers:
> > EAX=005b4c14 CS=0157 EIP=00412628
EFLGS=00000246
> > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > Bytes at CS:EIP:

> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > Stack dump:
> > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0

0043e1d8 00000111 0059f6d8
Quote:
> > 5f402a49
> > 0059f6b0: 005b4c14 00000008 00000000 00402a13

00000000 0000000c 00000000
Quote:
> > 00000000
> > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7

00000008 00000000 00000000
Quote:
> > 00000000
> > 0059f6f0: 00000008 005b4c14 00000000 0059f74c

5f402b72 00000008 00000000
Quote:
> > 00000000
> > 0059f710: 00000000 005b4c14 005b4c14 00000111

bff71547 005b4d8d 005b4d8d
Quote:
> > 0056023c
> > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c

00000215 00000000 00000000
Quote:
> > 0059f7cc
> > 0059f750: 5f401c45 00000000 00000b0c 005b4c14

005b4c14 0056023c 00000000
Quote:
> > 0059f7cc
> > 0059f770: 5f401aec 00000215 00000000 00000007

0059f81c 0000888c 0059f868
Quote:
> > 00000b0c
> > 0059f790: 00000202 00000000 000d001c 00000000

00000000 00000000 5f401018
Quote:
> > 00000008
> > 0059f7b0: 0059f81c 0000888c 0056023c 00000000

0059f840 5f492c79 ffffffff
Quote:
> > 0059f7ec
> > 0059f7d0: 5f401b63 00000111 00000008 00000b0c

0059f7e8 00000111 00000000
Quote:
> > 0059f84c
> > 0059f7f0: 5f401aec 00000111 00000008 00000b0c

0059f89c 0000890c 0059f8e8
Quote:
> > 00000b0c
> > 0059f810: 00000202 00000000 000d001c 00000000

00000000 00000000 5f401018
Quote:
> > 00000008
> > 0059f830: 0059f89c 0000890c 0056023c 0059f800

0059f888 5f492bf1 00000000
Quote:
> > 0059f868
> > 0059f850: 5f401a74 00000000 00000ae8 00000111

00000008 00000b0c 0059f894
Quote:
> > 5f401a33
> > 0059f870: 00000ae8 00000111 00000008 00000b0c

00460078 0056023c 0059f8d0
Quote:
> > 5f492b6d
> > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8

00000111 00000008 00000b0c
Quote:
> > 88e6413f
> > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c

000037f7 00000000 bff7197c
Quote:
> > 00598906
> > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000

37f788e6 00000000 02020000
Quote:
> > 89440000
> > 0059f8f0: 3b2e0002 168f0002 27370000 00000147

890c37f7 894a37f7 16af3bfa
Quote:
> > 00000004
> > 0059f910: 00000000 5f4019fa 00000b0c 00000008

00000111 00000ae8 01110ae8
Quote:
> > 00000008
> > 0059f930: 00000b0c 00017a1b 80020000 16af0000

37f70001 758037f7 89888ddc
Quote:
> > 00030000
> > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000

0ae80111 00027580 00028ddc
Quote:
> > 00fa168f
> > 0059f970: 00001727 00000b0c 01110008 00028ddc

00020001 00027580 075689a2
Quote:
> > 0000174f
> > 0059f990: 00000000 00027580 00027580 005b0006

89e40001 758017b8 37f70002
Quote:
> > 00008a50
> > 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f

00060b3c 014f8a50 1d5e89ec
Quote:
> > 89e00147
> > 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580

bff60190 0f0e8a00 00001777
Quote:
> > 000d001c
> > 0059f9f0: 02020000 00060b0c 8a50005b 168f0000

03818a1c 00011777 001c0000
Quote:
> > 0000000d
> > 0059fa10: 75800202 102e0002 0386174f 35238a50

000116af 001c0000 0000000d
Quote:
> > 0b0c0202
> > 0059fa30: 174f102e 02020b0c 00000000 000d001c

00000000 c02a0000 00050000
Quote:
> > 16af2c18
> > 0059fa50: bff714d9 014f0157 0059fa60 8a70015f

00001177 005b4d8d 005b4d8d
Quote:
> > 0056023c
> > 0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c

00000202 00000000 000d001c
Quote:
> > 005b4d8d
> > 0059fa90: 0059faac 5f401b7a 00000202 00000000

000d001c 00000202 00000000
Quote:
> > 0059fb0c
> > 0059fab0: 5f401aec 00000202 00000000 000d001c

0059fb5c 00008bca 0059fba6
Quote:
> > 00000000
> > 0059fad0: 00000000 00000000 00000000 00000000

00000000 00000000 5f401018
Quote:
> > 00000008
> > 0059faf0: 0059fb5c 00008bca 0056023c 0059fac0

0059fb48 5f492bf1 00000000
Quote:
> > 0059fb28
> > 0059fb10: 5f401a74 00000000 00000b0c 00000202

00000000 000d001c 0059fb54
Quote:
> > 5f401a33
> > 0059fb30: 00000b0c 00000202 00000000 000d001c

00000000 0056023c 0059fb90
Quote:
> > 5f492b6d
> > 0059fb50: 00000000 0059fb74 bff735d9 00000b0c

00000202 00000000 000d001c
Quote:
> > 8ba4396f
> > 0059fb70: 0000015f 0059fb88 bff9222f 413f8bca

0000413f 00000000 bff7197c
Quote:
> > 00008bc4
> > 0059fb90: 0059fd78 bff71831 8ba4396f 00000000

413f8ba4 00000000 00000246
Quote:
> > 00028c02
> > 0059fbb0: 00023b2e 0000168f 01472737 413f0000

413f8bca 3bfa8c08 000416af
Quote:
> > 00000000
> > 0059fbd0: 19fa0000 001c5f40 0000000d 02020000

0b0c0000 0b0c0000 00000202
Quote:
> > 001c0000
> > 0059fbf0: 7a1b000d 00000001 0000c02a 000116af

413f413f 8c7c7580 00008c34
Quote:
> > 19fa0003
> > 0059fc10: 0e915f40 00001777 000d001c 02020000

02020b0c 168f0b0c 00027580
Quote:
> > 00028c7c
> > 0059fc30: 022e0229 41718c5c 0001174f 140f09c2

8cac168f ea0c0000 00000044
Quote:
> > 7580413f
> > 0059fc50: 00020002 00000000 00027580 47c38c6e

0001174f 413f8c7c 00028ddc
Quote:
> > 8cac47c8
> > 0059fc70: 16af388a 8c7c0001 0ae8413f 02020b0c

001c0000 3b55000d 01ee005b
Quote:
> > 0000028d
> > 0059fc90: 02020b0c 00000000 000d001c 5f401018

c02a0000 00040000 16af2c18
Quote:
> > bff714d9
> > 0059fcb0: 00000157 0059fcbc 0059015f 00001177

0044ea0c 005b4c14 00000000
Quote:
> > 0044ea0c
> > 0059fcd0: 5f418a9d 00000002 00000ae8 00000000

0044ea0c 005b4c14 5f404195
Quote:
> > 0044ea0c
> > 0059fcf0: 5f418a68 0044ea0c 0044ea0c 00000ae8

5f4014ce 0044ea0c 0044ea0c
Quote:
> > 007329e0
> > 0059fd10: 5f40147a 000004ac 0044ea0c 0044ea0c

0044e9d8 5f401316 0044ea0c
Quote:
> > 00000000
> > 0059fd30: 0044e9d8 5f40c34b 00000000 0044e9d8

0059fd88 00000000 00000002
Quote:
> > 5f40c2fb
> > 0059fd50: 8175652b 00434dbf 00000000 8175652b

00000000 00433eeb ffffffff
Quote:
> > 0044e9d8
> > 0059fd70: 0059fd58 0059f4c0 0059fe28 00437702

00440f90 00000000 0059fe38
Quote:
> > 00437fe5
> > 0059fd90: 00400000 00000000 8175652b 00000001

00437510 00400000 00000000
Quote:
> > 8175652b
> > 0059fdb0: 00000001 00000000 81756398 00580000

0059ff68 8175652b 00730e70
Quote:
> > 00000000
> > 0059fdd0: 00000000 00730e00 00000001 00000044

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059fdf0: 00000000 00000000 00000000 00000000

00000000 00000000 00000001
Quote:
> > 00000001
> > 0059fe10: 00000000 00000000 00000000 00000000

0059fdb4 81756398 0059ff68
Quote:
> > 00437702
> > 0059fe30: 00441128 00000000 0059ff78 bff89349

00000000 81756398 00580000
Quote:
> > 336d6445
> > 0059fe50: 58450032 00000045 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059fe70: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059fe90: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059feb0: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059fed0: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059fef0: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059ff10: 00000000 00000000 00000000 00000000

00000000 00000000 00000000
Quote:
> > 00000000
> > 0059ff30: 00000000 00000000 00000040 81756584

c0f5bf20 bff7873e 81707050
Quote:
> > 004373dc
> > 0059ff50: bff79957 00000000 817563b8 39160000

0059fe40 00580000 ffffffff
Quote:
> > bffb88a8
> > 0059ff70: bff780b0 00000000 0059fff4 bff891fb

817565a4 00000008 ...

read more »



Sat, 12 Jul 2003 13:22:54 GMT  
 Nasty debugging problem
The structured exception handler should record virtually all
exceptions for the thread that it wraps. Stack overflow or
stack corruption exceptions may not get recorded (the
exception handler will crash or not get called) and if the
code module containing the exception handler is unloaded it
will not get called. However these are rare occurrences.

Using SetUnhandledExceptionFilter() is a good idea, since it
will catch all threads. Explicitly wrapping all threads with SEH
is also a good idea.

_set_se_translator() is used to translate SEH to C++ exceptions,
which is the wrong direction if you want the SEH exception
handler to record all exceptions.

Quote:

> Bruce,
> I replied to you earlier using Deja, but I didn't see it show up so I'm
> doing it again. Sorry if this makes a duplicate message.
> Yes, I'm using your exception handler. I got it from a post you made on
> another thread last week. It has saved me a lot of time, thanks much!
> I am having a problem with your exception handler though, I don't think it
> is logging all the errors. The users are sending me screen shots of crashes
> that are not getting logged.
> I suspect there are some additional crash handling methods that I need to
> implement to trap the rest of the errors. Have you researched this? I bought
> some fairly expensive debugging books and have been reading up, but haven't
> got to coding yet.
> I suspect that I need to implement the _set_se_translator and
> SetUnhandledExceptionFilter methods of trapping errors as documented in John
> Robbins' book. Have you also had problems getting all the errors logged?
> Thanks again for your exception handler!
> Scott



> > Hey - you're using my exception handler! Cool!

> > Note the Bytes at CS:EIP section - it's all question marks. That means
> > that the code was not readable. In order to execute code, the CPU needs
> > to be able to read it - so that's why you crashed.

> > Why was the code not re adable? Dunno. Could be a bad hard-drive,
> > dirty CD, or something. Whatever the program was stored on was
> > getting a read error. This sort of problem most commonly happens
> > with CD-ROMs I think.

> > The specific instruction is not relevant - because the instruction never
> > made it to the CPU.


> > > I have a VC++ application that is crashing with an "In Page Error".
> > > I have my own Dr-Watson style dump and the exception address.

> > > Both crashes are at function entry, entering two different functions.
> > > The only thing happening at this line in both functions is a push ebp,
> part
> > > of the function prolog.
> > > This line saves the stack frame register and is generated by the
> complier.
> > > Both functions that are crashing have no arguments and are members of a
> > > class, with no calling convention specified.  This means that they will
> have
> > > the thiscall calling convention.

> > > I suspect that the problem has something to do with the stack, calling
> > > convention, or memory corruption of some kind. I have only been able to
> > > determine one thing that both crashes have in common: It is both at push
> > > ebp, and the ebp register contains the same value in both crashes. It
> seems
> > > that is OK, because all the activity takes place at the top of the stack
> so
> > > it is likely this could be valid.

> > > I have been beating my head against the wall, reading $50 debugging
> books to
> > > no avail.

> > > Anybody seen something like this before or have some advice?
> > > I have included the two crash dumps below for those interested.
> > > Thanks in advance.
> > > Scott

> > > EDM32 caused an In Page Error in module EDM32.EXE at 0157:00412628.
> > > Exception handler called in Main Thread.
> > > Error occurred at 1/19/2001 09:27:16.
> > > M:\EDM32CS\EDM32.EXE, run by enp.
> > > 1 processor(s), type 586.
> > > 128 MBytes physical memory.

> > > Registers:
> > > EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> > > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > > Bytes at CS:EIP:
> > > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > > Stack dump:
> > > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111 0059f6d8
> > > 5f402a49
> > > 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c 00000000
> > > 00000000
> > > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000 00000000
> > > 00000000
> > > 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008 00000000
> > > 00000000
> > > 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d 005b4d8d
> > > 0056023c
> > > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000 00000000
> > > 0059f7cc
> > > 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c 00000000
> > > 0059f7cc
> > > 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c 0059f868
> > > 00000b0c
> > > 0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> > > 00000008
> > > 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79 ffffffff
> > > 0059f7ec
> > > 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111 00000000
> > > 0059f84c
> > > 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c 0059f8e8
> > > 00000b0c
> > > 0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000 5f401018
> > > 00000008
> > > 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1 00000000
> > > 0059f868
> > > 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c 0059f894
> > > 5f401a33
> > > 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c 0059f8d0
> > > 5f492b6d
> > > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008 00000b0c
> > > 88e6413f
> > > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000 bff7197c
> > > 00598906
> > > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000 02020000
> > > 89440000
> > > 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7 16af3bfa
> > > 00000004
> > > 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8 01110ae8
> > > 00000008
> > > 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7 89888ddc
> > > 00030000
> > > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580 00028ddc
> > > 00fa168f
> > > 0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580 075689a2
> > > 0000174f
> > > 0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8 37f70002
> > > 00008a50
> > > 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50 1d5e89ec
> > > 89e00147
> > > 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00 00001777
> > > 000d001c
> > > 0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777 001c0000
> > > 0000000d
> > > 0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000 0000000d
> > > 0b0c0202
> > > 0059fa30: 174f102e 02020b0c 00000000 000d001c 00000000 c02a0000 00050000
> > > 16af2c18
> > > 0059fa50: bff714d9 014f0157 0059fa60 8a70015f 00001177 005b4d8d 005b4d8d
> > > 0056023c
> > > 0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c 00000202 00000000 000d001c
> > > 005b4d8d
> > > 0059fa90: 0059faac 5f401b7a 00000202 00000000 000d001c 00000202 00000000
> > > 0059fb0c
> > > 0059fab0: 5f401aec 00000202 00000000 000d001c 0059fb5c 00008bca 0059fba6
> > > 00000000
> > > 0059fad0: 00000000 00000000 00000000 00000000 00000000 00000000 5f401018
> > > 00000008
> > > 0059faf0: 0059fb5c 00008bca 0056023c 0059fac0 0059fb48 5f492bf1 00000000
> > > 0059fb28
> > > 0059fb10: 5f401a74 00000000 00000b0c 00000202 00000000 000d001c 0059fb54
> > > 5f401a33
> > > 0059fb30: 00000b0c 00000202 00000000 000d001c 00000000 0056023c 0059fb90
> > > 5f492b6d
> > > 0059fb50: 00000000 0059fb74 bff735d9 00000b0c 00000202 00000000 000d001c
> > > 8ba4396f
> > > 0059fb70: 0000015f 0059fb88 bff9222f 413f8bca 0000413f 00000000 bff7197c
> > > 00008bc4
> > > 0059fb90: 0059fd78 bff71831 8ba4396f 00000000 413f8ba4 00000000 00000246
> > > 00028c02
> > > 0059fbb0: 00023b2e 0000168f 01472737 413f0000 413f8bca 3bfa8c08 000416af
> > > 00000000
> > > 0059fbd0: 19fa0000 001c5f40 0000000d 02020000 0b0c0000 0b0c0000 00000202
> > > 001c0000
> > > 0059fbf0: 7a1b000d 00000001 0000c02a 000116af 413f413f 8c7c7580 00008c34
> > > 19fa0003
> > > 0059fc10: 0e915f40 00001777 000d001c 02020000 02020b0c 168f0b0c 00027580
> > > 00028c7c
> > > 0059fc30: 022e0229 41718c5c 0001174f 140f09c2 8cac168f ea0c0000 00000044
> > > 7580413f
> > > 0059fc50: 00020002 00000000 00027580 47c38c6e 0001174f 413f8c7c 00028ddc
> > > 8cac47c8
> > > 0059fc70: 16af388a 8c7c0001 0ae8413f 02020b0c 001c0000 3b55000d 01ee005b
> > > 0000028d
> > > 0059fc90: 02020b0c 00000000 000d001c 5f401018 c02a0000 00040000 16af2c18
> > > bff714d9
> > > 0059fcb0: 00000157 0059fcbc 0059015f 00001177 0044ea0c 005b4c14 00000000
> > > 0044ea0c
> > > 0059fcd0: 5f418a9d 00000002 00000ae8 00000000 0044ea0c 005b4c14 5f404195
> > > 0044ea0c
> > > 0059fcf0: 5f418a68 0044ea0c 0044ea0c 00000ae8 5f4014ce 0044ea0c 0044ea0c
> > > 007329e0
> > > 0059fd10: 5f40147a 000004ac 0044ea0c 0044ea0c 0044e9d8 5f401316 0044ea0c
> > > 00000000
> > > 0059fd30: 0044e9d8 5f40c34b 00000000 0044e9d8 0059fd88 00000000 00000002
> > > 5f40c2fb
> > > 0059fd50: 8175652b 00434dbf 00000000 8175652b 00000000 00433eeb ffffffff
> > > 0044e9d8
> > > 0059fd70: 0059fd58 0059f4c0 0059fe28 00437702 00440f90 00000000 0059fe38
> > > 00437fe5
> > > 0059fd90: 00400000 00000000 8175652b 00000001 00437510 00400000 00000000
> > > 8175652b
> > > 0059fdb0: 00000001 00000000 81756398 00580000 0059ff68 8175652b 00730e70
> > > 00000000
> > > 0059fdd0: 00000000 00730e00 00000001 00000044 00000000 00000000 00000000
> > > 00000000
> > > 0059fdf0: 00000000 00000000 00000000 00000000 00000000 00000000 00000001

...

read more »



Sun, 13 Jul 2003 03:41:49 GMT  
 Nasty debugging problem
I did some more reading last night.
I guess the idea documented in the book is to write one C++ exception
handler and use it with SEH exceptions and C++ exceptions, and the
_set_se_translator() translator function makes it so you can use the
same C++ code for handling the exceptions.  Does that make sense?  I'm
still trying to sort it all out.
I am using a database libary (codebase) and I think it's multithreaded.
I don't specifically do any multithreaded stuff in my application but I
do compile it with the multithreaded libraries. I call functions from
the codebase library thay may start other threads, but I'm not sure. I
guess crashes in these other threads would not be trapped then, so I
would use SetUnhandledExceptionFilter() to make sure these get handled
then? Do you have any examples of this? But you recommend NOT using the
_set_se_translator function, because it would interfere with proper
operation of your handler and probably some other reasons I don't get
yet.
I'm not a newbie, but some of these topics are more of a black art than
common knowledge. I'm glad to learn anything that will make my app
better and improve my programming skills.
Thanks
Scott



Quote:
> The structured exception handler should record virtually all
> exceptions for the thread that it wraps. Stack overflow or
> stack corruption exceptions may not get recorded (the
> exception handler will crash or not get called) and if the
> code module containing the exception handler is unloaded it
> will not get called. However these are rare occurrences.

> Using SetUnhandledExceptionFilter() is a good idea, since it
> will catch all threads. Explicitly wrapping all threads with SEH
> is also a good idea.

> _set_se_translator() is used to translate SEH to C++ exceptions,
> which is the wrong direction if you want the SEH exception
> handler to record all exceptions.


> > Bruce,
> > I replied to you earlier using Deja, but I didn't see it show up so
I'm
> > doing it again. Sorry if this makes a duplicate message.
> > Yes, I'm using your exception handler. I got it from a post you
made on
> > another thread last week. It has saved me a lot of time, thanks
much!
> > I am having a problem with your exception handler though, I don't
think it
> > is logging all the errors. The users are sending me screen shots of
crashes
> > that are not getting logged.
> > I suspect there are some additional crash handling methods that I
need to
> > implement to trap the rest of the errors. Have you researched this?
I bought
> > some fairly expensive debugging books and have been reading up, but
haven't
> > got to coding yet.
> > I suspect that I need to implement the _set_se_translator and
> > SetUnhandledExceptionFilter methods of trapping errors as
documented in John
> > Robbins' book. Have you also had problems getting all the errors
logged?
> > Thanks again for your exception handler!
> > Scott



> > > Hey - you're using my exception handler! Cool!

> > > Note the Bytes at CS:EIP section - it's all question marks. That
means
> > > that the code was not readable. In order to execute code, the CPU
needs
> > > to be able to read it - so that's why you crashed.

> > > Why was the code not re adable? Dunno. Could be a bad hard-drive,
> > > dirty CD, or something. Whatever the program was stored on was
> > > getting a read error. This sort of problem most commonly happens
> > > with CD-ROMs I think.

> > > The specific instruction is not relevant - because the
instruction never
> > > made it to the CPU.


> > > > I have a VC++ application that is crashing with an "In Page
Error".
> > > > I have my own Dr-Watson style dump and the exception address.

> > > > Both crashes are at function entry, entering two different
functions.
> > > > The only thing happening at this line in both functions is a
push ebp,
> > part
> > > > of the function prolog.
> > > > This line saves the stack frame register and is generated by the
> > complier.
> > > > Both functions that are crashing have no arguments and are
members of a
> > > > class, with no calling convention specified.  This means that
they will
> > have
> > > > the thiscall calling convention.

> > > > I suspect that the problem has something to do with the stack,
calling
> > > > convention, or memory corruption of some kind. I have only been
able to
> > > > determine one thing that both crashes have in common: It is
both at push
> > > > ebp, and the ebp register contains the same value in both
crashes. It
> > seems
> > > > that is OK, because all the activity takes place at the top of
the stack
> > so
> > > > it is likely this could be valid.

> > > > I have been beating my head against the wall, reading $50
debugging
> > books to
> > > > no avail.

> > > > Anybody seen something like this before or have some advice?
> > > > I have included the two crash dumps below for those interested.
> > > > Thanks in advance.
> > > > Scott

> > > > EDM32 caused an In Page Error in module EDM32.EXE at
0157:00412628.
> > > > Exception handler called in Main Thread.
> > > > Error occurred at 1/19/2001 09:27:16.
> > > > M:\EDM32CS\EDM32.EXE, run by enp.
> > > > 1 processor(s), type 586.
> > > > 128 MBytes physical memory.

> > > > Registers:
> > > > EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> > > > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > > > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > > > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > > > Bytes at CS:EIP:
> > > > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > > > Stack dump:
> > > > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111
0059f6d8
> > > > 5f402a49
> > > > 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c
00000000
> > > > 00000000
> > > > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000
00000000
> > > > 00000000
> > > > 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008
00000000
> > > > 00000000
> > > > 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d
005b4d8d
> > > > 0056023c
> > > > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000
00000000
> > > > 0059f7cc
> > > > 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c
00000000
> > > > 0059f7cc
> > > > 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c
0059f868
> > > > 00000b0c
> > > > 0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000
5f401018
> > > > 00000008
> > > > 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79
ffffffff
> > > > 0059f7ec
> > > > 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111
00000000
> > > > 0059f84c
> > > > 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c
0059f8e8
> > > > 00000b0c
> > > > 0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000
5f401018
> > > > 00000008
> > > > 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1
00000000
> > > > 0059f868
> > > > 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c
0059f894
> > > > 5f401a33
> > > > 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c
0059f8d0
> > > > 5f492b6d
> > > > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008
00000b0c
> > > > 88e6413f
> > > > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000
bff7197c
> > > > 00598906
> > > > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000
02020000
> > > > 89440000
> > > > 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7
16af3bfa
> > > > 00000004
> > > > 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8
01110ae8
> > > > 00000008
> > > > 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7
89888ddc
> > > > 00030000
> > > > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580
00028ddc
> > > > 00fa168f
> > > > 0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580
075689a2
> > > > 0000174f
> > > > 0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8
37f70002
> > > > 00008a50
> > > > 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50
1d5e89ec
> > > > 89e00147
> > > > 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00
00001777
> > > > 000d001c
> > > > 0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777
001c0000
> > > > 0000000d
> > > > 0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000
0000000d
> > > > 0b0c0202
> > > > 0059fa30: 174f102e 02020b0c 00000000 000d001c 00000000 c02a0000
00050000
> > > > 16af2c18
> > > > 0059fa50: bff714d9 014f0157 0059fa60 8a70015f 00001177 005b4d8d
005b4d8d
> > > > 0056023c
> > > > 0059fa70: 0059fa90 5f401ee9 8032dd70 00000b0c 00000202 00000000
000d001c
> > > > 005b4d8d
> > > > 0059fa90: 0059faac 5f401b7a 00000202 00000000 000d001c 00000202
00000000
> > > > 0059fb0c
> > > > 0059fab0: 5f401aec 00000202 00000000 000d001c 0059fb5c 00008bca
0059fba6
> > > > 00000000
> > > > 0059fad0: 00000000 00000000 00000000 00000000 00000000 00000000
5f401018
> > > > 00000008
> > > > 0059faf0: 0059fb5c 00008bca 0056023c 0059fac0 0059fb48 5f492bf1
00000000
> > > > 0059fb28
> > > > 0059fb10: 5f401a74 00000000 00000b0c 00000202 00000000 000d001c
0059fb54
> > > > 5f401a33
> > > > 0059fb30: 00000b0c 00000202 00000000 000d001c 00000000 0056023c
0059fb90
> > > > 5f492b6d
> > > > 0059fb50: 00000000 0059fb74 bff735d9 00000b0c 00000202 00000000
000d001c
> > > > 8ba4396f
> > > > 0059fb70: 0000015f 0059fb88 bff9222f 413f8bca 0000413f 00000000
bff7197c
> > > > 00008bc4
> > > > 0059fb90: 0059fd78 bff71831 8ba4396f 00000000 413f8ba4 00000000
00000246
> > > > 00028c02
> > > > 0059fbb0: 00023b2e 0000168f 01472737 413f0000 413f8bca 3bfa8c08
000416af
> > > > 00000000
> > > > 0059fbd0: 19fa0000 001c5f40 0000000d 02020000

...

read more »



Sun, 13 Jul 2003 05:21:41 GMT  
 Nasty debugging problem
Using SetUnhandledExceptionFilter() is easy:

static LONG __stdcall GlobalExceptionFilter(struct _EXCEPTION_POINTERS
*ExceptionInfo)
{
    return HandleException(ExceptionInfo, "Global Exception Handler");

Quote:
}

SetUnhandledExceptionFilter(GlobalExceptionFilter);

I see no reason not to do this always.

My complaint about _set_se_translator() is it translates OS/CPU exceptions,
which generally signify crashing bugs, into C++ exceptions, which should be
used for handling of 'legal' events. This confuses the idea of bug detection

with error handling, and probably makes it harder to fix all of your bugs.

C++ exceptions also lack the detailed CPU information, like EIP and
other registers. They are for different purposes - IMHO.

You can use the VC++ de{*filter*} to view how many threads there are
and tell whether your database library is starting threads.

Quote:

> I did some more reading last night.
> I guess the idea documented in the book is to write one C++ exception
> handler and use it with SEH exceptions and C++ exceptions, and the
> _set_se_translator() translator function makes it so you can use the
> same C++ code for handling the exceptions.  Does that make sense?  I'm
> still trying to sort it all out.
> I am using a database libary (codebase) and I think it's multithreaded.
> I don't specifically do any multithreaded stuff in my application but I
> do compile it with the multithreaded libraries. I call functions from
> the codebase library thay may start other threads, but I'm not sure. I
> guess crashes in these other threads would not be trapped then, so I
> would use SetUnhandledExceptionFilter() to make sure these get handled
> then? Do you have any examples of this? But you recommend NOT using the
> _set_se_translator function, because it would interfere with proper
> operation of your handler and probably some other reasons I don't get
> yet.
> I'm not a newbie, but some of these topics are more of a black art than
> common knowledge. I'm glad to learn anything that will make my app
> better and improve my programming skills.
> Thanks
> Scott



> > The structured exception handler should record virtually all
> > exceptions for the thread that it wraps. Stack overflow or
> > stack corruption exceptions may not get recorded (the
> > exception handler will crash or not get called) and if the
> > code module containing the exception handler is unloaded it
> > will not get called. However these are rare occurrences.

> > Using SetUnhandledExceptionFilter() is a good idea, since it
> > will catch all threads. Explicitly wrapping all threads with SEH
> > is also a good idea.

> > _set_se_translator() is used to translate SEH to C++ exceptions,
> > which is the wrong direction if you want the SEH exception
> > handler to record all exceptions.


> > > Bruce,
> > > I replied to you earlier using Deja, but I didn't see it show up so
> I'm
> > > doing it again. Sorry if this makes a duplicate message.
> > > Yes, I'm using your exception handler. I got it from a post you
> made on
> > > another thread last week. It has saved me a lot of time, thanks
> much!
> > > I am having a problem with your exception handler though, I don't
> think it
> > > is logging all the errors. The users are sending me screen shots of
> crashes
> > > that are not getting logged.
> > > I suspect there are some additional crash handling methods that I
> need to
> > > implement to trap the rest of the errors. Have you researched this?
> I bought
> > > some fairly expensive debugging books and have been reading up, but
> haven't
> > > got to coding yet.
> > > I suspect that I need to implement the _set_se_translator and
> > > SetUnhandledExceptionFilter methods of trapping errors as
> documented in John
> > > Robbins' book. Have you also had problems getting all the errors
> logged?
> > > Thanks again for your exception handler!
> > > Scott



> > > > Hey - you're using my exception handler! Cool!

> > > > Note the Bytes at CS:EIP section - it's all question marks. That
> means
> > > > that the code was not readable. In order to execute code, the CPU
> needs
> > > > to be able to read it - so that's why you crashed.

> > > > Why was the code not re adable? Dunno. Could be a bad hard-drive,
> > > > dirty CD, or something. Whatever the program was stored on was
> > > > getting a read error. This sort of problem most commonly happens
> > > > with CD-ROMs I think.

> > > > The specific instruction is not relevant - because the
> instruction never
> > > > made it to the CPU.


> > > > > I have a VC++ application that is crashing with an "In Page
> Error".
> > > > > I have my own Dr-Watson style dump and the exception address.

> > > > > Both crashes are at function entry, entering two different
> functions.
> > > > > The only thing happening at this line in both functions is a
> push ebp,
> > > part
> > > > > of the function prolog.
> > > > > This line saves the stack frame register and is generated by the
> > > complier.
> > > > > Both functions that are crashing have no arguments and are
> members of a
> > > > > class, with no calling convention specified.  This means that
> they will
> > > have
> > > > > the thiscall calling convention.

> > > > > I suspect that the problem has something to do with the stack,
> calling
> > > > > convention, or memory corruption of some kind. I have only been
> able to
> > > > > determine one thing that both crashes have in common: It is
> both at push
> > > > > ebp, and the ebp register contains the same value in both
> crashes. It
> > > seems
> > > > > that is OK, because all the activity takes place at the top of
> the stack
> > > so
> > > > > it is likely this could be valid.

> > > > > I have been beating my head against the wall, reading $50
> debugging
> > > books to
> > > > > no avail.

> > > > > Anybody seen something like this before or have some advice?
> > > > > I have included the two crash dumps below for those interested.
> > > > > Thanks in advance.
> > > > > Scott

> > > > > EDM32 caused an In Page Error in module EDM32.EXE at
> 0157:00412628.
> > > > > Exception handler called in Main Thread.
> > > > > Error occurred at 1/19/2001 09:27:16.
> > > > > M:\EDM32CS\EDM32.EXE, run by enp.
> > > > > 1 processor(s), type 586.
> > > > > 128 MBytes physical memory.

> > > > > Registers:
> > > > > EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> > > > > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > > > > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > > > > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > > > > Bytes at CS:EIP:
> > > > > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > > > > Stack dump:
> > > > > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8 00000111
> 0059f6d8
> > > > > 5f402a49
> > > > > 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000 0000000c
> 00000000
> > > > > 00000000
> > > > > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008 00000000
> 00000000
> > > > > 00000000
> > > > > 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72 00000008
> 00000000
> > > > > 00000000
> > > > > 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547 005b4d8d
> 005b4d8d
> > > > > 0056023c
> > > > > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215 00000000
> 00000000
> > > > > 0059f7cc
> > > > > 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14 0056023c
> 00000000
> > > > > 0059f7cc
> > > > > 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c 0000888c
> 0059f868
> > > > > 00000b0c
> > > > > 0059f790: 00000202 00000000 000d001c 00000000 00000000 00000000
> 5f401018
> > > > > 00000008
> > > > > 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840 5f492c79
> ffffffff
> > > > > 0059f7ec
> > > > > 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8 00000111
> 00000000
> > > > > 0059f84c
> > > > > 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c 0000890c
> 0059f8e8
> > > > > 00000b0c
> > > > > 0059f810: 00000202 00000000 000d001c 00000000 00000000 00000000
> 5f401018
> > > > > 00000008
> > > > > 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888 5f492bf1
> 00000000
> > > > > 0059f868
> > > > > 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008 00000b0c
> 0059f894
> > > > > 5f401a33
> > > > > 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078 0056023c
> 0059f8d0
> > > > > 5f492b6d
> > > > > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111 00000008
> 00000b0c
> > > > > 88e6413f
> > > > > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7 00000000
> bff7197c
> > > > > 00598906
> > > > > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6 00000000
> 02020000
> > > > > 89440000
> > > > > 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7 894a37f7
> 16af3bfa
> > > > > 00000004
> > > > > 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111 00000ae8
> 01110ae8
> > > > > 00000008
> > > > > 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001 758037f7
> 89888ddc
> > > > > 00030000
> > > > > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111 00027580
> 00028ddc
> > > > > 00fa168f
> > > > > 0059f970: 00001727 00000b0c 01110008 00028ddc 00020001 00027580
> 075689a2
> > > > > 0000174f
> > > > > 0059f990: 00000000 00027580 00027580 005b0006 89e40001 758017b8
> 37f70002
> > > > > 00008a50
> > > > > 0059f9b0: 532c0006 022605fa 4f4df492 0b80067f 00060b3c 014f8a50
> 1d5e89ec
> > > > > 89e00147
> > > > > 0059f9d0: 89e437f7 89e837f7 dd7037f7 00027580 bff60190 0f0e8a00
> 00001777
> > > > > 000d001c
> > > > > 0059f9f0: 02020000 00060b0c 8a50005b 168f0000 03818a1c 00011777
> 001c0000
> > > > > 0000000d
> > > > > 0059fa10: 75800202 102e0002 0386174f 35238a50 000116af 001c0000

...

read more »



Sun, 13 Jul 2003 06:40:01 GMT  
 Nasty debugging problem
Thanks again. Hopefully others will find this thread useful.
Scott



Quote:
> Using SetUnhandledExceptionFilter() is easy:

> static LONG __stdcall GlobalExceptionFilter(struct _EXCEPTION_POINTERS
> *ExceptionInfo)
> {
>     return HandleException(ExceptionInfo, "Global Exception Handler");
> }

> SetUnhandledExceptionFilter(GlobalExceptionFilter);

> I see no reason not to do this always.

> My complaint about _set_se_translator() is it translates OS/CPU
exceptions,
> which generally signify crashing bugs, into C++ exceptions, which
should be
> used for handling of 'legal' events. This confuses the idea of bug
detection

> with error handling, and probably makes it harder to fix all of your
bugs.

> C++ exceptions also lack the detailed CPU information, like EIP and
> other registers. They are for different purposes - IMHO.

> You can use the VC++ de{*filter*} to view how many threads there are
> and tell whether your database library is starting threads.


> > I did some more reading last night.
> > I guess the idea documented in the book is to write one C++
exception
> > handler and use it with SEH exceptions and C++ exceptions, and the
> > _set_se_translator() translator function makes it so you can use the
> > same C++ code for handling the exceptions.  Does that make sense?
I'm
> > still trying to sort it all out.
> > I am using a database libary (codebase) and I think it's
multithreaded.
> > I don't specifically do any multithreaded stuff in my application
but I
> > do compile it with the multithreaded libraries. I call functions
from
> > the codebase library thay may start other threads, but I'm not
sure. I
> > guess crashes in these other threads would not be trapped then, so I
> > would use SetUnhandledExceptionFilter() to make sure these get
handled
> > then? Do you have any examples of this? But you recommend NOT using
the
> > _set_se_translator function, because it would interfere with proper
> > operation of your handler and probably some other reasons I don't
get
> > yet.
> > I'm not a newbie, but some of these topics are more of a black art
than
> > common knowledge. I'm glad to learn anything that will make my app
> > better and improve my programming skills.
> > Thanks
> > Scott



> > > The structured exception handler should record virtually all
> > > exceptions for the thread that it wraps. Stack overflow or
> > > stack corruption exceptions may not get recorded (the
> > > exception handler will crash or not get called) and if the
> > > code module containing the exception handler is unloaded it
> > > will not get called. However these are rare occurrences.

> > > Using SetUnhandledExceptionFilter() is a good idea, since it
> > > will catch all threads. Explicitly wrapping all threads with SEH
> > > is also a good idea.

> > > _set_se_translator() is used to translate SEH to C++ exceptions,
> > > which is the wrong direction if you want the SEH exception
> > > handler to record all exceptions.


> > > > Bruce,
> > > > I replied to you earlier using Deja, but I didn't see it show
up so
> > I'm
> > > > doing it again. Sorry if this makes a duplicate message.
> > > > Yes, I'm using your exception handler. I got it from a post you
> > made on
> > > > another thread last week. It has saved me a lot of time, thanks
> > much!
> > > > I am having a problem with your exception handler though, I
don't
> > think it
> > > > is logging all the errors. The users are sending me screen
shots of
> > crashes
> > > > that are not getting logged.
> > > > I suspect there are some additional crash handling methods that
I
> > need to
> > > > implement to trap the rest of the errors. Have you researched
this?
> > I bought
> > > > some fairly expensive debugging books and have been reading up,
but
> > haven't
> > > > got to coding yet.
> > > > I suspect that I need to implement the _set_se_translator and
> > > > SetUnhandledExceptionFilter methods of trapping errors as
> > documented in John
> > > > Robbins' book. Have you also had problems getting all the errors
> > logged?
> > > > Thanks again for your exception handler!
> > > > Scott



> > > > > Hey - you're using my exception handler! Cool!

> > > > > Note the Bytes at CS:EIP section - it's all question marks.
That
> > means
> > > > > that the code was not readable. In order to execute code, the
CPU
> > needs
> > > > > to be able to read it - so that's why you crashed.

> > > > > Why was the code not re adable? Dunno. Could be a bad hard-
drive,
> > > > > dirty CD, or something. Whatever the program was stored on was
> > > > > getting a read error. This sort of problem most commonly
happens
> > > > > with CD-ROMs I think.

> > > > > The specific instruction is not relevant - because the
> > instruction never
> > > > > made it to the CPU.


> > > > > > I have a VC++ application that is crashing with an "In Page
> > Error".
> > > > > > I have my own Dr-Watson style dump and the exception
address.

> > > > > > Both crashes are at function entry, entering two different
> > functions.
> > > > > > The only thing happening at this line in both functions is a
> > push ebp,
> > > > part
> > > > > > of the function prolog.
> > > > > > This line saves the stack frame register and is generated
by the
> > > > complier.
> > > > > > Both functions that are crashing have no arguments and are
> > members of a
> > > > > > class, with no calling convention specified.  This means
that
> > they will
> > > > have
> > > > > > the thiscall calling convention.

> > > > > > I suspect that the problem has something to do with the
stack,
> > calling
> > > > > > convention, or memory corruption of some kind. I have only
been
> > able to
> > > > > > determine one thing that both crashes have in common: It is
> > both at push
> > > > > > ebp, and the ebp register contains the same value in both
> > crashes. It
> > > > seems
> > > > > > that is OK, because all the activity takes place at the top
of
> > the stack
> > > > so
> > > > > > it is likely this could be valid.

> > > > > > I have been beating my head against the wall, reading $50
> > debugging
> > > > books to
> > > > > > no avail.

> > > > > > Anybody seen something like this before or have some advice?
> > > > > > I have included the two crash dumps below for those
interested.
> > > > > > Thanks in advance.
> > > > > > Scott

> > > > > > EDM32 caused an In Page Error in module EDM32.EXE at
> > 0157:00412628.
> > > > > > Exception handler called in Main Thread.
> > > > > > Error occurred at 1/19/2001 09:27:16.
> > > > > > M:\EDM32CS\EDM32.EXE, run by enp.
> > > > > > 1 processor(s), type 586.
> > > > > > 128 MBytes physical memory.

> > > > > > Registers:
> > > > > > EAX=005b4c14 CS=0157 EIP=00412628 EFLGS=00000246
> > > > > > EBX=00000001 SS=015f ESP=0059f690 EBP=0059f698
> > > > > > ECX=005b4240 DS=015f ESI=0043e1d8 FS=1177
> > > > > > EDX=00000000 ES=015f EDI=005b4c14 GS=37f7
> > > > > > Bytes at CS:EIP:
> > > > > > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
> > > > > > Stack dump:
> > > > > > 0059f690: 00402a28 005b4c14 0059f6a8 5f402af0 0043e1d8
00000111
> > 0059f6d8
> > > > > > 5f402a49
> > > > > > 0059f6b0: 005b4c14 00000008 00000000 00402a13 00000000
0000000c
> > 00000000
> > > > > > 00000000
> > > > > > 0059f6d0: 005b4c14 00000008 0059f6fc 5f40b0c7 00000008
00000000
> > 00000000
> > > > > > 00000000
> > > > > > 0059f6f0: 00000008 005b4c14 00000000 0059f74c 5f402b72
00000008
> > 00000000
> > > > > > 00000000
> > > > > > 0059f710: 00000000 005b4c14 005b4c14 00000111 bff71547
005b4d8d
> > 005b4d8d
> > > > > > 0056023c
> > > > > > 0059f730: 0059f750 5f401ee9 8032dd70 00000b0c 00000215
00000000
> > 00000000
> > > > > > 0059f7cc
> > > > > > 0059f750: 5f401c45 00000000 00000b0c 005b4c14 005b4c14
0056023c
> > 00000000
> > > > > > 0059f7cc
> > > > > > 0059f770: 5f401aec 00000215 00000000 00000007 0059f81c
0000888c
> > 0059f868
> > > > > > 00000b0c
> > > > > > 0059f790: 00000202 00000000 000d001c 00000000 00000000
00000000
> > 5f401018
> > > > > > 00000008
> > > > > > 0059f7b0: 0059f81c 0000888c 0056023c 00000000 0059f840
5f492c79
> > ffffffff
> > > > > > 0059f7ec
> > > > > > 0059f7d0: 5f401b63 00000111 00000008 00000b0c 0059f7e8
00000111
> > 00000000
> > > > > > 0059f84c
> > > > > > 0059f7f0: 5f401aec 00000111 00000008 00000b0c 0059f89c
0000890c
> > 0059f8e8
> > > > > > 00000b0c
> > > > > > 0059f810: 00000202 00000000 000d001c 00000000 00000000
00000000
> > 5f401018
> > > > > > 00000008
> > > > > > 0059f830: 0059f89c 0000890c 0056023c 0059f800 0059f888
5f492bf1
> > 00000000
> > > > > > 0059f868
> > > > > > 0059f850: 5f401a74 00000000 00000ae8 00000111 00000008
00000b0c
> > 0059f894
> > > > > > 5f401a33
> > > > > > 0059f870: 00000ae8 00000111 00000008 00000b0c 00460078
0056023c
> > 0059f8d0
> > > > > > 5f492b6d
> > > > > > 0059f890: 00000000 0059f8b4 bff735d9 00000ae8 00000111
00000008
> > 00000b0c
> > > > > > 88e6413f
> > > > > > 0059f8b0: 0000015f 0059f8c8 bff9222f 37f7890c 000037f7
00000000
> > bff7197c
> > > > > > 00598906
> > > > > > 0059f8d0: 0059fb00 bff71831 88e6413f 00000000 37f788e6
00000000
> > 02020000
> > > > > > 89440000
> > > > > > 0059f8f0: 3b2e0002 168f0002 27370000 00000147 890c37f7
894a37f7
> > 16af3bfa
> > > > > > 00000004
> > > > > > 0059f910: 00000000 5f4019fa 00000b0c 00000008 00000111
00000ae8
> > 01110ae8
> > > > > > 00000008
> > > > > > 0059f930: 00000b0c 00017a1b 80020000 16af0000 37f70001
758037f7
> > 89888ddc
> > > > > > 00030000
> > > > > > 0059f950: 5f4019fa 177782e7 0b0c0000 00080000 0ae80111

...

read more »



Sun, 13 Jul 2003 14:20:27 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. A Nasty Debug Problem involving VB, VC (COM) and DLL

2. Nasty new operator problem

3. Interface problems with a nasty combo

4. Nasty problem with #pragma pack

5. Nasty problem with CDialogBar used in CReBar with background bitmap

6. Nasty Message problem for VC gurus

7. Nasty problem with #pragma pack

8. Heap Problems: Both Debug and non-Debug versions of CRT are active

9. Nasty (linker?) bug with 7.1, and friend templates

10. Nasty Bugs with Compiler Optimization

11. nasty BUG in debugger

12. Is it possible ?: some nasty numbers which are not generated by print functions

 

 
Powered by phpBB® Forum Software