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

Stack Overflow | HourGlass | 5 months ago
  1. 0

    view.getDrawingCache() returns null only in Samsung Galaxy note 8.0?

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

    TransformationUtils.rotateImageExif may cause NullPointerException

    GitHub | 2 years ago | b22n
    java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Bitmap$Config.nativeInt' on a null object reference
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. Agócs Tamás 1 times, last 6 months ago
  2. balajivaishnav 3 times, last 8 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

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

    at android.graphics.Bitmap.createBitmap()
  2. Android Platform
    Bitmap.createBitmap
    1. android.graphics.Bitmap.createBitmap(Bitmap.java:614)
    1 frame
  3. in.com.hourglass
    DrawingActivity$ToolIconClick.onClick
    1. in.com.hourglass.views.DrawView.getCorrectedBitmapWithoutResizing(DrawView.java:449)
    2. in.com.hourglass.activities.DrawingActivity.saveAnswerSheet(DrawingActivity.java:842)
    3. in.com.hourglass.activities.DrawingActivity.navigateNext(DrawingActivity.java:426)
    4. in.com.hourglass.activities.DrawingActivity.access$500(DrawingActivity.java:89)
    5. in.com.hourglass.activities.DrawingActivity$ToolIconClick.onClick(DrawingActivity.java:362)
    5 frames
  4. Android Platform
    ActivityThread.main
    1. android.view.View.performClick(View.java:4789)
    2. android.view.View$PerformClick.run(View.java:19881)
    3. android.os.Handler.handleCallback(Handler.java:739)
    4. android.os.Handler.dispatchMessage(Handler.java:95)
    5. android.os.Looper.loop(Looper.java:135)
    6. android.app.ActivityThread.main(ActivityThread.java:5294)
    6 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
    2 frames