Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.19 seconds.

  1. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    Can you provide the full stack trace?
  2. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    Well that means that n is null.
    n is set by the utilities.increment() method. Unfortunately, it doesn't appear that the increment() method can return null. Are you 100% sure the line you are getting...
  3. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    No, but perhaps that the getLength() method does something which, due to the way your array is set up or something, unexpectedly causes a null pointer to be thrown. The Array.getLength() method is a...
  4. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    I suggested this because if you use n.length; and still get the null pointer, it means two things:
    1. the problem is independent from the Array class
    2. n is null
  5. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    Like, is it declared as:
    Tile[] n;
    or it is declared as:
    Object n;

    I ask because if it is the first one (explicitly an array), you could get the length by:
    n.length;
    Instead of:...
  6. Replies
    21
    Views
    1,823

    Re: Null Pointer (a curious case)

    Is the type for n explicitly an array, or is it just an object?
Results 1 to 6 of 6