Click here to Skip to main content
16,009,391 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A very strange problem (to me at least) ..... Pin
CPallini8-Feb-08 0:05
mveCPallini8-Feb-08 0:05 
GeneralRe: A very strange problem (to me at least) ..... Pin
Matthew Faithfull8-Feb-08 0:09
Matthew Faithfull8-Feb-08 0:09 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 0:59
Still learning how to code8-Feb-08 0:59 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 1:31
Still learning how to code8-Feb-08 1:31 
QuestionRe: A very strange problem (to me at least) ..... Pin
CPallini8-Feb-08 2:17
mveCPallini8-Feb-08 2:17 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 2:37
Still learning how to code8-Feb-08 2:37 
GeneralRe: A very strange problem (to me at least) ..... Pin
CPallini8-Feb-08 2:50
mveCPallini8-Feb-08 2:50 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 3:23
Still learning how to code8-Feb-08 3:23 
(I don't know where my last posting went to !!!!)

I can't post the code where the 0xc00000005 exception occurs because it is somewhere in windows assembler (I assume !) Execution proceeds through CLogFile::Add() returns to OnDraw(), exits from that, exits from CView::OnPaint(), executes the CPaintDC destructor, exits OnWndMsg(), exits CWnd::WindowProc(), exits AfxCallWndProc(), exits AfxWndProc(), exits AfxProcBase() and then enters assembler and executes the following 4 code segments:-
1------------------------------------------------
7E418734 mov ecx,dword ptr fs:[18h]
7E41873B and byte ptr [ecx+0FB4h],0
7E418742 cmp dword ptr [esp+4],0DCBAABCDh
7E41874A jne 7E440378
7E418750 add esp,8
7E418753 pop ebx
7E418754 pop edi
7E418755 pop esi
7E418756 pop ebp
7E418757 ret 14h
2------------------------------------------------
7E418816 mov dword ptr [ebp-1Ch],eax
7E418819 or dword ptr [ebp-4],0FFh
7E41881D call 7E418841
7E418822 mov eax,dword ptr [ebp-1Ch]
7E418825 call 7E418600
7E41882A ret 20h
3---------------------------------------------------
7E41B4C0 mov dword ptr [ebp-1Ch],eax
7E41B4C3 mov eax,dword ptr [ebp-1Ch]
7E41B4C6 call 7E418600
7E41B4CB ret 14h
4-------------------------------------------------
7E41B50C push 0
7E41B50E push 0Ch
7E41B510 pop edx
7E41B511 lea ecx,[ebp-0Ch]
7E41B514 mov dword ptr [ebp-0Ch],eax
7E41B517 call 7E4194A4
----------------------------------------------------

The debugger will NOT step into this last call
The target of this call is the last byte of the first instruction below:-

7E4194A1 or eax,dword ptr [esi+edi*2-75h]
7E4194A5 inc esp
7E4194A6 and al,4
7E4194A8 int 2Bh
etc .......

This is clearly wrong, and will lead to mis-execution and presumably the 0xc000005 eventually

Doug
QuestionRe: A very strange problem (to me at least) ..... Pin
David Crow8-Feb-08 2:49
David Crow8-Feb-08 2:49 
GeneralRe: A very strange problem (to me at least) ..... Pin
Still learning how to code8-Feb-08 5:19
Still learning how to code8-Feb-08 5:19 
Generalnon-const static member variale initialization Pin
George_George7-Feb-08 21:16
George_George7-Feb-08 21:16 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull7-Feb-08 22:13
Matthew Faithfull7-Feb-08 22:13 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 1:49
George_George8-Feb-08 1:49 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull8-Feb-08 2:29
Matthew Faithfull8-Feb-08 2:29 
GeneralRe: non-const static member variale initialization Pin
led mike8-Feb-08 4:17
led mike8-Feb-08 4:17 
GeneralRe: non-const static member variale initialization Pin
Matthew Faithfull8-Feb-08 6:05
Matthew Faithfull8-Feb-08 6:05 
GeneralRe: non-const static member variale initialization Pin
led mike8-Feb-08 7:22
led mike8-Feb-08 7:22 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 21:28
George_George8-Feb-08 21:28 
GeneralRe: non-const static member variale initialization Pin
BadKarma7-Feb-08 22:37
BadKarma7-Feb-08 22:37 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 1:58
George_George8-Feb-08 1:58 
GeneralRe: non-const static member variale initialization Pin
BadKarma8-Feb-08 2:30
BadKarma8-Feb-08 2:30 
GeneralRe: non-const static member variale initialization Pin
George_George8-Feb-08 21:33
George_George8-Feb-08 21:33 
GeneralCOM class registration failed. Pin
Royaltvk7-Feb-08 20:09
Royaltvk7-Feb-08 20:09 
GeneralRe: COM class registration failed. Pin
CPallini7-Feb-08 23:13
mveCPallini7-Feb-08 23:13 
GeneralRe: COM class registration failed. Pin
Royaltvk8-Feb-08 0:28
Royaltvk8-Feb-08 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.