java.lang.NullPointerException

JIRA | Wang Lei | 7 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

    Impacted Cases ============== usecase-webapi-android-tests/FileReader usecase-webapi-android-tests/FileSystem Reproduce Test Steps ==================== A Sample for reproducing this issue: 1. Download from https://download.01.org/crosswalk/releases/crosswalk/android/canary/22.51.553.0/crosswalk-22.51.553.0.zip 2. pack the package using the command: {code} crosswalk-pkg -c /home/test/00_test/crosswalk-zip-cache/crosswalk-22.51.553.0.zip --manifest='{"name":"filereader","xwalk_package_id":"org.xwalk.filereader","start_url":"http://wts.crosswalk-project.org/tests/usecase/samples/FileReader/index.html","xwalk_android_permissions":["CAMERA","MODIFY_AUDIO_SETTINGS","RECORD_AUDIO","READ_EXTERNAL_STORAGE","WRITE_EXTERNAL_STORAGE"]}' -p android --targets=x86 -a embedded /tmp/123/ {code} 3. Install the apk and launch the app 4. Click the button Expected Outcome ================ Display some options and could select one file from 'File Explorer' Actual Outcome ============== Crash happened when click the 'Open files' button *if remove any permission in manifest.json, crash issue doesn't happen, There is no response when click the button, the result is same as XWALK-7189.* Test Case Source Code ===================== ||Type||URL|| |Source Code in github| https://github.com/crosswalk-project/demo-express/tree/master/samples/FileReader | |Source Code in github| https://github.com/crosswalk-project/crosswalk-test-suite/tree/master/usecase/usecase-webapi-xwalk-tests/samples/FileSystem | |wts url| http://wts.crosswalk-project.org/tests/usecase/samples/FileReader/index.html | |wts url | http://wts.crosswalk-project.org/tests/usecase/samples/FileSystem/index.html | Test Builds =========== ||Version||Test Date|| Test Device || Result || |Canary 22.51.552.0|2016.08.01| ASUS Memo Pad8| {color:green}PASS{color} | |Canary 22.51.553.0|2016.08.01| ASUS Memo Pad8| {color:red}FAIL{color} | |Canary 22.51.553.0|2016.08.01|Xiaomi Pad 2| {color:red}FAIL{color} | |Canary 22.51.554.0|2016.08.01|ASUS Memo Pad8| {color:red}FAIL{color} | Issue Analysis ============== {code} E/AndroidRuntime( 8097): FATAL EXCEPTION: main E/AndroidRuntime( 8097): Process: org.xwalk.choosefile, PID: 8097 E/AndroidRuntime( 8097): java.lang.NullPointerException E/AndroidRuntime( 8097): at android.content.ClipData.newUri(ClipData.java:715) E/AndroidRuntime( 8097): at org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.onPostExecute(SelectFileDialog.java:238) E/AndroidRuntime( 8097): at org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.onPostExecute(SelectFileDialog.java:213) E/AndroidRuntime( 8097): at android.os.AsyncTask.finish(AsyncTask.java:632) E/AndroidRuntime( 8097): at android.os.AsyncTask.access$600(AsyncTask.java:177) E/AndroidRuntime( 8097): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) E/AndroidRuntime( 8097): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 8097): at android.os.Looper.loop(Looper.java:149) E/AndroidRuntime( 8097): at android.app.ActivityThread.main(ActivityThread.java:5061) E/AndroidRuntime( 8097): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 8097): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 8097): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788) E/AndroidRuntime( 8097): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604) E/AndroidRuntime( 8097): at dalvik.system.NativeStart.main(Native Method) {code}

    JIRA | 7 months ago | Wang Lei
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at android.content.ClipData.newUri()
    2. Android Platform
      ClipData.newUri
      1. android.content.ClipData.newUri(ClipData.java:715)
      1 frame
    3. org.chromium.ui
      SelectFileDialog$GetCameraIntentTask.onPostExecute
      1. org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.onPostExecute(SelectFileDialog.java:238)
      2. org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.onPostExecute(SelectFileDialog.java:213)
      2 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.AsyncTask.finish(AsyncTask.java:632)
      2. android.os.AsyncTask.access$600(AsyncTask.java:177)
      3. android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
      4. android.os.Handler.dispatchMessage(Handler.java:102)
      5. android.os.Looper.loop(Looper.java:149)
      6. android.app.ActivityThread.main(ActivityThread.java:5061)
      6 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
      2 frames
    7. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame