java.lang.ExceptionInInitializerError

JIRA | Hengzhi Wu | 2 years ago
  1. 0

    Impacted Cases ============== Reproduce Test Steps ==================== download crosswalk-cordova-15.43.349.0-x86.zip 1. create a project with activity which inherit from CordovaActivity 2. load url in onCreate() 3. run the project Expected Outcome ================ Cordova works fine Actual Outcome ============== Cordova crashed when launch the project. Please look at the following info: {code}05-20 15:57:27.442: E/AndroidRuntime(2452): java.lang.ExceptionInInitializerError 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:350) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:386) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:378) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.dengly.example.firstcordova.MainActivity.onCreate(MainActivity.java:36) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Activity.performCreate(Activity.java:5104) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.access$600(ActivityThread.java:144) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Handler.dispatchMessage(Handler.java:99) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Looper.loop(Looper.java:152) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.main(ActivityThread.java:5132) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invokeNative(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invoke(Method.java:511) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-20 15:57:27.442: E/AndroidRuntime(2452): at dalvik.system.NativeStart.main(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): Caused by: java.lang.NullPointerException 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:905){code} Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== xwalk library was not initialized.

    JIRA | 2 years ago | Hengzhi Wu
    java.lang.ExceptionInInitializerError
  2. 0

    Impacted Cases ============== usecase-embedding-android-tests Reproduce Test Steps ==================== 1. Install shared Embedding UseCase app on the device 2. check the UI & enter Animatable XWalkView case 3. exit this case Expected Outcome ================ test case is normal Actual Outcome ============== app crash when exit this case Crash info: E/AndroidRuntime(19897): FATAL EXCEPTION: main E/AndroidRuntime(19897): java.lang.RuntimeException: Unable to destroy activity {org.xwalk.embedded.api.sample/org.xwalk.embedded.api.sample.AnimatableXWalkViewActivity}: java.lang.NullPointerException E/AndroidRuntime(19897): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3534) E/AndroidRuntime(19897): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3552) E/AndroidRuntime(19897): at android.app.ActivityThread.access$1200(ActivityThread.java:144) E/AndroidRuntime(19897): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1370) E/AndroidRuntime(19897): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(19897): at android.os.Looper.loop(Looper.java:152) E/AndroidRuntime(19897): at android.app.ActivityThread.main(ActivityThread.java:5132) E/AndroidRuntime(19897): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(19897): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(19897): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime(19897): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime(19897): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(19897): Caused by: java.lang.NullPointerException E/AndroidRuntime(19897): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) E/AndroidRuntime(19897): at org.xwalk.embedded.api.sample.AnimatableXWalkViewActivity.onDestroy(AnimatableXWalkViewActivity.java:53) E/AndroidRuntime(19897): at android.app.Activity.performDestroy(Activity.java:5273) E/AndroidRuntime(19897): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1110) E/AndroidRuntime(19897): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3521) E/AndroidRuntime(19897): ... 11 more Test Case Source Code ===================== Test Builds =========== Issue Analysis ==============

    JIRA | 2 years ago | yang yunlong
    java.lang.RuntimeException: Unable to destroy activity {org.xwalk.embedded.api.sample/org.xwalk.embedded.api.sample.AnimatableXWalkViewActivity}: java.lang.NullPointerException
  3. 0

    Impacted Cases ============== Reproduce Test Steps ==================== download crosswalk-cordova-15.43.349.0-x86.zip 1. create a project with activity which inherit from CordovaActivity 2. load url in onCreate() 3. run the project Expected Outcome ================ Cordova works fine Actual Outcome ============== Cordova crashed when launch the project. Please look at the following info: {code}05-20 15:57:27.442: E/AndroidRuntime(2452): java.lang.ExceptionInInitializerError 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:350) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:386) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:378) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.dengly.example.firstcordova.MainActivity.onCreate(MainActivity.java:36) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Activity.performCreate(Activity.java:5104) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.access$600(ActivityThread.java:144) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Handler.dispatchMessage(Handler.java:99) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Looper.loop(Looper.java:152) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.main(ActivityThread.java:5132) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invokeNative(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invoke(Method.java:511) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-20 15:57:27.442: E/AndroidRuntime(2452): at dalvik.system.NativeStart.main(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): Caused by: java.lang.NullPointerException 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:905){code} Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== xwalk library was not initialized.

    JIRA | 2 years ago | Hengzhi Wu
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    App which was built by cordova 4.0 crosswalk 15.44.361.0 will crash when launch it. Impacted Cases ============== All Cordova 4.0 test suites. Reproduce Test Steps ==================== 1. {{cordova create foo com.example.foo foo}} 2. {{cd foo; cordova platform add android}} 3. Download cordova-plugin-crosswalk-webview and setting webview config: {{vim cordova-plugin-crosswalk-webview/src/android/xwalk.gradle}} change: "_beta:13+" to ":15.44.361.0" change: maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } to mavenLocal() 4. Install webview plugin with maven:{{mvn install:install-file -DgroupId=org.xwalk -DartifactId=xwalk_core_library -Dversion=15.44.361.0 -Dpackaging=aar -Dfile=<path>/crosswalk-15.44.361.0.aar -DgeneratePom=true}} 4. {{cordova plugin add ../cordova-plugin-crosswalk-webview}} 5. Connect device and run:{{cordova run android}} Expected Outcome ================ cordova app run successfully. Actual Outcome ============== App crashed Test Builds =========== ||Version||Test Date|| Test Device || Result|| |crosswalk 15.43.358.0|2015.06.05| Nexus 4|{color:green}Pass{color}| |crosswalk 15.44.361.0|2015.06.12| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.362.0|2015.06.13| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.363.0|2015.06.14| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.364.0|2015.06.16| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.365.0|2015.06.19| Nexus 4|{color:red}Crash{color} | Issue Analysis ============== adb logcat: {{W/dalvikvm(10050): threadid=1: thread exiting with uncaught exception (group=0x40f5a930) E/AndroidRuntime(10050): FATAL EXCEPTION: main E/AndroidRuntime(10050): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) E/AndroidRuntime(10050): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) E/AndroidRuntime(10050): at android.app.ActivityThread.access$600(ActivityThread.java:141) E/AndroidRuntime(10050): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroidRuntime(10050): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10050): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(10050): at android.app.ActivityThread.main(ActivityThread.java:5041) E/AndroidRuntime(10050): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime(10050): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10050): Caused by: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209) E/AndroidRuntime(10050): at com.example.foo.MainActivity.onCreate(MainActivity.java:32) E/AndroidRuntime(10050): at android.app.Activity.performCreate(Activity.java:5104) E/AndroidRuntime(10050): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) E/AndroidRuntime(10050): ... 11 more E/AndroidRuntime(10050): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(10050): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80) E/AndroidRuntime(10050): ... 19 more E/AndroidRuntime(10050): Caused by: java.lang.NullPointerException E/AndroidRuntime(10050): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime(10050): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56) E/AndroidRuntime(10050): ... 22 more W/ActivityManager( 517): Force finishing activity com.example.foo/.MainActivity D/dalvikvm( 517): GC_FOR_ALLOC freed 771K, 17% free 15212K/18172K, paused 50ms, total 50ms D/overlay ( 159): Set pipe=RGB1 dpy=0; Set pipe=VG0 dpy=0; Set pipe=VG1 dpy=0; D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0; W/ActivityManager( 517): Activity pause timeout for ActivityRecord{41af7738 u0 com.example.foo/.MainActivity} I/ActivityManager( 517): No longer want com.android.vending (pid 8637): empty for 2193s W/ActivityManager( 517): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.DailyHygiene in 5000ms }}

    JIRA | 1 year ago | Hao Yunfei
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview.
  6. 0

    App which was built by cordova 4.0 crosswalk 15.44.361.0 will crash when launch it. Impacted Cases ============== All Cordova 4.0 test suites. Reproduce Test Steps ==================== 1. {{cordova create foo com.example.foo foo}} 2. {{cd foo; cordova platform add android}} 3. Download cordova-plugin-crosswalk-webview and setting webview config: {{vim cordova-plugin-crosswalk-webview/src/android/xwalk.gradle}} change: "_beta:13+" to ":15.44.361.0" change: maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } to mavenLocal() 4. Install webview plugin with maven:{{mvn install:install-file -DgroupId=org.xwalk -DartifactId=xwalk_core_library -Dversion=15.44.361.0 -Dpackaging=aar -Dfile=<path>/crosswalk-15.44.361.0.aar -DgeneratePom=true}} 4. {{cordova plugin add ../cordova-plugin-crosswalk-webview}} 5. Connect device and run:{{cordova run android}} Expected Outcome ================ cordova app run successfully. Actual Outcome ============== App crashed Test Builds =========== ||Version||Test Date|| Test Device || Result|| |crosswalk 15.43.358.0|2015.06.05| Nexus 4|{color:green}Pass{color}| |crosswalk 15.44.361.0|2015.06.12| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.362.0|2015.06.13| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.363.0|2015.06.14| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.364.0|2015.06.16| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.365.0|2015.06.19| Nexus 4|{color:red}Crash{color} | Issue Analysis ============== adb logcat: {{W/dalvikvm(10050): threadid=1: thread exiting with uncaught exception (group=0x40f5a930) E/AndroidRuntime(10050): FATAL EXCEPTION: main E/AndroidRuntime(10050): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) E/AndroidRuntime(10050): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) E/AndroidRuntime(10050): at android.app.ActivityThread.access$600(ActivityThread.java:141) E/AndroidRuntime(10050): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroidRuntime(10050): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10050): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(10050): at android.app.ActivityThread.main(ActivityThread.java:5041) E/AndroidRuntime(10050): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime(10050): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10050): Caused by: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209) E/AndroidRuntime(10050): at com.example.foo.MainActivity.onCreate(MainActivity.java:32) E/AndroidRuntime(10050): at android.app.Activity.performCreate(Activity.java:5104) E/AndroidRuntime(10050): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) E/AndroidRuntime(10050): ... 11 more E/AndroidRuntime(10050): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(10050): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80) E/AndroidRuntime(10050): ... 19 more E/AndroidRuntime(10050): Caused by: java.lang.NullPointerException E/AndroidRuntime(10050): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime(10050): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56) E/AndroidRuntime(10050): ... 22 more W/ActivityManager( 517): Force finishing activity com.example.foo/.MainActivity D/dalvikvm( 517): GC_FOR_ALLOC freed 771K, 17% free 15212K/18172K, paused 50ms, total 50ms D/overlay ( 159): Set pipe=RGB1 dpy=0; Set pipe=VG0 dpy=0; Set pipe=VG1 dpy=0; D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0; W/ActivityManager( 517): Activity pause timeout for ActivityRecord{41af7738 u0 com.example.foo/.MainActivity} I/ActivityManager( 517): No longer want com.android.vending (pid 8637): empty for 2193s W/ActivityManager( 517): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.DailyHygiene in 5000ms }}

    JIRA | 1 year ago | Hao Yunfei
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview.

    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

      No message provided

      at org.xwalk.core.XWalkPreferences.setValue()
    2. org.xwalk.core
      XWalkPreferences.setValue
      1. org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107)
      1 frame