AnsweredAssumed Answered

Error message:  Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'C:\Program Files (x86)\ArcGIS\Desktop10.4\bin\ArcMap.exe'.

Question asked by jsn on Dec 1, 2017
Latest reply on Apr 10, 2018 by jsn

Hello everyone,

 

I am getting this error message after importing an AddIn to  and started comiling the code with VS 2015:

 

Framework:  VS 2015 and ArcGIS 10.4.1  

 

PInvokeStackImbalance occurred.


Message: Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'C:\Program Files (x86)\ArcGIS\Desktop10.4\bin\ArcMap.exe'.
Additional information: A call to PInvoke function 'ESRI.ArcGIS.ADF.Local!ESRI.ArcGIS.ADF.Native::memcpy' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

Outcomes