java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

GitHub | sethrosetter | 8 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    GitHub comment 1308#229518130

    GitHub | 8 months ago | sethrosetter
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
  2. 0

    NPE from ToDoLite-Android

    GitHub | 8 months ago | hideki
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

      at com.couchbase.todolite.TasksFragment$TaskAdapter.getView()
    2. com.couchbase.todolite
      TasksFragment$TaskAdapter.getView
      1. com.couchbase.todolite.TasksFragment$TaskAdapter.getView(TasksFragment.java:452)
      1 frame
    3. Android Platform
      ViewGroup.layout
      1. android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
      2. android.widget.AbsListView.obtainView(AbsListView.java:2360)
      3. android.widget.ListView.makeAndAddView(ListView.java:1972)
      4. android.widget.ListView.fillDown(ListView.java:704)
      5. android.widget.ListView.fillSpecific(ListView.java:1412)
      6. android.widget.ListView.layoutChildren(ListView.java:1708)
      7. android.widget.AbsListView.onLayout(AbsListView.java:2161)
      8. android.view.View.layout(View.java:17519)
      9. android.view.ViewGroup.layout(ViewGroup.java:5612)
      10. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      11. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      12. android.view.View.layout(View.java:17519)
      13. android.view.ViewGroup.layout(ViewGroup.java:5612)
      14. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1737)
      15. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1581)
      16. android.widget.LinearLayout.onLayout(LinearLayout.java:1490)
      17. android.view.View.layout(View.java:17519)
      18. android.view.ViewGroup.layout(ViewGroup.java:5612)
      18 frames
    4. Android Support v4
      DrawerLayout.onLayout
      1. android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:907)
      1 frame
    5. Android Platform
      FrameLayout.onLayout
      1. android.view.View.layout(View.java:17519)
      2. android.view.ViewGroup.layout(ViewGroup.java:5612)
      3. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1737)
      4. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1581)
      5. android.widget.LinearLayout.onLayout(LinearLayout.java:1490)
      6. android.view.View.layout(View.java:17519)
      7. android.view.ViewGroup.layout(ViewGroup.java:5612)
      8. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      9. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      10. android.view.View.layout(View.java:17519)
      11. android.view.ViewGroup.layout(ViewGroup.java:5612)
      12. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1737)
      13. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1581)
      14. android.widget.LinearLayout.onLayout(LinearLayout.java:1490)
      15. android.view.View.layout(View.java:17519)
      16. android.view.ViewGroup.layout(ViewGroup.java:5612)
      17. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      18. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      19. android.view.View.layout(View.java:17519)
      20. android.view.ViewGroup.layout(ViewGroup.java:5612)
      21. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1737)
      22. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1581)
      23. android.widget.LinearLayout.onLayout(LinearLayout.java:1490)
      24. android.view.View.layout(View.java:17519)
      25. android.view.ViewGroup.layout(ViewGroup.java:5612)
      26. android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      27. android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      27 frames
    6. Android
      DecorView.onLayout
      1. com.android.internal.policy.DecorView.onLayout(DecorView.java:723)
      1 frame
    7. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:17519)
      2. android.view.ViewGroup.layout(ViewGroup.java:5612)
      3. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2323)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2053)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1244)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6271)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:670)
      9. android.view.Choreographer.doFrame(Choreographer.java:606)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
      11. android.os.Handler.handleCallback(Handler.java:751)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:154)
      14. android.app.ActivityThread.main(ActivityThread.java:6044)
      14 frames
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    9. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
      2 frames