java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.akhileshchobey.mynotes.DatabaseOperations.insertData(java.lang.String)' on a null object reference

  1. 0

    App crashing during onTextChanged()

    Stack Overflow | 7 months ago | Akhilesh Chobey
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.akhileshchobey.mynotes.DatabaseOperations.insertData(java.lang.String)' on a null object reference
  2. 0
    The resource was accessed after it was dismissed.
  3. 0
    The parsed JSON does not contains the requested field.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Initialize the variable before calling a method on it.
  6. 0
    Use 'dialog' to access views from custom_layout layout.

    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 'boolean com.akhileshchobey.mynotes.DatabaseOperations.insertData(java.lang.String)' on a null object reference

      at com.akhileshchobey.mynotes.Main2Activity.onTextChanged()
    2. com.akhileshchobey.mynotes
      Main2Activity.onTextChanged
      1. com.akhileshchobey.mynotes.Main2Activity.onTextChanged(Main2Activity.java:39)
      1 frame
    3. Android Platform
      BaseInputConnection.setComposingText
      1. android.widget.TextView.sendOnTextChanged(TextView.java:7746)
      2. android.widget.TextView.handleTextChanged(TextView.java:7806)
      3. android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:9724)
      4. android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:964)
      5. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:515)
      6. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:454)
      7. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:33)
      8. android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685)
      9. android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:445)
      9 frames
    4. Android
      IInputConnectionWrapper$MyHandler.handleMessage
      1. com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:340)
      2. com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
      2 frames
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:102)
      2. android.os.Looper.loop(Looper.java:135)
      3. android.app.ActivityThread.main(ActivityThread.java:5264)
      3 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
      2 frames