473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

A first chance exception of type 'System.InvalidProgramException'when adding breakpoints for debugging

Gurus,

Another question on one of the coveted Microsoft products: JIT
debugger 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

I looked around on the internet and all I found on forums was Micosoft
MVPs talking about details that I dont care about (bugs in the compile/
assembler etc.). I have a professional grade product and it should
allow me to do basic debugging.. I dont care if it can help build
airplanes or not.

I am looking for a plain answer as to why this is happening and why
this hasnt been addressed yet after so many complaints.

Any takers form Seattle? :-)
Jun 27 '08 #1
7 1805
On May 5, 3:02*pm, "Pixel.to.life" <pixel.to.l...@gmail.comwrote:
Gurus,

Another question on one of the coveted Microsoft products: JIT
debugger 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

I looked around on the internet and all I found on forums was Micosoft
MVPs talking about details that I dont care about (bugs in the compile/
assembler etc.). *I have a professional grade product and it should
allow me to do basic debugging.. I dont care if it can help build
airplanes or not.

I am looking for a plain answer as to why this is happening and why
this hasnt been addressed yet after so many complaints.

Any takers form Seattle? :-)
No takers, eh???
Jun 27 '08 #2
On Mon, 05 May 2008 17:43:28 -0700, Pixel.to.life
<pi***********@gmail.comwrote:
[...]
>Any takers form Seattle? :-)

No takers, eh???
First of all, while a handful of Microsoft-paid people do monitor this
newsgroup, mostly they are answering questions from MSDN subscribers.
Your expectation that "takers form [sic] Seattle" are going to answer your
question is unrealistic (unless of course you're an MSDN subscriber, in
which case hopefully you'll get an answer as your subscription entitles
you to).

Secondly, you didn't even wait three hours before following up your own
post. Even assuming you're an MSDN subscriber, you are being too
impatient, and of course with respect to any of the other people who read
this newsgroup and might reply, that's just WAY too impatient. Keep your
shorts on. It could take as much as a day or two for someone who has a
specific answer to see and answer your question.

Thirdly, I have no idea what you mean about "after so many complaints".
Do you have evidence that the issue you're running into is common? It
certainly doesn't seem common to me, and I would guess that the many other
people following this newsgroup don't find it common either. Indeed, if
there were in fact a relatively common problem with Visual Studio in which
you could not set a breakpoint, no one would use it. That alone should
indicate to you that whatever's going on is uncommon.

Finally, the fact that it's breaking only on one computer strongly
suggests that you simply have something wrong with that computer. The
first thing I'd try if I were you would be to uninstall Visual Studio and
..NET, and then reinstall both. And if that didn't fix the problem, I'd
look at uninstalling everything again, running the XP repair console (from
your installation CD) to ensure that XP isn't corrupted, and then
reinstall again. I'd say that there's a pretty good chance those actions
would at some point correct the problem and if they didn't, the next thing
I'd do is reinstall the OS and everything else from scratch.

I know that's a pain, but when an unusual problem such as the one you're
describing shows up, it's sometimes the only option that will work.

Pete
Jun 27 '08 #3
On May 5, 6:02*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 05 May 2008 17:43:28 -0700, Pixel.to.life *

<pixel.to.l...@gmail.comwrote:
[...]
Any takers form Seattle? :-)
No takers, eh???

First of all, while a handful of Microsoft-paid people do monitor this *
newsgroup, mostly they are answering questions from MSDN subscribers. *
Your expectation that "takers form [sic] Seattle" are going to answer your*
question is unrealistic (unless of course you're an MSDN subscriber, in *
which case hopefully you'll get an answer as your subscription entitles *
you to).

Secondly, you didn't even wait three hours before following up your own *
post. *Even assuming you're an MSDN subscriber, you are being too *
impatient, and of course with respect to any of the other people who read *
this newsgroup and might reply, that's just WAY too impatient. *Keep your *
shorts on. *It could take as much as a day or two for someone who has a *
specific answer to see and answer your question.

Thirdly, I have no idea what you mean about "after so many complaints". *
Do you have evidence that the issue you're running into is common? *It *
certainly doesn't seem common to me, and I would guess that the many other*
people following this newsgroup don't find it common either. *Indeed, if*
there were in fact a relatively common problem with Visual Studio in which*
you could not set a breakpoint, no one would use it. *That alone should *
indicate to you that whatever's going on is uncommon.

