Re: Need Help Debugging

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What is the code of the exception that brings your application down? You can look it up under 'Exception number' in the DrWatson Log. The code should give you a hint on the reason of the crash.

--Johannes

Ben wrote:
I have a non-managed c++ service that has a crash periodically.

I analyze the DrWatson dump and every time it seems to point to a
ntdll!RtlInitializeCriticalSectionAndSpinCount. I do use
CRITICAL_SECTIONS often throughout the code to manage access to the
variables, since it's a multi-threaded app.

Is there a certain rule of thumb when using Critical Sections to avoid
this ? I saw in MSDN they say to call
InitializeCriticalSectionAndSpinCount instead of just
InitializeCriticalSection in order to avoid memory resource exceptions
on pre-windows-XP systems... but our clients are XP, so I think i'm ok
with using InitializeCriticalSection. Maybe there's something more
recommended to use ?

In my searches, i'm seen some references to stack overflows... i'm not
too familiar with how to avoid it ? can someone offer some
guidance ? I know we use some string variables that can hold a few MB
of xml data... usually they are declared as an STL "string" and passed
as references. Do I need to use 'new' to allocate these large vars ?
does that avoid using the stack ?!?

Thanks for any tips!
ben



--
Johannes Passing - http://int3.de/
.



Relevant Pages

  • Re: Need Help Debugging
    ... can look it up under 'Exception number' in the DrWatson Log. ... InitializeCriticalSection in order to avoid memory resource exceptions ... Johannes Passing -http://int3.de/- Hide quoted text - ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Restaurant Rules
    ... always try at least one new dish, and avoid those you ... Steakhouses: order steak. ... The exception rather than the rule: ...
    (rec.food.cooking)
  • Re: Restaurant Rules
    ... always try at least one new dish, and avoid those you ... Steakhouses: order steak. ... The exception rather than the rule: ...
    (rec.food.cooking)
  • Re: RIP: Ike Turner
    ... I won't tell you what my wife weighs). ... working in a hospital ER and the general truth of the ... Exception that proves the rule? ... I try hard to avoid trying situations -- like violence. ...
    (rec.music.makers.guitar.acoustic)
  • Re: is it ok to return null?
    ... But the goal should not necessarily be to avoid an exception. ... That's not to say I don't agree with returning an empty array from a ... by the advice to return an empty string to avoid a null. ...
    (comp.lang.java.help)