Uploaded image for project: 'Appcelerator Modules'
  1. Appcelerator Modules
  2. MOD-2417

Android: Map Animation Crash due to missing guards

    Details

    • Story Points:
      3
    • Sprint:
      2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK

      Description

      exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.animateCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference; Titanium 7.0.2,2018/02/09 10:59,undefined

      You will need the 'Ti.Map' module and to add the API key to tiapp.xml in the project. The app crashes on android when switching between the home tab and the 2nd tab repeatedly on android.

      Open up project. Accept location services. Tab between Home and 2nd page quickly. Once that is fixed uncomment the other longitudes and latitudes in 'pageOne' and test again. Once that works, uncomment the $.map stuff in content.js and the $.map id in the XML for content.xml. Then make sure all of that doesn't crash the app when switching between tabs quickly.

      With this same app. If you turn off location services on the tablet/phone you get a different error.

      [ERROR] : TiApplication: (main) [63672,63838] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'org.appcelerator.kroll.KrollDict org.appcelerator.kroll.KrollProxy.getProperties()' on a null object reference; Titanium 7.0.2,2018/02/09 10:59,undefined
      [ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'org.appcelerator.kroll.KrollDict org.appcelerator.kroll.KrollProxy.getProperties()' on a null object reference
      [ERROR] : TiApplication: at ti.map.TiUIMapView.onMapReady(TiUIMapView.java:170)

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              josh.mocek josh.mocek
              Reviewer:
              Lokesh Choudhary
            • Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code