473,388 Members | 1,177 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,388 software developers and data experts.

Error with no line number?

hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have put try
catch state,ents to catch it around every method that fires during shutdown
and none seem to be the cause, due to the lack of line number i am literally
guessing where it could be? What else can i do?
Jan 7 '07 #1
7 2291
See the StackTrace property of the Exception thrown to see from where it
originated.
I hope you'll get it.
Best Regards,
Rizwan aka RizwanSharp

"Daniel" wrote:
hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have put try
catch state,ents to catch it around every method that fires during shutdown
and none seem to be the cause, due to the lack of line number i am literally
guessing where it could be? What else can i do?
Jan 7 '07 #2
On Sun, 7 Jan 2007 17:35:58 -0000, Daniel wrote:
hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have put try
catch state,ents to catch it around every method that fires during shutdown
and none seem to be the cause, due to the lack of line number i am literally
guessing where it could be? What else can i do?
If you want the line number you need to compile your application with debug
symbols. You probably compiled it as release
--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 7 '07 #3
hehe no guys didnt compile in release mode. And i did check stack trace, it
gives me the method name where it orgiginates, unfortunately it doesn't help
me much.

I take it i cant get the line number any other way then?

"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:1q***************@thinkersroom.com...
On Sun, 7 Jan 2007 17:35:58 -0000, Daniel wrote:
>hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have put
try
catch state,ents to catch it around every method that fires during
shutdown
and none seem to be the cause, due to the lack of line number i am
literally
guessing where it could be? What else can i do?

If you want the line number you need to compile your application with
debug
symbols. You probably compiled it as release
--
Bits.Bytes
http://bytes.thinkersroom.com

Jan 7 '07 #4
ensure that the pdb file is in the same folder as the dll.
Jan 8 '07 #5
sigh, yep, pdb's in same folder. So no one has ever seen a problem like
this? :(

"XOR" <XO*@discussions.microsoft.comwrote in message
news:BC**********************************@microsof t.com...
ensure that the pdb file is in the same folder as the dll.

Jan 8 '07 #6

"Daniel" <Da*****@vestryonline.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
hehe no guys didnt compile in release mode. And i did check stack trace,
it gives me the method name where it orgiginates, unfortunately it doesn't
help me much.

I take it i cant get the line number any other way then?
Go into Debug->Exceptions menu and set to stop on first-chance
NullReferenceException (i.e. thrown column, not unhandled). Then run inside
the debugger.
>
"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:1q***************@thinkersroom.com...
>On Sun, 7 Jan 2007 17:35:58 -0000, Daniel wrote:
>>hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have put
try
catch state,ents to catch it around every method that fires during
shutdown
and none seem to be the cause, due to the lack of line number i am
literally
guessing where it could be? What else can i do?

If you want the line number you need to compile your application with
debug
symbols. You probably compiled it as release
--
Bits.Bytes
http://bytes.thinkersroom.com


Jan 8 '07 #7
Just to conclude the thread.....i never did get a line number but using
targetsite i was able to pin down th emethod and eventually figured it out.
I think the reason for no line number was because it was in a directx
library and directx is notorious for poor debugging output even on max
output settings.

Thanks for all the help anyway
"Ben Voigt" <rb*@nospam.nospamwrote in message
news:ui**************@TK2MSFTNGP04.phx.gbl...
>
"Daniel" <Da*****@vestryonline.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>hehe no guys didnt compile in release mode. And i did check stack trace,
it gives me the method name where it orgiginates, unfortunately it
doesn't help me much.

I take it i cant get the line number any other way then?

Go into Debug->Exceptions menu and set to stop on first-chance
NullReferenceException (i.e. thrown column, not unhandled). Then run
inside the debugger.
>>
"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:1q***************@thinkersroom.com...
>>On Sun, 7 Jan 2007 17:35:58 -0000, Daniel wrote:

hi guys

i have never understood this so i am hoping someone can help.

I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number given. I have
put try
catch state,ents to catch it around every method that fires during
shutdown
and none seem to be the cause, due to the lack of line number i am
literally
guessing where it could be? What else can i do?

If you want the line number you need to compile your application with
debug
symbols. You probably compiled it as release
--
Bits.Bytes
http://bytes.thinkersroom.com



Jan 10 '07 #8

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

Similar topics

8
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: ...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
8
by: Grant Richard | last post by:
Using the TcpListener and TcpClient I created a program that just sends and receives a short string - over and over again. The program is fine until it gets to around 1500 to 1800 messages. At...
9
by: kangaroo | last post by:
Hi guys, when we run a stored proc and it results into an unhandled error, the error message returned by db2 udb does not contain a line number that caused an error. This makes it pretty...
2
by: Fred Nelson | last post by:
Hi: I'm writing an error handling routine for my VB.NET program. I have a routine that is called when an error occurs using "on error goto' as in a class library which then loads the first form...
13
by: a.zeevi | last post by:
free() multiple allocation error in C ==================================== Hi! I have written a program in C on PC with Windows 2000 in a Visual C environment. I have an error in freeing...
7
by: i | last post by:
#include<stdio.h> #include<conio.h> #include<process.h> #include<string.h> char ch; int w; int n,m; //void main(); char check(int n,int m,char ch); void cash(int n,int m,char ch);
2
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is...
0
by: silviu | last post by:
Hello I'm trying to install Microsoft SQL 2005 Server Express Edition but I'm getting the following error: SQL Server Setup unexpectedly failed... Then it says something about a log file. Here's...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.