NullReferenceException

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

    #1

    NullReferenceException

    Hi.

    I have a problem with an error that i get and mayby domebody can help.
    I have a project that which gives a pop-up error when i open the
    project with VS.
    The error is :"The following Exception has occured.
    NullReferenceEx ception:Object reference not set to an instance of an
    object".

    The strange part of this error is that i receive it immediatly when i
    open the project.
    After Clicking the OK button, the project compiles and runs with no
    problems.

    How can i figure out what is this?

    Thanks in advance
    Stelios

  • Chris Dunaway

    #2
    Re: NullReferenceEx ception

    Stelios wrote:
    Hi.
    >
    I have a problem with an error that i get and mayby domebody can help.
    I have a project that which gives a pop-up error when i open the
    project with VS.
    The error is :"The following Exception has occured.
    NullReferenceEx ception:Object reference not set to an instance of an
    object".
    >
    The strange part of this error is that i receive it immediatly when i
    open the project.
    After Clicking the OK button, the project compiles and runs with no
    problems.
    >
    How can i figure out what is this?
    >
    Thanks in advance
    Stelios
    The popup should have a link that shows the stack trace. If not, you
    could fire up a new instance of Visual Studio and connect to the first
    instance using the debugger, perhaps that will let you find the
    exception.

    Comment

    • darren.smurf@gmail.com

      #3
      Re: NullReferenceEx ception

      If this is your own code, change it to be like the following:

      Try
      {your code here}
      Catch ex as Exception
      msgbox(ex.Messa ge & VbCrLf & ex.StackTrace)
      End Try

      This will give you information on where and what is causing the null
      reference.

      Stelios wrote:
      Hi.
      >
      I have a problem with an error that i get and mayby domebody can help.
      I have a project that which gives a pop-up error when i open the
      project with VS.
      The error is :"The following Exception has occured.
      NullReferenceEx ception:Object reference not set to an instance of an
      object".
      >
      The strange part of this error is that i receive it immediatly when i
      open the project.
      After Clicking the OK button, the project compiles and runs with no
      problems.
      >
      How can i figure out what is this?
      >
      Thanks in advance
      Stelios

      Comment

      • Stelios

        #4
        Re: NullReferenceEx ception

        Hi.
        Thanks for your comments!.
        There is no link in the pop up window. and the problem was that i could
        not find out what is the reason for this error, since it was appearing
        immediatly when i was opening the solution file.
        After having a detailed look at the project objects that i have draged
        from the toolbox, I noticed that one dataset icon was disappeared!.
        I created a new dataset object again, i set up again all the data
        bindings and everything was OK.
        I read that there is a problem with VS2003 about items that get
        dissapeared and that microsoft has a hot fix for this.

        Thanks
        Stelios Halkiotis


        Ο/Η darren.smurf@gm ail.com έγραψε:
        If this is your own code, change it to be like the following:
        >
        Try
        {your code here}
        Catch ex as Exception
        msgbox(ex.Messa ge & VbCrLf & ex.StackTrace)
        End Try
        >
        This will give you information on where and what is causing the null
        reference.
        >
        Stelios wrote:
        Hi.

        I have a problem with an error that i get and mayby domebody can help.
        I have a project that which gives a pop-up error when i open the
        project with VS.
        The error is :"The following Exception has occured.
        NullReferenceEx ception:Object reference not set to an instance of an
        object".

        The strange part of this error is that i receive it immediatly when i
        open the project.
        After Clicking the OK button, the project compiles and runs with no
        problems.

        How can i figure out what is this?

        Thanks in advance
        Stelios

        Comment

        Working...