Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unhandled win32 exception? Pin
simoncoul19-Jun-07 9:15
simoncoul19-Jun-07 9:15 
GeneralRe: Unhandled win32 exception? Pin
simoncoul19-Jun-07 9:19
simoncoul19-Jun-07 9:19 
GeneralRe: Unhandled win32 exception? Pin
Mark Salsbery19-Jun-07 9:27
Mark Salsbery19-Jun-07 9:27 
GeneralRe: Unhandled win32 exception? Pin
simoncoul19-Jun-07 9:32
simoncoul19-Jun-07 9:32 
GeneralRe: Unhandled win32 exception? Pin
Mark Salsbery19-Jun-07 9:40
Mark Salsbery19-Jun-07 9:40 
GeneralRe: Unhandled win32 exception? Pin
Mark Salsbery19-Jun-07 9:30
Mark Salsbery19-Jun-07 9:30 
GeneralRe: Unhandled win32 exception? Pin
simoncoul19-Jun-07 9:44
simoncoul19-Jun-07 9:44 
AnswerRe: Unhandled win32 exception? Pin
Stephen Hewitt19-Jun-07 16:42
Stephen Hewitt19-Jun-07 16:42 
For info on the possible meaning of 0xBAADF00D see here[^].

I give the following advice about once a month (recently every few days); 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

QuestionIntervals of three Pin
Programm3r19-Jun-07 6:06
Programm3r19-Jun-07 6:06 
AnswerRe: Intervals of three Pin
David Crow19-Jun-07 6:08
David Crow19-Jun-07 6:08 
GeneralRe: Intervals of three Pin
Programm3r19-Jun-07 6:12
Programm3r19-Jun-07 6:12 
QuestionRe: Intervals of three Pin
Programm3r19-Jun-07 6:28
Programm3r19-Jun-07 6:28 
AnswerRe: Intervals of three Pin
David Crow19-Jun-07 6:38
David Crow19-Jun-07 6:38 
QuestionRe: Intervals of three {MOD} Pin
Programm3r19-Jun-07 7:25
Programm3r19-Jun-07 7:25 
AnswerRe: Intervals of three {MOD} Pin
David Crow19-Jun-07 7:48
David Crow19-Jun-07 7:48 
GeneralRe: Intervals of three {MOD} Pin
Programm3r19-Jun-07 7:56
Programm3r19-Jun-07 7:56 
AnswerRe: Intervals of three Pin
Iain Clarke, Warrior Programmer19-Jun-07 6:09
Iain Clarke, Warrior Programmer19-Jun-07 6:09 
QuestionRe: Intervals of three Pin
David Crow19-Jun-07 6:12
David Crow19-Jun-07 6:12 
AnswerRe: Intervals of three Pin
Iain Clarke, Warrior Programmer19-Jun-07 10:58
Iain Clarke, Warrior Programmer19-Jun-07 10:58 
GeneralRe: Intervals of three Pin
Programm3r19-Jun-07 6:13
Programm3r19-Jun-07 6:13 
QuestionMemo datatype gives error in Recordset Pin
shivditya19-Jun-07 5:48
shivditya19-Jun-07 5:48 
AnswerRe: Memo datatype gives error in Recordset Pin
ahmad_ali20-Jun-07 4:35
ahmad_ali20-Jun-07 4:35 
AnswerRe: Memo datatype gives error in Recordset Pin
shivditya20-Jun-07 4:51
shivditya20-Jun-07 4:51 
QuestionC++ Timing, Profiler and timers Pin
wings219-Jun-07 5:45
wings219-Jun-07 5:45 
AnswerRe: C++ Timing, Profiler and timers Pin
softwaremonkey19-Jun-07 6:09
softwaremonkey19-Jun-07 6:09 

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.