473,883 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception in mscorlib.dll

Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.Argumen tNullException' 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*********@Mea nOldTeacher.com
Nov 15 '05 #1
6 24238
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*********@Me anOldTeacher.co m> wrote in message
news:bS******** ********@newsre ad2.news.pas.ea rthlink.net...
Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.Argumen tNullException' 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*********@Mea nOldTeacher.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(C ontrolStyles.Us erPaint|Control Styles.AllPaint ingInWmPaint
|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*********@me anoldteacher.co m> wrote in message
news:Og******** ******@tk2msftn gp13.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(C ontrolStyles.Us erPaint|Control Styles.AllPaint ingInWmPaint
|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*********@Me anOldTeacher.co m> wrote in message
news:bS******** ********@newsre ad2.news.pas.ea rthlink.net...
Hello,

I have a VS 2003 application that gets the following error window:
"An unhandled exception of type 'System.Argumen tNullException' 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*********@Mea nOldTeacher.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
339
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 the only difference between the il BEFORE the line throwing the exception is a BR.S as opposed to BR, due to the length of the branch required, which makes sense. anyone know what is going on?
3
23116
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 shows. Very strange. Unhandled Exception: System.TypeInitializationException: The type initializer fo r "handnetconsole.Monitor" threw an exception. ---> System.Security.SecurityExce ption: Request failed.
0
3022
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 deploying the application into a third-part host.
1
4148
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. When I attached the debugger to the process and stepped into the code it executed without error. In both cases I was running a Debug build, the only difference in the case that works is that I attached the debugger to the same exact binaries....
0
2120
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 logging to event log. To make it active again I need to open the web.config and save without making any changes. It starts to work again. Here is the configuration I am using. <exceptionHandling>
0
1709
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 exception of type 'System.Security.SecurityException' occurred in mscorlib.dll Additional information: Request for the permission of type System.Security.Permissions.RegistryPermission, mscorlib, Version=1.0.5000.0, Culture=neutral,...
8
7712
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 the LocalIntranet_Zone full permissions in the .NET Framework 2.0 Configuration msc. This had no effect whatsoever. What do I need to do to fix this? Thanks,
0
9830
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 mates. When I run a simple windows application which uses my web service I get the following exception which is thrown when my mates' web method is called. An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in...
3
12069
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 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) ---> System.Security.SecurityException: Request for the permission of type
2
1738
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 then returns the parsed JSON back to IIS/ASP 3. Everything works fine in my development environment and QA also works well. But in the production server, Server.CreateObject creates an instance, but calling any method of the proxy throws this...
0
9796
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10753
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10859
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9582
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7974
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7134
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5997
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4620
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3239
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.