java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.design.widget.FloatingActionButton de.tap.easy_xkcd.Activities.MainActivity.getFab()' on a null object reference E/AndroidRuntime(17298): at de.tap.easy_xkcd.fragments.comics.ComicFragment.onPrepareOptionsMenu(ComicFragment.java:572) Process: de.tap.easy_xkcd, PID: 16522

GitHub | rugk | 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

    Crashes always when accessed from widget

    GitHub | 8 months ago | rugk
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.design.widget.FloatingActionButton de.tap.easy_xkcd.Activities.MainActivity.getFab()' on a null object reference E/AndroidRuntime(17298): at de.tap.easy_xkcd.fragments.comics.ComicFragment.onPrepareOptionsMenu(ComicFragment.java:572) Process: de.tap.easy_xkcd, PID: 16522

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.support.design.widget.FloatingActionButton de.tap.easy_xkcd.Activities.MainActivity.getFab()' on a null object reference E/AndroidRuntime(17298): at de.tap.easy_xkcd.fragments.comics.ComicFragment.onPrepareOptionsMenu(ComicFragment.java:572) Process: de.tap.easy_xkcd, PID: 16522

      at de.tap.easy_xkcd.fragments.comics.ComicFragment$ComicAdapter.<init>()
    2. de.tap.easy_xkcd
      ComicBrowserFragment$updateNewest.onPostExecute
      1. de.tap.easy_xkcd.fragments.comics.ComicFragment$ComicAdapter.<init>(ComicFragment.java:133)
      2. de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$ComicBrowserPagerAdapter.<init>(ComicBrowserFragment.java:193)
      3. de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$updateNewest.onPostExecute(ComicBrowserFragment.java:167)
      4. de.tap.easy_xkcd.fragments.comics.ComicBrowserFragment$updateNewest.onPostExecute(ComicBrowserFragment.java:125)
      4 frames