Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unhandled Exception 0xC0000005 Pin
Stephen Hewitt10-May-07 21:16
Stephen Hewitt10-May-07 21:16 
GeneralRe: Unhandled Exception 0xC0000005 Pin
Mark Salsbery11-May-07 5:33
Mark Salsbery11-May-07 5:33 
GeneralRe: Unhandled Exception 0xC0000005 Pin
Stephen Hewitt11-May-07 16:16
Stephen Hewitt11-May-07 16:16 
GeneralRe: Unhandled Exception 0xC0000005 Pin
Mark Salsbery11-May-07 5:52
Mark Salsbery11-May-07 5:52 
AnswerRe: Unhandled Exception 0xC0000005 Pin
Cedric Moonen10-May-07 21:11
Cedric Moonen10-May-07 21:11 
GeneralRe: Unhandled Exception 0xC0000005 Pin
tom groezer10-May-07 21:29
tom groezer10-May-07 21:29 
GeneralRe: Unhandled Exception 0xC0000005 Pin
tom groezer10-May-07 21:43
tom groezer10-May-07 21:43 
AnswerRe: Unhandled Exception 0xC0000005 Pin
Stephen Hewitt11-May-07 16:20
Stephen Hewitt11-May-07 16:20 
Your not really giving enough information for anyone to help you. There are many possible causes for an access violation. I give the following advice about once a month; it often helps me track down the nastier heap errors:

Try enabling the page heap[^] for your process. Follow these steps:
1. Download and install WinDBG[^].
2. Select “Start”->“All Programs”->“Debugging Tools for Windows”->“Global Flags”.
3. Select the “Image File” tab.
4. In the “Image: (TAB to refresh)” edit control enter the name of your app then press TAB. Just the name with the extension; not the full path.
5. Tick the following:
- “Enable page heap”
- “Enable heap tail checking”
- “Enable heap free checking”
- “Enable heap parameter checking”
- “Enable heap validation on call”
- “Create user mode stack trace database”
6. Press “Apply”.
7. Debug your application. Any debugger will do but with WinDBG you have access to the stack traces of allocations via the !heap –p –a command, for example. When a heap problem is detected a breakpoint will be generated.
8. When done un-tick all the options you ticked, press “Apply” then dismiss GFlags. This step is important as if it’s skipped all applications named as entered in step 4 will run with the page heap enabled.

Note that when using the page heap your application will run much slower than normal and consume way more memory. It’s good to have a beefy machine to do such tests; and such tests should be ran regularly on all applications you develop as part of regular testing activities. If I find a part of my application that’s too slow with the page heap enabled I optimize the memory allocation in that region.


Steve

QuestionAPI/SDK for Office Communicator 2007 Pin
Michael.Duan10-May-07 20:39
Michael.Duan10-May-07 20:39 
QuestionHow TO Create A Menu At The Bottom Pin
jannathali10-May-07 20:36
jannathali10-May-07 20:36 
AnswerRe: How TO Create A Menu At The Bottom Pin
Hamid_RT11-May-07 0:29
Hamid_RT11-May-07 0:29 
GeneralRe: How TO Create A Menu At The Bottom Pin
jannathali11-May-07 1:56
jannathali11-May-07 1:56 
QuestionMDI problem Pin
Aint10-May-07 20:28
Aint10-May-07 20:28 
AnswerRe: MDI problem Pin
Arman S.10-May-07 20:37
Arman S.10-May-07 20:37 
AnswerRe: MDI problem Pin
bob1697210-May-07 20:40
bob1697210-May-07 20:40 
GeneralRe: MDI problem Pin
Aint10-May-07 20:59
Aint10-May-07 20:59 
GeneralRe: MDI problem Pin
bob1697211-May-07 2:03
bob1697211-May-07 2:03 
Questionemail page creation Pin
santhi_malli10-May-07 19:42
santhi_malli10-May-07 19:42 
QuestionClass and pointer Pin
C_Zealot10-May-07 18:43
C_Zealot10-May-07 18:43 
AnswerRe: Class and pointer Pin
bob1697210-May-07 19:18
bob1697210-May-07 19:18 
GeneralRe: Class and pointer Pin
C_Zealot10-May-07 19:35
C_Zealot10-May-07 19:35 
GeneralRe: Class and pointer Pin
bob1697210-May-07 19:53
bob1697210-May-07 19:53 
AnswerRe: Class and pointer Pin
vibindia10-May-07 19:27
vibindia10-May-07 19:27 
GeneralRe: Class and pointer Pin
C_Zealot10-May-07 19:36
C_Zealot10-May-07 19:36 
AnswerRe: Class and pointer Pin
Stephen Hewitt10-May-07 19:36
Stephen Hewitt10-May-07 19:36 

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.