Mixed code + 'System.InvalidProgramException' when debugging

P

Pixel.to.life

All,


A question on JIT debugging with VS2005.


I have a managed app that builds great on one machine (Vista Home
basic, VS2005, JIT enabled for managed/unmanaged code). I can also
debug it on this machine with breakpoints and all.


Now I move the same code on another machine (XP Pro, VS2005, JIT
enabled for both managed/unmanaged code). On this machine, it builds
fine too. And it runs like a cake in both debug/release configuration
AS LONG AS no breakpoints are added and enabled. As soon as a single
breakpoint is added (no matter where in the managed code), it crashes
when debugging with this exception:


CLR: Invalid x86 breakpoint in IL stream
First-chance exception at 0x7c812a5b in TestProgram.exe: 0x02345678:
0x2345678.
A first chance exception of type 'System.InvalidProgramException'
occurred in TestProgram.exe

Note that this is generated from mixed code (managed C++ and native C+
+) with some interoperability. Some core modules are in native C that
I dont want to port to C# yet.


Any input will be greatly appreciated!


Thanks,


P.
 
P

Pixel.to.life

All,

A question on JIT debugging with VS2005.

I have a managed app that builds great on one machine (Vista Home
basic, VS2005, JIT enabled for managed/unmanaged code). I can also
debug it on this machine with breakpoints and all.

Now I move the same code on another machine (XP Pro, VS2005, JIT
enabled for both managed/unmanaged code). On this machine, it builds
fine too. And it runs like a cake in both debug/release configuration
AS LONG AS no breakpoints are added and enabled. As soon as a single
breakpoint is added (no matter where in the managed code), it crashes
when debugging with this exception:

CLR: Invalid x86 breakpoint in IL stream
First-chance exception at 0x7c812a5b in TestProgram.exe: 0x02345678:
0x2345678.
A first chance exception of type 'System.InvalidProgramException'
occurred in TestProgram.exe

Note that this is generated from mixed code (managed C++ and native C+
+) with some interoperability. Some core modules are in native C that
I dont want to port to C# yet.

Any input will be greatly appreciated!

Thanks,

P.

More information:

I found another thread on MSDN forum with similar symptoms descrobed:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1435614&SiteID=1

Still doesnt help me because I cant use /clr:pure as I have mixed
code.
 
P

Pixel.to.life

Here is the thread on MSDN forum:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3299330&SiteID=....- Hide quoted text -

- Show quoted text -

I got an answer on the MSDN forum and it works.

Basically it is a bug that was fixed in VisualStudio2008. I am using
VS2005, so with mixed code, I have to choose 'managed only' for
debugging.

Here is a link to the solution:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3306870&SiteID=1&mode=1

Thanks for all your efforts!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top