Strange Error

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

    Strange Error

    I recieve the very strange error while compiling project:

    "object reference net set to the instance of the object" in line 0 !!!
    The first lines in this .cs are
    using System;

    using System.Collecti ons;

    using System.Componen tModel;

    using System.Drawing;

    using System.Data;

    using System.Windows. Forms;



    So what is the problem???






  • Joe Mayo

    #2
    Re: Strange Error

    "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message
    news:O8i1bFesDH A.2448@TK2MSFTN GP09.phx.gbl...[color=blue]
    > I recieve the very strange error while compiling project:
    >
    > "object reference net set to the instance of the object" in line 0 !!!
    > The first lines in this .cs are
    > using System;
    >
    > using System.Collecti ons;
    >
    > using System.Componen tModel;
    >
    > using System.Drawing;
    >
    > using System.Data;
    >
    > using System.Windows. Forms;[/color]

    Hi Tamir,

    You could try stepping through the code with a debugger to see where the
    actual problem is. One of your references is set to null or undefined.

    Joe
    --
    Welcome to C# Station!  This is a community site for people interested in applying .NET using the C# programming language.  We’ve been around since July 4th 2000 and have continued to grow over the years.  Items of interest include Articles, Books, Links, Documentation,  and Tutorials. More… Source Code If you would like to see an […]



    Comment

    • Paul E Collins

      #3
      Re: Strange Error

      "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote:
      [color=blue]
      > I recieve the very strange error while compiling
      > project:
      > "object reference net set to the instance of the
      > object" in line 0 !!![/color]

      Can you reproduce this in a small, simple program that you could post here?

      P.

      --



      Comment

      • Tamir Khason

        #4
        Re: Strange Error

        There are no error in debugger.....
        The error appears as task in the Task List and cause the same error while
        adding this control to form...
        The program compiles, but there are 3 lines of Object reference... Line 0 in
        Task List

        Any clues?

        "Joe Mayo" <jmayo@ddiieess ppaammeerrssddi iee.com> wrote in message
        news:udd3$lesDH A.2304@tk2msftn gp13.phx.gbl...[color=blue]
        > "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message
        > news:O8i1bFesDH A.2448@TK2MSFTN GP09.phx.gbl...[color=green]
        > > I recieve the very strange error while compiling project:
        > >
        > > "object reference net set to the instance of the object" in line 0 !!!
        > > The first lines in this .cs are
        > > using System;
        > >
        > > using System.Collecti ons;
        > >
        > > using System.Componen tModel;
        > >
        > > using System.Drawing;
        > >
        > > using System.Data;
        > >
        > > using System.Windows. Forms;[/color]
        >
        > Hi Tamir,
        >
        > You could try stepping through the code with a debugger to see where the
        > actual problem is. One of your references is set to null or undefined.
        >
        > Joe
        > --
        > http://www.csharp-station.com
        >
        >[/color]


        Comment

        • Tamir Khason

          #5
          Re: Strange Error

          I tried to reproduce it - nothing. The problem is that the program (user
          control) compiles, but leaves 3 tasks with "object reference...lin e 0" in
          the task list. the error occures while adding this component to form...




          "Paul E Collins" <find_my_real_a ddress@CL4.org> wrote in message
          news:bpr7qj$itb $1@titan.btinte rnet.com...[color=blue]
          > "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote:
          >[color=green]
          > > I recieve the very strange error while compiling
          > > project:
          > > "object reference net set to the instance of the
          > > object" in line 0 !!![/color]
          >
          > Can you reproduce this in a small, simple program that you could post[/color]
          here?[color=blue]
          >
          > P.
          >
          > --
          > www.CL4.org
          >
          >[/color]


          Comment

          • Joe Mayo

            #6
            Re: Strange Error



            "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message
            news:uf7m$YlsDH A.2304@tk2msftn gp13.phx.gbl...[color=blue]
            > I tried to reproduce it - nothing. The problem is that the program (user
            > control) compiles, but leaves 3 tasks with "object reference...lin e 0" in
            > the task list. the error occures while adding this component to form...
            >[/color]


            Do you have the source code to the component. If so, open a second instance
            of VS.NET with the debug version of the component project, select
            Debug/Processes and attach to the DevEnv.exe instance that you want to add
            the component to, make sure break points are set in the component source
            code, and try to drop your component onto the form in the first instance of
            VS.NET. If you have your breakpoint set in the right place on the second
            instance of DevEnv it will stop there so you can step through your code.

            Joe
            --
            Welcome to C# Station!  This is a community site for people interested in applying .NET using the C# programming language.  We’ve been around since July 4th 2000 and have continued to grow over the years.  Items of interest include Articles, Books, Links, Documentation,  and Tutorials. More… Source Code If you would like to see an […]



            Comment

            • Jeffrey Tan[MSFT]

              #7
              Re: Strange Error


              Hi Tamir,

              In your previous description, I think this error may due to the component.
              I think you should follow Joe's suggestion to debug the this component to
              find the cause.

              Best regards,
              Jeffrey Tan
              Microsoft Online Partner Support
              Get Secure! - www.microsoft.com/security
              This posting is provided "as is" with no warranties and confers no rights.

              Comment

              Working...