473,396 Members | 2,102 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,396 software developers and data experts.

Exception in mscorlib.dll

Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.ArgumentNullException' occurred in
mscorlib.dll"
"Additional information: Value cannot be null."

When I click the break button it says, "There is no source code available
for the current location."
When I click the help button it says that I should have handled the
exception. It seems that if an unhandled exception occurs in one of
Microsoft's dlls, how do I handle it or even catch it? How do I go about
debugging this? Is the source code for mscorlib.dll available?

Thanks,
Ray Mitchell
Ra*********@MeanOldTeacher.com
Nov 15 '05 #1
6 24177
My guess is you are running in Release mode. Switch to Debug and try
again :)

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
For a laugh, try web browsing with Opera's User Mode and Nostalgia enabled
Nov 15 '05 #2
Hi Ray,

What is the call stack?
What are you doing when you get the exception?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:bS****************@newsread2.news.pas.earthli nk.net...
Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.ArgumentNullException' occurred in
mscorlib.dll"
"Additional information: Value cannot be null."

When I click the break button it says, "There is no source code available
for the current location."
When I click the help button it says that I should have handled the
exception. It seems that if an unhandled exception occurs in one of
Microsoft's dlls, how do I handle it or even catch it? How do I go about
debugging this? Is the source code for mscorlib.dll available?

Thanks,
Ray Mitchell
Ra*********@MeanOldTeacher.com

Nov 15 '05 #3

No, I am running in debug mode. Thanks for the suggestion, however.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #4

How can I determine what's in the call stack? Since this thing usually
occurs before the code I wrote is even reached I'm not sure what it's
doing when the exception happens. One of my recent additions to the
code (which doesn't seem to do what I want anyway) is:

this.SetStyle(ControlStyles.UserPaint|ControlStyle s.AllPaintingInWmPaint
|ControlStyles.DoubleBuffer, true);

Probably just a red herring with regards to this problem, however.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #5
Hi Ray,

If it happens before, could it be that an assembly is missing?
Anyway, I suggest you to pinpoint the problem.
For example, you might start deploying a "blank" project (only one form) and
see if it runs.
If it does, check your project references (if all of the assemblies required
are there).

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Ray Mitchell" <ra*********@meanoldteacher.com> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...

How can I determine what's in the call stack? Since this thing usually
occurs before the code I wrote is even reached I'm not sure what it's
doing when the exception happens. One of my recent additions to the
code (which doesn't seem to do what I want anyway) is:

this.SetStyle(ControlStyles.UserPaint|ControlStyle s.AllPaintingInWmPaint
|ControlStyles.DoubleBuffer, true);

Probably just a red herring with regards to this problem, however.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #6

"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:bS****************@newsread2.news.pas.earthli nk.net...
Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.ArgumentNullException' occurred in
mscorlib.dll"
"Additional information: Value cannot be null."

When I click the break button it says, "There is no source code available
for the current location."
When I click the help button it says that I should have handled the
exception. It seems that if an unhandled exception occurs in one of
Microsoft's dlls, how do I handle it or even catch it? How do I go about
debugging this? Is the source code for mscorlib.dll available?

Thanks,
Ray Mitchell
Ra*********@MeanOldTeacher.com


I think I've been stung by this before, and probably will be again.
Apparently due to an undocumented "feature", occasionally VS2003 apparently
forgets which files have been modified and fails to rebuild them but marks
them as rebuilt, or maybe it just does a bad build that it keeps
propagating. Anyway if I rebuild the entire solution the problem
disappears. Looking back to when I was doing a lot of builds I now remember
encountering this about once or twice a week on all the machines I was
using. I found the simple answer was just to simply do a complete rebuild
every time. It takes a little longer, but not as much time as I've spent
chasing this phantom on several occasions. Thanks to you guys for your
suggestions.

Ray
Nov 15 '05 #7

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

Similar topics

0
by: guy | last post by:
i have a method which throws an exception. the thing i dont understand is that the only change between the two versions is a line of code AFTER the one that throws the exception - see code below...
3
by: nick | last post by:
The program runs well on Local harddisk. But it always popup the exception if I run it on Netware mapping disk. After debugger say there is no source code on the exception. Also the following error...
0
by: qiang | last post by:
Hi everyone, Could you please take a look at an exception for ASP.NET application? My ASP.NET application is using Infragistics WebChart control. I encounter an exception below when...
1
by: David Herbst | last post by:
Enterprise Library Jan 2006 with Visual Studio 2005 on Windows 2000 Server sp4. My custom exception formatter fails with a "Unable to handle exception: 'LoggingExceptionHandler'." exception. ...
0
by: rajesh.hanchate | last post by:
Please help me in resolving this issue. I am using EnterpriseLibrary 2.0 Exception and logging block for logging exceptions to event log. It works fine for sometime. After some time it stops...
0
by: pratika2002 | last post by:
Hi, I am having a windows service project which is built by someone else and I have to understand the fuctionality. While running the service I am getting the following exception. "An unhandled...
8
by: jporter188 | last post by:
Hello, I am working on a project to manipulate XML files. All of the files, the code, and the output are on network drives. When I run my program I get an exception (see below). I tried giving...
0
by: yoozioo | last post by:
hello, This year I'm learning C# at school and now we focus on web services. I created and published a web service which contains a method that calls another web service written by my class...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
2
by: ZaM | last post by:
Hi all, We'd been developing some COM libraries in .net, one of them is a kind of proxy who consumes some web services, traslates the XML output of these WS to JSON using Newtonsoft.JSON, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.