473,598 Members | 3,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
NullReferenceEx ception 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 2304
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
NullReferenceEx ception 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
NullReferenceEx ception 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******** *******@thinker sroom.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
NullReferenceE xception 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*@discussion s.microsoft.com wrote in message
news:BC******** *************** ***********@mic rosoft.com...
ensure that the pdb file is in the same folder as the dll.

Jan 8 '07 #6

"Daniel" <Da*****@vestry online.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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
NullReferenceEx ception (i.e. thrown column, not unhandled). Then run inside
the debugger.
>
"Rad [Visual C# MVP]" <no****@nospam. comwrote in message
news:1q******** *******@thinker sroom.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
NullReference Exception 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.nos pamwrote in message
news:ui******** ******@TK2MSFTN GP04.phx.gbl...
>
"Daniel" <Da*****@vestry online.comwrote in message
news:%2******** ********@TK2MSF TNGP02.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
NullReferenceEx ception (i.e. thrown column, not unhandled). Then run
inside the debugger.
>>
"Rad [Visual C# MVP]" <no****@nospam. comwrote in message
news:1q******* ********@thinke rsroom.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
NullReferenc eException 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
4043
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: DoCmd.SetWarnings False DoCmd.RunCommand acCmdDeleteRecord DoCmd.SetWarnings True End If ExitHere: Me!SubName.SetFocus
13
6588
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
4732
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 appreciated. Thanks in advance
8
21903
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 that time, I get a SocketException with the message "Only one usage of each socket address (protocol/network address/port) is normally permitted". This happen if you use localhost or between two distinct computers. And, for a period of time after the...
9
2825
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 difficult to debug those procs. Line number have always been there in Oracle messages. When I Googled on this, I saw some people showing DB2 Stored Proc error messages with line numbers in them (like LINE NUMBER=1285), which makes me believe that...
2
1794
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 in the system. When I encounter an error I'm using err.number for the error number, err.description for the description of what went wrong. What I really need to complete the process is the name of the form on which
13
2463
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 multiple allocation as follows: 1. I allocated an array of pointer. 2. I Read line by line from a text file. 3. I allocated memory for the read line.
7
3306
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
4197
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 causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- Multiple-step OLE DB operation generated errors. Check each OLE DB
0
2058
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 the contents of that log: Microsoft SQL Server 2005 Setup beginning at Thu Nov 22 22:30:08 2007 Process ID : 3856 e:\6f695192a2be55cedd30e3868397bfd2\setup.exe Version: 2005.90.1399.0 Running: LoadResourcesAction at: 2007/10/22 22:30:8...
0
8395
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
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
8050
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
6719
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...
0
5438
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
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2412
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
0
1250
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.