java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ContentResolver android.content.Context.getContentResolver()' on a null object reference

GitHub | barbeau | 6 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

    NPE when accessing route favorite in database

    GitHub | 6 months ago | barbeau
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ContentResolver android.content.Context.getContentResolver()' on a null object reference
  2. 0

    GitHub comment 541#233332562

    GitHub | 7 months ago | barbeau
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.joulespersecond.seattlebusbot/org.onebusaway.android.ui.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.onebusaway.android.ui.AlertList.getCount()' on a null object reference
  3. 0

    GitHub comment 541#233395811

    GitHub | 7 months ago | barbeau
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.joulespersecond.seattlebusbot/org.onebusaway.android.ui.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.onebusaway.android.ui.AlertList.getCount()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.content.ContentResolver android.content.Context.getContentResolver()' on a null object reference

      at org.onebusaway.android.provider.ObaContract$RouteHeadsignFavorites.isFavorite()
    2. org.onebusaway.android
      HomeActivity$7.onPanelStateChanged
      1. org.onebusaway.android.provider.ObaContract$RouteHeadsignFavorites.isFavorite(ObaContract.java:1415)
      2. org.onebusaway.android.ui.ArrivalInfo.<init>(ArrivalInfo.java:249)
      3. org.onebusaway.android.ui.ArrivalInfo.convertObaArrivalInfo(ArrivalInfo.java:65)
      4. org.onebusaway.android.ui.ArrivalsListFragment.getArrivalInfo(ArrivalsListFragment.java:841)
      5. org.onebusaway.android.ui.ArrivalsListHeader.refreshArrivalInfoData(ArrivalsListHeader.java:648)
      6. org.onebusaway.android.ui.ArrivalsListHeader.refresh(ArrivalsListHeader.java:624)
      7. org.onebusaway.android.ui.HomeActivity$7.onPanelCollapsed(HomeActivity.java:1400)
      8. org.onebusaway.android.ui.HomeActivity$7.onPanelStateChanged(HomeActivity.java:1359)
      8 frames
    3. com.sothree.slidinguppanel
      ViewDragHelper$2.run
      1. com.sothree.slidinguppanel.SlidingUpPanelLayout.dispatchOnPanelStateChanged(SlidingUpPanelLayout.java:644)
      2. com.sothree.slidinguppanel.SlidingUpPanelLayout.setPanelStateInternal(SlidingUpPanelLayout.java:1108)
      3. com.sothree.slidinguppanel.SlidingUpPanelLayout.access$900(SlidingUpPanelLayout.java:32)
      4. com.sothree.slidinguppanel.SlidingUpPanelLayout$DragHelperCallback.onViewDragStateChanged(SlidingUpPanelLayout.java:1340)
      5. com.sothree.slidinguppanel.ViewDragHelper.setDragState(ViewDragHelper.java:911)
      6. com.sothree.slidinguppanel.ViewDragHelper$2.run(ViewDragHelper.java:336)
      6 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:739)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:148)
      4. android.app.ActivityThread.main(ActivityThread.java:5461)
      4 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames