0

I have inherited a webforms application that was working and now is not.

The error text is "Object reference not set to an instance of an object. ".

Im sorry it is sooo generic, but I was wondering if anyone could read the Stack Trace and point me in right direction?

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
GAP07.Index_UK.LoadData() +2060
GAP07.Index_UK.Page_Load(Object sender, EventArgs e) +5
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Version Information: Microsoft .NET Framework Version:1.1.4322.2443; ASP.NET Version:1.1.4322.2470

Thanks Paul

screenshot

BoltClock
  • 630,065
  • 150
  • 1,295
  • 1,284
Paul Brown
  • 4,556
  • 8
  • 30
  • 44
  • You might start by turning on `` and deploying the pdbs in order to get actual line numbers. However, @moose has you in the right direction. – NotMe Feb 06 '11 at 02:55
  • possible duplicate of [What is a NullReferenceException in .NET?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-in-net) – John Saunders Feb 06 '11 at 03:10
  • VS Debugger ... *attach process* :) Also, use a *scm tool* so that it's easier to find "what made it break". –  Feb 06 '11 at 03:46

1 Answers1

1

You are probably reading data in LoadData(), and that is returning null for an object.. Then you are trying to access a member or property of that object. Hard to tell more from the stack trace.

Moose
  • 5,144
  • 3
  • 30
  • 45
  • 1
    Yeah, he is loading an object that is returning null and then trying to access one of it's members. Best way to debug is to step through it. – NotMe Feb 06 '11 at 02:57