Finally, the fact that it's breaking only on one computer strongly *
suggests that you simply have something wrong with that computer. *The *
first thing I'd try if I were you would be to uninstall Visual Studio and *
.NET, and then reinstall both. *And if that didn't fix the problem, I'd *
look at uninstalling everything again, running the XP repair console (from*
your installation CD) to ensure that XP isn't corrupted, and then *
reinstall again. *I'd say that there's a pretty good chance those actions *
would at some point correct the problem and if they didn't, the next thing*
I'd do is reinstall the OS and everything else from scratch.

I know that's a pain, but when an unusual problem such as the one you're *
describing shows up, it's sometimes the only option that will work.

Pete
Thanks Pete. Are you an MVP with Microsoft? Because the only useful
information I found in your reply was in ~10% of the text. Rest all I
could throw away. Hah:-)

Anyways, I appreciate what you suggest, but I am still willing to
understand the problem rather than trying hasty system un/re-installs.

I am running PEVerify.exe on the binary to see if it points out any
glitches in the metadata / intermediate assembly first.

Btw a thread persists with same question on MSDN forum for Csharp.. no
takers yet.
Jun 27 '08 #4
On Mon, 05 May 2008 18:33:59 -0700, Pixel.to.life
<pi***********@gmail.comwrote:
Thanks Pete. Are you an MVP with Microsoft? Because the only useful
information I found in your reply was in ~10% of the text. Rest all I
could throw away. Hah:-)
You could, assuming you are happy getting a reputation as someone not
worth helping. People asking for free help and who are impatient are
often ignored outright.
Anyways, I appreciate what you suggest, but I am still willing to
understand the problem rather than trying hasty system un/re-installs.
If a reinstall fixes the problem, then there's nothing to "understand".
It's a simple matter of some component in the various layers that got
corrupted. You could waste a lot of time tracking down exactly what got
corrupted, and not come to any useful conclusion except that the fix is to
uninstall and reinstall.

On the other hand, if you uninstall and reinstall, all the way down to a
clean OS reinstall, and the problem persists then you can confidently
start investigating more thoroughly, knowing that the effort will be
rewarded with an answer to a consistently reproducible problem.

I doubt you'll get that far, but at least if you do you'll know that
you're not wasting your time.
I am running PEVerify.exe on the binary to see if it points out any
glitches in the metadata / intermediate assembly first.
And if there are, then what? If there's some problem with the compiled
assembly, all that tells you is that whatever's corrupted is leading to a
corrupted assembly.
Btw a thread persists with same question on MSDN forum for Csharp.. no
takers yet.
The fact that no one has a specific answer there should be a strong
indication that this isn't a common problem, and that you're unlikely to
find anyone here with any better answer than that given already.

Pete
Jun 27 '08 #5
On May 5, 8:18*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 05 May 2008 18:33:59 -0700, Pixel.to.life *

<pixel.to.l...@gmail.comwrote:
Thanks Pete. Are you an MVP with Microsoft? Because the only useful
information I found in your reply was in ~10% of the text. Rest all I
could throw away. Hah:-)

You could, assuming you are happy getting a reputation as someone not *
worth helping. *People asking for free help and who are impatient are *
often ignored outright.
Anyways, I appreciate what you suggest, but I am still willing to
understand the problem rather than trying hasty system un/re-installs.

If a reinstall fixes the problem, then there's nothing to "understand". *
It's a simple matter of some component in the various layers that got *
corrupted. *You could waste a lot of time tracking down exactly what got*
corrupted, and not come to any useful conclusion except that the fix is to*
uninstall and reinstall.

On the other hand, if you uninstall and reinstall, all the way down to a *
clean OS reinstall, and the problem persists then you can confidently *
start investigating more thoroughly, knowing that the effort will be *
rewarded with an answer to a consistently reproducible problem.

I doubt you'll get that far, but at least if you do you'll know that *
you're not wasting your time.
I am running PEVerify.exe on the binary to see if it points out any
glitches in the metadata / intermediate assembly first.

And if there are, then what? *If there's some problem with the compiled *
assembly, all that tells you is that whatever's corrupted is leading to a *
corrupted assembly.
Btw a thread persists with same question on MSDN forum for Csharp.. no
takers yet.

The fact that no one has a specific answer there should be a strong *
indication that this isn't a common problem, and that you're unlikely to *
find anyone here with any better answer than that given already.

Pete

Pete,

