The exception that is thrown when there is an attempt to dereference a null object reference.
1
vote
5answers
17 views
Null Reference Exception in SQL Query output
After struggling with pulling certain info from a SQL Database to use in C# code to do some permission checking, I have decided to go back to basics and learn how to do it properly and slowly build on ...
0
votes
3answers
86 views
Null Reference Exception C# get set
I think that I am misunderstanding the purpose of a get; set; in C#. I have a list of doubles that I am trying to populate and I am using the following code...Both of these are in the same class and ...
0
votes
3answers
42 views
Getting Exception, :- java.lang.NullPointerException?
Getting the following exception:-
java.lang.NullPointerException
at com.local.testing.ChatClient$sendButtonActionListener.actionPerformed(ChatClient.java:53)
at ...
0
votes
2answers
62 views
How could this reference to a string be causing a Null Reference Exception?
There is a struct:
public struct ReturnedCommands
{
public string key;
public string command;
};
...and a variable:
public static ReturnedCommands returnedCommands;
...and a Null ...
1
vote
1answer
46 views
“this” is referring to an object that is not in fact the one that is using “this”
While debugging, my program crashed with an error stating that there was a null reference. The weird thing was that on the line that it had crashed on, it is running a method in a different static ...
0
votes
2answers
28 views
NullReference (System.Text.Encoding.ASCII.GetBytes)
I've been getting all turned around regarding this section of code. The NullReference Error only occurs at runtime.
Public Sub SendData(ByVal b As String)
Dim data(2048) As Byte
data = ...
-1
votes
1answer
56 views
Debugging this error [closed]
I randomly get this error and would like to know the best way to debug this and what it means.
MESSAGE: Object reference not set to an instance of an object.
SOURCE: POL
FORM: __VIEWSTATE={{LONG ...
0
votes
1answer
56 views
Using a try-catch within a property?
The following code just doesn't work like it should:
get
{
try
{
foreach (object o in NullObjectList)
{
if (o.Property)
{
return true;
...
1
vote
0answers
31 views
NullReferenceException on code that shouldn't be running
I'm writing a space invaders style game in Visual Basic for my HSC Software Design project. As part of that, I am using the following line of code to detect whether an enemy hit the player's ship.
If ...
0
votes
1answer
22 views
NullReferenceException in ContentManager, XNA
I'm having a problem with NullReferenceException in XNA. I have 4 classes: Hero, Sprite, Fireball, Game1. Through debugging I see that problem occurs after my Fireball loads content through pipe
...
2
votes
2answers
42 views
Entity Framework 5.0 - 1 to 1 Relation is NULL without reason
I've searched many questions here, that sounded similar to mine, but none if it matched my problem, so I hope for some help in this ticket..
I use EF Code First and try to map it to an existing ...
0
votes
1answer
21 views
Editing an XML file in C#; SelectSingleNode returns null
I'm trying to find existing content within an XML file and change it by making use of the SelectSingleNode command. However, all I get is a NullReferenceException. Maybe I'm just not getting how the ...
0
votes
0answers
29 views
itextsharp NullReferenceException (PageRefs)
I am using itextsharp 5.4.2 to open a library of pdf documents (all generated programatically using the same pdf generation tool, albeit possibly different versions of that tool). itextsharp is ...
0
votes
1answer
44 views
System.NullReferenceException (Visual Studio 2012, ASP.NET)
I apologize if the question is poorly executed, this is my first post here. I am a newbie at using Visual Studio and ASP.NET, I admit that, and have been sitting with this error a while.
I'm trying ...
0
votes
3answers
24 views
NullReferenceException when trying to populate an empty instance of a custom class with a struct
I have created a custom struct and a class. The structs are points in 3D Space:
public struct Point3D
{
//fields
private static Point3D center = new Point3D(0,0,0);
//properties
...