By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,083 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

Mixed code + 'System.InvalidProgramException' when debugging

P: n/a
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.

Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On May 5, 7:03*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:
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/Sho...35614&SiteID=1

Still doesnt help me because I cant use /clr:pure as I have mixed
code.
Jun 27 '08 #2

P: n/a
On May 5, 7:17*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:
On May 5, 7:03*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:


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/Sho...35614&SiteID=1

Still doesnt help me because I cant use /clr:pure as I have mixed
code.- Hide quoted text -

- Show quoted text -
Here is the thread on MSDN forum:

http://forums.microsoft.com/MSDN/Sho...iteID=1&mode=1
Jun 27 '08 #3

P: n/a
On May 6, 11:27*am, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:
On May 5, 7:17*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:


On May 5, 7:03*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:
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/Sho...35614&SiteID=1
Still doesnt help me because I cant use /clr:pure as I have mixed
code.- Hide quoted text -
- Show quoted text -

Here is the thread on MSDN forum:

http://forums.microsoft.com/MSDN/Sho...0&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/Sho...iteID=1&mode=1

Thanks for all your efforts!
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.