java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Application android.support.v4.app.FragmentActivity.getApplication()' on a null object reference

GitHub | postadelmaga | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 2615#230966665

    GitHub | 8 months ago | postadelmaga
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Application android.support.v4.app.FragmentActivity.getApplication()' on a null object reference
  2. 0

    Crash at net.osmand.plus.base.BaseOsmAndFragment.getMyApplication()

    GitHub | 9 months ago | scaidermern
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Application android.support.v4.app.FragmentActivity.getApplication()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.app.Application android.support.v4.app.FragmentActivity.getApplication()' on a null object reference

      at net.osmand.plus.base.BaseOsmAndFragment.getMyApplication()
    2. net.osmand.plus
      LocalIndexesFragment$LoadLocalIndexTask.onProgressUpdate
      1. net.osmand.plus.base.BaseOsmAndFragment.getMyApplication(BaseOsmAndFragment.java:21)
      2. net.osmand.plus.download.ui.LocalIndexesFragment.access$1000(LocalIndexesFragment.java:78)
      3. net.osmand.plus.download.ui.LocalIndexesFragment$LocalIndexesAdapter.addLocalIndexInfo(LocalIndexesFragment.java:910)
      4. net.osmand.plus.download.ui.LocalIndexesFragment$LoadLocalIndexTask.onProgressUpdate(LocalIndexesFragment.java:342)
      5. net.osmand.plus.download.ui.LocalIndexesFragment$LoadLocalIndexTask.onProgressUpdate(LocalIndexesFragment.java:317)
      5 frames
    3. Android Platform
      ActivityThread.main
      1. android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:656)
      2. android.os.Handler.dispatchMessage(Handler.java:102)
      3. android.os.Looper.loop(Looper.java:135)
      4. android.app.ActivityThread.main(ActivityThread.java:5290)
      4 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
      2 frames