Re: Getting "Unhandled exception" error when running in IDE

From: Peter Steele (psteele_at_z-force.com)
Date: 02/09/05


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?
>>
>>
>>



Relevant Pages

  • RE: Detailed ASP.Net info not displaying in browser
    ... HTTP 500 page when an exception is thrown from the web service. ... at VOSE.Data.DataRequest.dr_DB2Process.DeleteCommRows(String company, String ... objQueue, tOrderManagementIndicator omindicator, Int32 intTriggerId) in ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.xml)
  • RE: Detailed ASP.Net info not displaying in browser
    ... HTTP 500 page when an exception is thrown from the web service. ... at VOSE.Data.DataRequest.dr_DB2Process.DeleteCommRows(String company, String ... objQueue, tOrderManagementIndicator omindicator, Int32 intTriggerId) in ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.xml)
  • Re: App_data - ASPNETDB.MDF
    ... is only because I want my site work, without exception. ... Server Error in '/' Application. ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Error handling not working
    ... Dim exception As Exception = Server.GetLastError.GetBaseException ... Dim ErrorString as String ... GetBaseException retrieves the "real" innerException object. ... CustomErrors in my webconfig file: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Could not load file or assembly...
    ... The problem shows when EL exception handling ... context, ExceptionHandlerData objectConfiguration, IConfigurationSource ... configurationSource, ConfigurationReflectionCache reflectionCache) ... context, String name, IConfigurationSource configurationSource, ...
    (microsoft.public.dotnet.framework)