Home All Groups Group Topic Archive Search About

Object reference not set to an instance of an object.

Author
22 Feb 2006 10:37 PM
YYZ
I get this error in my Task List periodically when going into design
mode for a usercontrol -- it is annoying because I see .Net freeze for
about 10 seconds, then eventually is slides up the Task List window
with this error -- I know it is coming, and I can't do anything to stop
it.

The error doesn't actually hurt anything -- project still compiles and
runs fine with it sitting in there happily erroring away.  However, I
want it to stop.

Can anyone give me some pointers on what might be causing this problem?
It is on a usercontrol that is hosting a couple of other usercontrols
and some native controls at design time.  Well, at runtime, too, but
you know what I mean.

Any advice/pointers/articles would be greatly appreciated.

Matt

Author
22 Feb 2006 10:54 PM
TrtnJohn
Can't you set your debugger to break on all exceptions and find the line that
is causing the problem?

Show quoteHide quote
"YYZ" wrote:

> I get this error in my Task List periodically when going into design
> mode for a usercontrol -- it is annoying because I see .Net freeze for
> about 10 seconds, then eventually is slides up the Task List window
> with this error -- I know it is coming, and I can't do anything to stop
> it.
>
> The error doesn't actually hurt anything -- project still compiles and
> runs fine with it sitting in there happily erroring away.  However, I
> want it to stop.
>
> Can anyone give me some pointers on what might be causing this problem?
>  It is on a usercontrol that is hosting a couple of other usercontrols
> and some native controls at design time.  Well, at runtime, too, but
> you know what I mean.
>
> Any advice/pointers/articles would be greatly appreciated.
>
> Matt
>
>
Author
22 Feb 2006 11:26 PM
YYZ
> Can't you set your debugger to break on all exceptions and find the line that
> is causing the problem?

I honestly can't find that -- where do you set that?  I searched the
help and didn't find it, and it wasn't in options, and I couldn't find
it in the menu items, either -- what am I missing?

Matt
Author
23 Feb 2006 1:09 AM
TrtnJohn
In VS2003 it is under Debug->Exceptions

Show quoteHide quote
"YYZ" wrote:

> > Can't you set your debugger to break on all exceptions and find the line that
> > is causing the problem?
>
> I honestly can't find that -- where do you set that?  I searched the
> help and didn't find it, and it wasn't in options, and I couldn't find
> it in the menu items, either -- what am I missing?
>
> Matt
>
>