illogical error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maileen

    #1

    illogical error

    Hi,

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

    "An unhandled exception of type 'System.NullRef erenceException ' 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
  • Cor Ligthert [MVP]

    #2
    Re: illogical error

    Maileen,

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

    Dim xmldoc as New System.Xml.XmlD ocument

    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


    Comment

    • Maileen

      #3
      Re: illogical error

      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

      Cor Ligthert [MVP] wrote:[color=blue]
      > Maileen,
      >
      > This is strange because your syntax is the same as
      > VB2003/VB2005
      >
      > Dim xmldoc as New System.Xml.XmlD ocument
      >
      > 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
      >
      >[/color]

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: illogical error

        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


        Comment

        • Maileen

          #5
          Re: illogical error

          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...excep t scope of function.

          Maileen

          Cor Ligthert [MVP] wrote:[color=blue]
          > 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
          >
          >[/color]

          Comment

          • AMercer

            #6
            RE: illogical error

            > "An unhandled exception of type 'System.NullRef erenceException ' occurred[color=blue]
            > in Unknown Module."[/color]

            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.
            [color=blue]
            > i've read on internet that it can come from .Net framework but i updated
            > it to v1.1 SP1[/color]

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

            Comment

            Working...