java.lang.NullPointerException: Attempt to invoke virtual method 'void com.googlecode.tesseract.android.TessBaseAPI.setImage(android.graphics.Bitmap)' on a null object reference

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

    GitHub comment 230#242934229

    GitHub | 6 months ago | Blaisorblade
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.googlecode.tesseract.android.TessBaseAPI.setImage(android.graphics.Bitmap)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void com.googlecode.tesseract.android.TessBaseAPI.setImage(android.graphics.Bitmap)' on a null object reference

      at com.kamron.pogoiv.OCRHelper.getPokemonNameFromImg()
    2. com.kamron.pogoiv
      MainActivity$6.onReceive
      1. com.kamron.pogoiv.OCRHelper.getPokemonNameFromImg(Unknown Source)
      2. com.kamron.pogoiv.OCRHelper.scanPokemon(Unknown Source)
      3. com.kamron.pogoiv.MainActivity.scanPokemon(Unknown Source)
      4. com.kamron.pogoiv.MainActivity.takeScreenshot(Unknown Source)
      5. com.kamron.pogoiv.MainActivity.access$2500(Unknown Source)
      6. com.kamron.pogoiv.MainActivity$6.onReceive(Unknown Source)
      6 frames
    3. Android Support v4
      LocalBroadcastManager$1.handleMessage
      1. android.support.v4.content.LocalBroadcastManager.getInstance(Unknown Source)
      2. android.support.v4.content.LocalBroadcastManager.getInstance(Unknown Source)
      3. android.support.v4.content.LocalBroadcastManager$1.handleMessage(Unknown Source)
      3 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:102)
      2. android.os.Looper.loop(Looper.java:148)
      3. android.app.ActivityThread.main(ActivityThread.java:5551)
      3 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
      2 frames