Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Regarding IntelliTrace equivalent tool in C++ Pin
Erudite_Eric20-Oct-11 20:20
Erudite_Eric20-Oct-11 20:20 
AnswerRe: Regarding IntelliTrace equivalent tool in C++ Pin
Stefan_Lang21-Oct-11 2:37
Stefan_Lang21-Oct-11 2:37 
AnswerRe: Regarding IntelliTrace equivalent tool in C++ Pin
Bram van Kampen21-Oct-11 16:14
Bram van Kampen21-Oct-11 16:14 
Questionprogramming in c++ Pin
maheen zahra20-Oct-11 6:09
maheen zahra20-Oct-11 6:09 
AnswerRe: programming in c++ Pin
Richard MacCutchan20-Oct-11 7:17
mveRichard MacCutchan20-Oct-11 7:17 
AnswerRe: programming in c++ Pin
Albert Holguin20-Oct-11 7:18
professionalAlbert Holguin20-Oct-11 7:18 
AnswerRe: programming in c++ Pin
Erudite_Eric20-Oct-11 7:28
Erudite_Eric20-Oct-11 7:28 
GeneralRe: programming in c++ Pin
Albert Holguin20-Oct-11 9:30
professionalAlbert Holguin20-Oct-11 9:30 
GeneralRe: programming in c++ Pin
Erudite_Eric20-Oct-11 20:17
Erudite_Eric20-Oct-11 20:17 
GeneralRe: programming in c++ Pin
Albert Holguin21-Oct-11 4:46
professionalAlbert Holguin21-Oct-11 4:46 
GeneralRe: programming in c++ Pin
afsus23-Dec-11 23:44
afsus23-Dec-11 23:44 
GeneralRe: programming in c++ Pin
Manfred Rudolf Bihy20-Oct-11 15:49
professionalManfred Rudolf Bihy20-Oct-11 15:49 
GeneralRe: programming in c++ Pin
Erudite_Eric20-Oct-11 20:14
Erudite_Eric20-Oct-11 20:14 
AnswerRe: programming in c++ Pin
Bram van Kampen21-Oct-11 16:23
Bram van Kampen21-Oct-11 16:23 
Questionhow about setting MFC IN C++ Pin
afsus20-Oct-11 0:44
afsus20-Oct-11 0:44 
AnswerRe: how about setting MFC IN C++ Pin
André Kraak20-Oct-11 3:49
André Kraak20-Oct-11 3:49 

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.