4

Possible Duplicate:
How can we tell people that what they need is a debugger?

https://stackoverflow.com/search?q=Object+not+set+to+instance+%5Bc%23%5D

The C# tag gets several questions per week with the title "Object reference not set to instance of object" or "NullReferenceException" and invariably the answer is always either

  • This thing is very obviously null, fix it
  • or we can't tell, you're just going to have to step through it in your debugger

With the volume of questions that come in for precisely this runtime exception, is it worth showing a system message beforehand that this is a common error and the user should learn to debug? I don't know if you guys have a "common problem -> show message" feature, but if you do, add this. If you don't, add one, and add this.

1
  • 4
    I usually vote to close those as Too Localized if they've received 1 answer pointing out what is likely (enough) to be null.
    – user7116
    Commented Jul 5, 2011 at 21:32

1 Answer 1

4

When a user types this title into the new question page, they see this:

enter image description here

So it's fair to say that they already have some idea that the question has been asked (and probably answered) before.

You could also find the variant of this question with the best answer posted, and link it as one of the frequently-asked-questions about the C# tag in the Tag Wiki.

1
  • I agree, they'll see that, and yet somehow they think to themselves "my question is... different, Ms. Gump." Maybe 1% actually fall into an area of subtlety, but most are the of garden variety, "seriously, fire up your debugger" sort. Commented Jul 5, 2011 at 23:45

Not the answer you're looking for? Browse other questions tagged .