I have a right to know the right solution, and am willing to spend the
time it needs.

I appreciate the fact that you are trying to help, but I want to
understand the problem first.

I may try un/re-install, perhaps, when there is no solution found
ever, but I am not doing that now for sure. I will wait to see what
Microsoft team says.

Again, thank you very much.

Jun 27 '08 #6
On Mon, 05 May 2008 21:54:22 -0700, Pixel.to.life
<pi***********@gmail.comwrote:
I have a right to know the right solution, and am willing to spend the
time it needs.
I can't disagree with either of those statements. I'm certainly not
trying to deny your right to know what you want to know.
I appreciate the fact that you are trying to help, but I want to
understand the problem first.
Okay. Good luck.
I may try un/re-install, perhaps, when there is no solution found
ever, but I am not doing that now for sure. I will wait to see what
Microsoft team says.
Do you have an MSDN subscription, and are you posting with your registered
subscription email address?

Some times Microsoft will reply to questions from people without MSDN
subscriptions, but I wouldn't hold your breath. If your problem cannot be
reproduced on an arbitrary computer, it's unlikely they will be able to
help even if they wanted to (the same thing applies to anyone reading your
question for that matter).

Still, again...I wish you luck. Just try to be a bit more patient next
time.

Pete
Jun 27 '08 #7
On May 5, 10:13*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 05 May 2008 21:54:22 -0700, Pixel.to.life *

<pixel.to.l...@gmail.comwrote:
I have a right to know the right solution, and am willing to spend the
time it needs.

I can't disagree with either of those statements. *I'm certainly not *
trying to deny your right to know what you want to know.
I appreciate the fact that you are trying to help, but I want to
understand the problem first.

Okay. *Good luck.
I may try un/re-install, perhaps, when there is no solution found
ever, but I am not doing that now for sure. I will wait to see what
Microsoft team says.

Do you have an MSDN subscription, and are you posting with your registered*
subscription email address?

Some times Microsoft will reply to questions from people without MSDN *
subscriptions, but I wouldn't hold your breath. *If your problem cannot be *
reproduced on an arbitrary computer, it's unlikely they will be able to *
help even if they wanted to (the same thing applies to anyone reading your*
question for that matter).

Still, again...I wish you luck. *Just try to be a bit more patient next *
time.

Pete

Pete/all,

I finally 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

So fortunately I did not have to uninstall/re-install the development
system.. it turned out to be just a flag!!!:-)

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Roman Muntyanu | last post by:
Hi All, I got exception when call Activator.GetObject( ... ) When I start my application I register Channel to communicate between two computers and register type ReceiverLocator for remoting...
1
by: Jan Killian | last post by:
Hi all, maybe you'll see the trick and could help me. I am passing int by reference and get an exception when using it as an index to passed array. (Yes I know I can workaround with object...
1
by: webstuff | last post by:
Hi, I'm getting a 'Type mismatch' exception when calling the Word.Application.Documents.Open method when using the Office XP 2003 PIAs. the actual error is: ...
5
by: Matt | last post by:
Hi all, I'm having a very strange problem. The third line in the following code gives me a null reference exception when used in an ASP.Net web page. The code is called on the click of a...
1
by: Ram | last post by:
Hey, I have a Class Library project that is installed in the Gac (- strong name and all...). In this Class Library, I keep getting an exception when I try to instatiate one of MS's object ( - to...
0
by: webbsk | last post by:
I keep getting an exception when I call the DataAdapter Update method. I have been trying to figure out what is causing the null reference exception for this code for what seems like forever: ...
0
by: Baptiste Lepilleur | last post by:
I activated httplib debug, and when trace are printed, a UnicodeError exception is thrown. I have already set sys.stdout to use utf-8 encoding (this removed the exception when *I* was printing...
4
by: tomtown.net | last post by:
Hello I'm using the File.Encrypt method (.net 2.0) to encrypt files and folders (mark for encryption) on a local disk (XP SP2, 3DES, .net 2.0). Unfortunatelly I get an exception when trying to...
1
by: Treadstone | last post by:
Hi All, I am writing an application in C# (.NET CF) to generate a vCard and transmit it over bluetooth. To do this, on the menu item of a form, i generate an "On click Menu Item" event and that...
4
by: Lewis Holmes | last post by:
Hi I have the following situation in one of my asp.net pages. The user can add multiple table rows to a form by selecting a button. These rows can contain asp.net controls. When this button is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.