Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

PInvokeStackImbalance in devenv
vosen
#1 Posted : Monday, November 7, 2016 10:24:55 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/13/2014(UTC)
Posts: 4
Location: Poland

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.
Remco
#2 Posted : Monday, November 7, 2016 8:17:59 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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?
vosen
#3 Posted : Monday, November 7, 2016 8:33:44 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/13/2014(UTC)
Posts: 4
Location: Poland

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.
Remco
#4 Posted : Monday, November 7, 2016 9:09:05 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
vosen;9376 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?
vosen
#5 Posted : Monday, November 7, 2016 9:18:00 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/13/2014(UTC)
Posts: 4
Location: Poland

Windows 8.1 Pro with Update 1 (6.3.9600)
Just with debugger attached and appropriate Managed Debugging Assistant enabled.
Remco
#6 Posted : Tuesday, November 8, 2016 12:13:14 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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.
vosen
#7 Posted : Wednesday, November 9, 2016 6:16:37 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/13/2014(UTC)
Posts: 4
Location: Poland

Yes, 2.27 runs without debugger attached.
Remco
#8 Posted : Wednesday, November 9, 2016 8:43:09 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
vosen;9386 wrote:
Yes, 2.27 runs without debugger attached.


Thanks for confirming! I'll see what I can do to reproduce this issue.
Remco
#9 Posted : Tuesday, November 29, 2016 2:58:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
A fix for this is now available in NCrunch V3.

http://blog.ncrunch.net/post/Announcing-NCrunch-Version-3!.aspx.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.048 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download