illogical error

  • Thread starter Thread starter Maileen
  • Start date Start date
M

Maileen

Hi,

i have a program which worked without trouble several times.
but sometimes, i have such error.

"An unhandled exception of type 'System.NullReferenceException' occurred
in Unknown Module."

it occurs not everytime as i already told and on this part of program :

Dim XmlDoc as XmlDocument
XmlDoc = New XmlDocument (error here)

why ?
i've read on internet that it can come from .Net framework but i updated
it to v1.1 SP1
So ?

thanks a lot,
Maileen
 
Maileen,

This is strange because your syntax is the same as
VB2003/VB2005

Dim xmldoc as New System.Xml.XmlDocument

Are you sure it is on that place, one line of code can be in my opinion
never give an error or it should be a stack or memory overflow.

I hope this helps,

Cor
 
I' very sure that it is on this line...
this is why it sounds strange for me.
moreover, sometimes, it works, sometimes not....
insame thing :(

Maileen
 
Maileen,

Sometimes strange illogical errors come because of not wanted recursive use.

Is this code in an event procedure?

Otherwise show us something from the surrounding of that code.

Cor
 
nothing is recursive...but i solved ths issue...
my function where this was defined, was as private sub from my class...
it should be working without trouble, but it was not.
so i export it to a module as public function...and since, there is no
more such issue.

I just had to create some reference instead of passing byval, but
nothing special in code changed...except scope of function.

Maileen
 
"An unhandled exception of type 'System.NullReferenceException' occurred
in Unknown Module."

Does this problem happen rarely and only in the .NET IDE? I believe there
is a problem in the .NET IDE in this area, and I guess it is related to how
much memory you have. I have posted to these newsgroups a simple program
that recreates it and have gotten no reply or explanations. I suggest that
you:

1. Try your program outside the IDE and see if the problem continues. If
it does, then my suggestion is wrong.
2. For interesting reading, search these newsgroups (MSDN Newsgroups) for
unknown module.
i've read on internet that it can come from .Net framework but i updated
it to v1.1 SP1

I'm 2003 IDE v7.3, FW v1.1 SP1. Running under XP SP2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top