Re: Getting "Unhandled exception" error when running in IDE
From: Peter Steele (psteele_at_z-force.com)
Date: 02/09/05
- Next message: Tarek Madkour [MSFT]: "Re: I am so frusterated with how slow MSVC is"
- Previous message: Chris Stankevitz: "Re: I am so frusterated with how slow MSVC is"
- In reply to: mosimu: "RE: Getting "Unhandled exception" error when running in IDE"
- Next in thread: Oleg Starodumov: "Re: Getting "Unhandled exception" error when running in IDE"
- Reply: Oleg Starodumov: "Re: Getting "Unhandled exception" error when running in IDE"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Feb 2005 13:23:22 -0800
I believe this STL routine is used when comparing strings and it gets called
various other times without exceptions occurring. When the exception does
occur, the call stack has several instances of ntdll.dll on it but does not
show the functions in our code that lead to the point of the crash. Based on
the content of the strings are the time the exception occurs I can narrow
down where the STL comparison likely took place. I might try changing it to
using C string comparison instead of STL string comparison and see what
happens.
"mosimu" <mosimu@discussions.microsoft.com> wrote in message
news:7C570237-1F33-46F5-A01C-B0E62C053DD1@microsoft.com...
> You are going to have to narrow it down. The first thing I would try is
> to
> compare zero characters and see if the exception still occurs.
>
> return ::memcmp(_First1, _First2, 0);
>
> Then go up incrementally by 1 until the error occurs. If it occurs right
> away on the first or second character then make sure you are passing in
> the
> right values, now I have never used the STL string class but make sure it
> is
> actually passing in the correct pointer, in other words that it is passing
> in
> an ANSI string pointer instead of UNICODE or whichever is the correct one.
> Like I said I have never used this string class so you know more than I
> do.
>
> mosimu
>
> "Peter Steele" wrote:
>
>> We have an application that when it runs in the IDE in debug mode an
>> unhandled exception is occurring in a system header file associated with
>> STL
>> stirngs. The actual statement that crashes is
>>
>> return ::memcmp(_First1, _First2, _Count);
>>
>> On inspecting these variables, the strings are in fact equal when the
>> exception occurs and _Count is the right size. As a test I replaced this
>> code in the system include file with a for loop to do the comparison, and
>> after doing this the exception *still* occurs. It doesn't report anything
>> about the exception, other than the dialog "Unhandled exception". If we
>> run
>> this same app outside of the IDE we do not see this error. What's going
>> on
>> here anyway?
>>
>>
>>
- Next message: Tarek Madkour [MSFT]: "Re: I am so frusterated with how slow MSVC is"
- Previous message: Chris Stankevitz: "Re: I am so frusterated with how slow MSVC is"
- In reply to: mosimu: "RE: Getting "Unhandled exception" error when running in IDE"
- Next in thread: Oleg Starodumov: "Re: Getting "Unhandled exception" error when running in IDE"
- Reply: Oleg Starodumov: "Re: Getting "Unhandled exception" error when running in IDE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|