0

I am running a downloaded application called Snaptack Plus from StackMob. The app runs but when I select a button I am getting an error, the stack trace with the error is below. This is where I think the problem is coming from:

01-11 17:46:52.751: E/AndroidRuntime(18584): FATAL EXCEPTION: main
01-11 17:46:52.751: E/AndroidRuntime(18584): java.lang.NullPointerException
01-11 17:46:52.751: E/AndroidRuntime(18584): at com.stackmob.apps.snapstack.extend.BaseActivity.getStackMobGeoPoint(BaseActivity.java:136)

When I step through the code it falls through at this code snippet

protected StackMobGeoPoint getStackMobGeoPoint() {
    Location loc = getGPSTracker().getLocation();
    if (loc != null) {
        return new StackMobGeoPoint(loc.getLongitude(), loc.getLatitude());
    } else {
        return null;
    }
}

I think the loc object is the problem (because this is where it falls through), so can someone give me some pointers?

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
Psy Chotic
  • 219
  • 1
  • 3
  • 11

1 Answers1

0

Are you running this from an emulator? it seems that getGPSTracker() is returning null

Leaudro
  • 1,021
  • 8
  • 7
  • Hi Leaudro, no I am running from the actual phone, and StackMob isn't returning my message, I agree it is in the GPSTracker class because when I comment any calls to this class the error messages are not there. I will trace through the class again. Thanks – Psy Chotic Jan 19 '14 at 19:36
  • If I add the the project here could someone run it and tell me if they are getting the same thing, because I have been stuck on this this for a while, and I know it is something simple(I think) the people over at stackmob is not getting back with me or anyone for that matter. – Psy Chotic Jan 22 '14 at 05:35
  • put it on github, and I'll look at it for you! – Leaudro Jan 22 '14 at 20:07