java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The Map I have, has polygon overlays, it centers to a location, event listeners do not trigger, and has other ti.map functions that do not get called. Running the App with Ti SDK 5.2.0.GA, The App compiles and runs, the Map loads, however does not center to the specified location, it simply defaults to the World view. Zooming in manually to the Polygons that have been placed, shows no polygons. It's as if the Map only loads, but nothing else can be done with it. Running the same code, with Ti SDK 5.1.2.GA, everything works normally and well, it's when we use Ti SDK 5.2.0.GA that causes the issues. Calling a method to center the map (for example with Ti.SDK 5.2.0.GA, as with other calls), crashes, here is the console when that happens: {code:java} [ERROR] TiApplication: (main) [703569,708944] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap .moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference [ERROR] TiApplication: at ti.map.TiUIMapView.moveCamera(TiUIMapView.java:395) [ERROR] TiApplication: at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:388) [ERROR] TiApplication: at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:262) [ERROR] TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1093) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:248) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code}
    via by Joseph Sachs,
  • The Map I have, has polygon overlays, it centers to a location, event listeners do not trigger, and has other ti.map functions that do not get called. Running the App with Ti SDK 5.2.0.GA, The App compiles and runs, the Map loads, however does not center to the specified location, it simply defaults to the World view. Zooming in manually to the Polygons that have been placed, shows no polygons. It's as if the Map only loads, but nothing else can be done with it. Running the same code, with Ti SDK 5.1.2.GA, everything works normally and well, it's when we use Ti SDK 5.2.0.GA that causes the issues. Calling a method to center the map (for example with Ti.SDK 5.2.0.GA, as with other calls), crashes, here is the console when that happens: {code:java} [ERROR] TiApplication: (main) [703569,708944] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap .moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference [ERROR] TiApplication: at ti.map.TiUIMapView.moveCamera(TiUIMapView.java:395) [ERROR] TiApplication: at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:388) [ERROR] TiApplication: at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:262) [ERROR] TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1093) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:248) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code}
    via by Joseph Sachs,
  • java.lang.NullPointerException
    via GitHub by banobi
    ,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference at ti.map.TiUIMapView.moveCamera(TiUIMapView.java:395) at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:388) at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:262) at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1093) at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) at ti.map.ViewProxy.handleMessage(ViewProxy.java:248) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
    No Bugmate found.