Daily Usage Issues

PInvokeStackImbalance in devenv

Started by vosen on 9,819 views

When launching Visual Studio 2015 with NCrunch installed under Visual Studio 2015 debugger I'm getting an exception:

Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe'.
Additional information: A call to PInvoke function 'nCrunch.Core!nCrunch.Core.Threading.ThreadExtensions:: ' 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.

Happens with NCrunch 2.27.0.3, didn't happen with a previous version I was using (2.23 I think).

EDIT: I've just checked all the major version 2.23-2.27 and 2.23 is the last one where this doesn't happen.

Edited

Hi, thanks for sharing this issue.

Can you confirm how many processors your machine has?

Does this exception cause the IDE to explode and shut down? Or does it seem to be benign?
1 processor with 4 cores (8 if you count HT).
I didn't try continuing after this warning. I assumed that the error is genuine and in the grand scheme of things it'll be better to run for now an older version.
vosen wrote:1 processor with 4 cores (8 if you count HT).
I didn't try continuing after this warning. I assumed that the error is genuine and in the grand scheme of things it'll be better to run for now an older version.


Thanks. Just a couple more questions to help me work this one out:

- Which O/S are you running?
- Is this exception happening while the debugger is attached? Or does the IDE just explode on its own when you run it? Have you found any way that will let you run 2.27 on your machine?
Windows 8.1 Pro with Update 1 (6.3.9600)
Just with debugger attached and appropriate Managed Debugging Assistant enabled.
Does v2.27 run without any debugger attached? Sorry, this is important because I need to know if the exception is merely being kicked up by the debugger or if its a catastrophic exception that will tear down the IDE process without a debugger attached.
Yes, 2.27 runs without debugger attached.
vosen wrote:Yes, 2.27 runs without debugger attached.


Thanks for confirming! I'll see what I can do to reproduce this issue.

Post a reply

Log in to reply.