Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Crash in try catch block Pin
itkid8-Nov-05 10:48
itkid8-Nov-05 10:48 
GeneralRe: Crash in try catch block Pin
Chris Losinger8-Nov-05 10:52
professionalChris Losinger8-Nov-05 10:52 
AnswerRe: Crash in try catch block Pin
David Crow8-Nov-05 11:04
David Crow8-Nov-05 11:04 
GeneralRe: Crash in try catch block Pin
itkid8-Nov-05 11:27
itkid8-Nov-05 11:27 
QuestionRe: Crash in try catch block Pin
David Crow9-Nov-05 2:22
David Crow9-Nov-05 2:22 
AnswerRe: Crash in try catch block Pin
itkid9-Nov-05 4:39
itkid9-Nov-05 4:39 
GeneralRe: Crash in try catch block Pin
David Crow9-Nov-05 6:01
David Crow9-Nov-05 6:01 
AnswerRe: Crash in try catch block Pin
James R. Twine9-Nov-05 7:11
James R. Twine9-Nov-05 7:11 
   A buffer with a length of 200 chars is more than large enough for a format specification of Error: %lx.

   The crash is also happening outside of the try/catch block - it is happening when you return from the function.  IME, a crash on return from a function is due to a fulblungered return address.  Generally, this is due to stepping on your stack somehow.  you can poke around by increasing the stack used both in the function and around any buffers populated by the function.

   For example, add TCHAR __caCrashBuf1[ 1024 ] at the top of the function, and something like TCHAR __caCrashBufzyx[ 1024 ] around any buffers used by the function.  If you do that and the crash stops or changes, you can narrow down the location that is stepping on the stack.

   I would also be investigating that TGTTRACE(...) function.  FWIW, it also looks like you can get rid of the logmsg buffer by building the error string in the TGTTRACE(...) function (no need to build strings twice):
TGTTRACE( llItemMedium, lLogError, L"Query Data Failed - Error: %lx", e.Error() );
   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
AnswerRe: Crash in try catch block Pin
Graham Bradshaw8-Nov-05 12:59
Graham Bradshaw8-Nov-05 12:59 
GeneralRe: Crash in try catch block Pin
itkid9-Nov-05 5:00
itkid9-Nov-05 5:00 
AnswerRe: Crash in try catch block Pin
Bob Stanneveld9-Nov-05 0:12
Bob Stanneveld9-Nov-05 0:12 
QuestionReading Files :doh: Pin
RedDragon2k8-Nov-05 9:00
RedDragon2k8-Nov-05 9:00 
AnswerRe: Reading Files :doh: Pin
douglasjordan8-Nov-05 9:12
douglasjordan8-Nov-05 9:12 
GeneralRe: Reading Files :doh: Pin
RedDragon2k8-Nov-05 9:24
RedDragon2k8-Nov-05 9:24 
AnswerRe: Reading Files :doh: Pin
Ravi Bhavnani8-Nov-05 10:46
professionalRavi Bhavnani8-Nov-05 10:46 
QuestionRe: Reading Files :doh: Pin
David Crow8-Nov-05 11:00
David Crow8-Nov-05 11:00 
AnswerRe: Reading Files :doh: Pin
ThatsAlok8-Nov-05 18:18
ThatsAlok8-Nov-05 18:18 
Questiondomain users and HKEY_USERS Pin
ky_rerun8-Nov-05 8:10
ky_rerun8-Nov-05 8:10 
AnswerRe: domain users and HKEY_USERS Pin
David Crow8-Nov-05 10:57
David Crow8-Nov-05 10:57 
GeneralRe: domain users and HKEY_USERS Pin
ky_rerun9-Nov-05 3:27
ky_rerun9-Nov-05 3:27 
GeneralRe: domain users and HKEY_USERS Pin
Blake Miller9-Nov-05 4:43
Blake Miller9-Nov-05 4:43 
AnswerRe: domain users and HKEY_USERS Pin
Graham Bradshaw8-Nov-05 13:03
Graham Bradshaw8-Nov-05 13:03 
QuestionString Table Pin
TUMB8-Nov-05 7:02
TUMB8-Nov-05 7:02 
AnswerRe: String Table Pin
David Crow8-Nov-05 7:37
David Crow8-Nov-05 7:37 
GeneralRe: String Table Pin
TUMB8-Nov-05 7:42
TUMB8-Nov-05 7:42 

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.