ERROR

Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in...

Last Published: April 26, 2020

Error Message

When debugging in Visual Studio 2013 or Visual Studio 2015 with ArcGIS Engine applications and ArcGIS for Desktop add-ins that reference ESRI.ARCGIS.ADF.Local.dll, The following error can occur:
 

Error:   
"Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in
 '<Path to add-in or application dll/exe>'."

Error messages may be encountered such as the following:

[O-Image]
[O-Image]

Cause

The reference to ESRI.ARCGIS.ADF.Local.dll in ArcGIS Engine applications or ArcGIS Desktop add-ins can throw the PInvokeStackImbalance message.

Solution or Workaround

To resolve this issue, uncheck the 'Break when this exception type is thrown' checkbox in the error message dialog and continue debugging.
 

    Article ID:000012655

    Software:
    • ArcGIS Engine
    • ArcMap
    • ArcObjects SDK Microsoft NET Framework

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic