Click here to Skip to main content
15,900,589 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with read in CFile class Pin
Chuck O'Toole22-Oct-11 9:44
Chuck O'Toole22-Oct-11 9:44 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 21:33
mveRichard MacCutchan22-Oct-11 21:33 
GeneralRe: Problem with read in CFile class Pin
antonio34323-Oct-11 0:43
antonio34323-Oct-11 0:43 
QuestionMFC dialog + ResizableLib + splitter Pin
Dialecticus21-Oct-11 5:05
Dialecticus21-Oct-11 5:05 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
Richard MacCutchan21-Oct-11 6:26
mveRichard MacCutchan21-Oct-11 6:26 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
TheGreatAndPowerfulOz21-Oct-11 9:17
TheGreatAndPowerfulOz21-Oct-11 9:17 
QuestionProblem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 17:41
tasumisra20-Oct-11 17:41 
AnswerRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 21:41
mveRichard MacCutchan20-Oct-11 21:41 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 21:58
tasumisra20-Oct-11 21:58 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 23:01
mveRichard MacCutchan20-Oct-11 23:01 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra24-Oct-11 2:03
tasumisra24-Oct-11 2:03 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan24-Oct-11 3:46
mveRichard MacCutchan24-Oct-11 3:46 
AnswerRe: Fix the registry Pin
Goto_Label_21-Oct-11 6:59
Goto_Label_21-Oct-11 6:59 
QuestionvString Pin
Tyler Elric20-Oct-11 16:48
Tyler Elric20-Oct-11 16:48 
AnswerRe: vString Pin
Tyler Elric20-Oct-11 16:57
Tyler Elric20-Oct-11 16:57 
AnswerRe: vString Pin
Richard Andrew x6420-Oct-11 18:02
professionalRichard Andrew x6420-Oct-11 18:02 
GeneralRe: vString Pin
Tyler Elric21-Oct-11 1:50
Tyler Elric21-Oct-11 1:50 
QuestionRe: vString Pin
Niklas L21-Oct-11 3:21
Niklas L21-Oct-11 3:21 
AnswerRe: vString Pin
Tyler Elric21-Oct-11 4:20
Tyler Elric21-Oct-11 4:20 
GeneralRe: vString Pin
Niklas L23-Oct-11 8:14
Niklas L23-Oct-11 8:14 
GeneralRe: vString Pin
Tyler Elric23-Oct-11 8:39
Tyler Elric23-Oct-11 8:39 
GeneralRe: vString Pin
Niklas L24-Oct-11 22:28
Niklas L24-Oct-11 22:28 
QuestionRegarding IntelliTrace equivalent tool in C++ Pin
ramana.g20-Oct-11 12:54
ramana.g20-Oct-11 12:54 
AnswerRe: Regarding IntelliTrace equivalent tool in C++ Pin
Luc Pattyn20-Oct-11 14:19
sitebuilderLuc Pattyn20-Oct-11 14:19 
Typically I don't rely on debuggers, they aren't helping me much (for small programs there is no need, and for large complex ones they just aren't good enough).

This is what I do:
1. include good old-fashioned logging to a file, i.e. append one line of text telling what piece of code is executing, what the value is of some key variables, etc, all with a timestamp and a thread ID.
2. run the program a number of times; if it doesn't fail frequently enough, try and force it to fail more often by either stressing the system (less free RAM, more CPU load, whatever is relevant) or by increasing its activity (e.g. lowering its timer's periods or feeding it more input).
3. then compare all the logs, looking for a pattern at the moments of the crashes.

It is essential to have the latest information in the log file, therefore I open-append-close it for each and every line; and it may need locking for thread synchronization (although I typically try it without, as that is less intrusive).
All this (and anything you might do) may alter the timing a bit (and change thread synchronization, and cause more or fewer deadlocks), but most often it is adequate to pinpoint the problem. Of course, when the log file isn't detailed enough, I keep adding log statements. It all may sound antiquated, in my experience it works great, and all it takes is intimate knowledge about your app, and some energy; no need to get familiar with debugger idiosyncrasies.

Note: Having only one author for all the code is a big help; having lots of programmers, third party products, etc. all contributing to the crashing app may make it almost unsolvable.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Regarding IntelliTrace equivalent tool in C++ Pin
Philippe Mori20-Oct-11 16:24
Philippe Mori20-Oct-11 16:24 

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.