java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65538, result=-1, data=Intent { dat=file:///storage/emulated/0/DCIM/Camera/IMG_20160823_160716.jpg typ=image/jpeg }} to activity {com.avoscloud.chat/com.avoscloud.chat.activity.ChatRoomActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference

GitHub | FanYimin | 5 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 34#246256659

    GitHub | 5 months ago | FanYimin
    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65538, result=-1, data=Intent { dat=file:///storage/emulated/0/DCIM/Camera/IMG_20160823_160716.jpg typ=image/jpeg }} to activity {com.avoscloud.chat/com.avoscloud.chat.activity.ChatRoomActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference

      at cn.leancloud.chatkit.activity.LCIMConversationFragment.getRealPathFromURI()
    2. cn.leancloud.chatkit
      LCIMConversationFragment.onActivityResult
      1. cn.leancloud.chatkit.activity.LCIMConversationFragment.getRealPathFromURI(LCIMConversationFragment.java:327)
      2. cn.leancloud.chatkit.activity.LCIMConversationFragment.onActivityResult(LCIMConversationFragment.java:300)
      2 frames
    3. com.avoscloud.chat
      ConversationFragment.onActivityResult
      1. com.avoscloud.chat.activity.ConversationFragment.onActivityResult(ConversationFragment.java:168)
      1 frame
    4. Android Support v4
      FragmentActivity.onActivityResult
      1. android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:175)
      1 frame
    5. com.avoscloud.chat
      ChatRoomActivity.onActivityResult
      1. com.avoscloud.chat.activity.ChatRoomActivity.onActivityResult(ChatRoomActivity.java:63)
      1 frame
    6. Android Platform
      ActivityThread.deliverResults
      1. android.app.Activity.dispatchActivityResult(Activity.java:6508)
      2. android.app.ActivityThread.deliverResults(ActivityThread.java:3702)
      2 frames