Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net system.null reference exception (What gives?)

Status
Not open for further replies.

ucsjimj

Programmer
Oct 12, 2002
23
US
Hello, I have been using vb.net almost two years now and this is the error of all errors. My program has three kinds of data platforms they are: dbase (clipper), ISAM (Cobol), and MS Access. When I do a search on one of the clipper files using a product called APOLLLO.NET a third party product, which makes ODBC object retrieval very easy. Anyway the error appears sometimes any where from 30 to 45 seconds later but not always and puts up an unmanaged (unhandled exception)to the screen. The program entry screen appears ready for the next entry, and when in debug mode the process stops on the first line of the main menu module Which is just a sub MAIN() doing nothing. After running the debug from the live session I see the following:

Unhandled exception generated: (0x00a17a28) <system Exception>
_ClassName=<null>
_exceptionMethod=<null>
_exceptionmethodstring=<null>
_innerException=<null>
_message=<0x009e2a30> "object reference not set to an instance of an object
_helpURL=<null>
_stackTrace=<0x00a17a68> array with dims=[72]
_stacktracestring=<null>
_remoteStackIndex=0x00000000
_HResult=0x800004003
_Source=<null>
_xptrs=0x0012d668
_xcode=0xc0000005
Thread 0x684 R 0x00000000" <unknown>
<cordbg>

Any ideas out there would be helpful.
Thanks in advance,
ucsjimj
 
The exception means that something was trying to reference a method/property of an object that was not instantiated.

Does it seem to be coming from your code, or the 3rd party tool?

-Rick

----------------------

[monkey] I believe in killer coding ninja monkeys.[monkey]
[banghead]
 
I have noticed different situations which cause this. I am starting to lean toward my code as being the reason for the fault. I run the search screen from two different screens, one of which is rock solid, the other fails now only when a search is initiated. ( I think that I am answering my own question?)
ucsjimj
 
I think that I am answering my own question

That tends to happen ;) Find the line that is throwing the exception. Break on it while in run mode. One of the objects on that line will be Nothing, or will have a reference to Nothing with in them.

-Rick

----------------------

[monkey] I believe in killer coding ninja monkeys.[monkey]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top