java.lang.ExceptionInInitializerError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Reproduce Test Steps ========================================================================= 1. Unzip the 'crosswalk-cordova-13.42.322.0-arm.zip' -d localpath(https://download.01.org/crosswalk/releases/crosswalk/android/canary/13.42.322.0/arm/crosswalk-cordova-13.42.322.0-arm.zip) 2. Build, install and launch cordova app: {code} cd /localpath/crosswalk-cordova-13.42.322.0-arm ./bin/create hello1 com.example.hello1 hello1 cd hello1 ./cordova/build cd /bin adb install hello1-debug.apk Launch the hello1, check the behavior {code} Expected Outcome ========================================================================= The app should be launched Actual Outcome ========================================================================= App crash occurred, this issue also exist on ZTE x86 device using crosswalk-cordova-13.42.322.0-x86. Test Builds ========================================================================= ||Version||Test Date|| Test Device || Result || |Canary 13.42.319.0 | 2015.03.24 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 13.42.320.0 | 2015.03.24 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 13.42.321.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 13.42.322.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 14.42.323.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 14.42.324.0 | 2015.03.26 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 14.42.325.0 | 2015.03.26 | Nexus 5 ARM|{color: green}Pass{color}| Log Info ========================================================================= {code} E/AndroidRuntime(13249): FATAL EXCEPTION: main E/AndroidRuntime(13249): Process: com.example.hello1, PID: 13249 E/AndroidRuntime(13249): java.lang.ExceptionInInitializerError E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:340) E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:376) E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:368) E/AndroidRuntime(13249): at com.example.hello1.hello1.onCreate(hello1.java:31) E/AndroidRuntime(13249): at android.app.Activity.performCreate(Activity.java:5231) E/AndroidRuntime(13249): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/AndroidRuntime(13249): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) E/AndroidRuntime(13249): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) E/AndroidRuntime(13249): at android.app.ActivityThread.access$800(ActivityThread.java:135) E/AndroidRuntime(13249): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) E/AndroidRuntime(13249): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(13249): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime(13249): at android.app.ActivityThread.main(ActivityThread.java:5001) E/AndroidRuntime(13249): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(13249): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) E/AndroidRuntime(13249): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) E/AndroidRuntime(13249): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class org.xwalk.core.XWalkCoreWrapper.getBridgeClass(java.lang.String)' on a null object reference E/AndroidRuntime(13249): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:106) E/AndroidRuntime(13249): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:897) E/AndroidRuntime(13249): ... 16 more {code}
    via by lvyunxiao,
  • Reproduce Test Steps ========================================================================= 1. Unzip the 'crosswalk-cordova-13.42.322.0-arm.zip' -d localpath(https://download.01.org/crosswalk/releases/crosswalk/android/canary/13.42.322.0/arm/crosswalk-cordova-13.42.322.0-arm.zip) 2. Build, install and launch cordova app: {code} cd /localpath/crosswalk-cordova-13.42.322.0-arm ./bin/create hello1 com.example.hello1 hello1 cd hello1 ./cordova/build cd /bin adb install hello1-debug.apk Launch the hello1, check the behavior {code} Expected Outcome ========================================================================= The app should be launched Actual Outcome ========================================================================= App crash occurred, this issue also exist on ZTE x86 device using crosswalk-cordova-13.42.322.0-x86. Test Builds ========================================================================= ||Version||Test Date|| Test Device || Result || |Canary 13.42.319.0 | 2015.03.24 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 13.42.320.0 | 2015.03.24 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 13.42.321.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 13.42.322.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 14.42.323.0 | 2015.03.26 | Nexus 5 ARM|{color: red}Fail{color}| |Canary 14.42.324.0 | 2015.03.26 | Nexus 5 ARM|{color: green}Pass{color}| |Canary 14.42.325.0 | 2015.03.26 | Nexus 5 ARM|{color: green}Pass{color}| Log Info ========================================================================= {code} E/AndroidRuntime(13249): FATAL EXCEPTION: main E/AndroidRuntime(13249): Process: com.example.hello1, PID: 13249 E/AndroidRuntime(13249): java.lang.ExceptionInInitializerError E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:340) E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:376) E/AndroidRuntime(13249): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:368) E/AndroidRuntime(13249): at com.example.hello1.hello1.onCreate(hello1.java:31) E/AndroidRuntime(13249): at android.app.Activity.performCreate(Activity.java:5231) E/AndroidRuntime(13249): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) E/AndroidRuntime(13249): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) E/AndroidRuntime(13249): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) E/AndroidRuntime(13249): at android.app.ActivityThread.access$800(ActivityThread.java:135) E/AndroidRuntime(13249): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) E/AndroidRuntime(13249): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(13249): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime(13249): at android.app.ActivityThread.main(ActivityThread.java:5001) E/AndroidRuntime(13249): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(13249): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) E/AndroidRuntime(13249): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) E/AndroidRuntime(13249): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class org.xwalk.core.XWalkCoreWrapper.getBridgeClass(java.lang.String)' on a null object reference E/AndroidRuntime(13249): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:106) E/AndroidRuntime(13249): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:897) E/AndroidRuntime(13249): ... 16 more {code}
    via by lvyunxiao,
  • 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.
    via by Hengzhi Wu,
  • 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 }}
    via by Hao Yunfei,
  • 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 ==============
    via by yang yunlong,
  • Impacted Cases =========== App crashed on using AAR file generated, from building Crosswalk for Android Reproduce Test Steps ==================== Build crosswalk code for target xwalk_core_lib_aar Followed steps in guide to build: echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env rm -rf out/ . ./xwalk/build/android/envsetup.sh export GYP_GENERATORS='ninja' python xwalk/gyp_xwalk ninja -C out/Release xwalk_core_library_aar Use the generated AAR file in AndroidStudio Expected Outcome ================ No crash Same application code works with AAR picked from Crosswalk Release 14.43.343.12. But on using the AAR generated from building Crosswalk, app crashes. Actual Outcome ============== --------- beginning of crash E/AndroidRuntime( 4722): FATAL EXCEPTION: main E/AndroidRuntime( 4722): java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) E/AndroidRuntime( 4722): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) E/AndroidRuntime( 4722): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 4722): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 4722): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 4722): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 4722): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 4722): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime( 4722): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime( 4722): at xx.xxx.android.controller.MainActivity.onCreate(MainActivity.java:196) E/AndroidRuntime( 4722): at android.app.Activity.performCreate(Activity.java:5990) E/AndroidRuntime( 4722): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== Possible that recent PR https://github.com/crosswalk-project/crosswalk/pull/3080 broke this, stack trace is same
    via by rahul pal,
  • Impacted Cases =========== App crashed on using AAR file generated, from building Crosswalk for Android Reproduce Test Steps ==================== Build crosswalk code for target xwalk_core_lib_aar Followed steps in guide to build: echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env rm -rf out/ . ./xwalk/build/android/envsetup.sh export GYP_GENERATORS='ninja' python xwalk/gyp_xwalk ninja -C out/Release xwalk_core_library_aar Use the generated AAR file in AndroidStudio Expected Outcome ================ No crash Same application code works with AAR picked from Crosswalk Release 14.43.343.12. But on using the AAR generated from building Crosswalk, app crashes. Actual Outcome ============== --------- beginning of crash E/AndroidRuntime( 4722): FATAL EXCEPTION: main E/AndroidRuntime( 4722): java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) E/AndroidRuntime( 4722): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) E/AndroidRuntime( 4722): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 4722): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 4722): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 4722): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 4722): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 4722): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime( 4722): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime( 4722): at xx.xxx.android.controller.MainActivity.onCreate(MainActivity.java:196) E/AndroidRuntime( 4722): at android.app.Activity.performCreate(Activity.java:5990) E/AndroidRuntime( 4722): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== Possible that recent PR https://github.com/crosswalk-project/crosswalk/pull/3080 broke this, stack trace is same
    via by rahul pal,
  • 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 }}
    via by Hao Yunfei,
  • 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.
    via by Hengzhi Wu,
  • Reproduce Test Steps ==================== Enable lzma support: run gyp_xwalk --use_lzma=1 build XWalkCoreShell.apk. Expected Outcome ================ Not crash. Actual Outcome ============== Crashed. Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== in org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) this rely on coreWrapper, which will be initialized after lzma decompressed. So the solution is place XWalkViewShellActivity.setContentView in onXWalkReady. call sequence: XWalkViewShellActivity.setContentView -> XWalkViewSectionFragment.onCreate -> XWalkViewSectionFragment.onCreateView -> XWalkViewShellActivity.onXWalkViewCreated -> XWalkPreferences.setValue (coreWrapper is null) crash stack: D/XWalkActivity( 1342): Reserve object: class org.xwalk.core.XWalkView D/XWalkActivity( 1342): Reserve object: class org.xwalk.core.xwview.shell.XWalkViewShellActivity$11 D/XWalkActivity( 1342): Reserve method: setResourceClient D/XWalkActivity( 1342): Reserve object: class org.xwalk.core.xwview.shell.XWalkViewShellActivity$12 D/XWalkActivity( 1342): Reserve method: setUIClient D/AndroidRuntime( 1342): Shutting down VM W/dalvikvm( 1342): threadid=1: thread exiting with uncaught exception (group=0xb1b0eba8) E/AndroidRuntime( 1342): FATAL EXCEPTION: main E/AndroidRuntime( 1342): Process: org.xwalk.core.xwview.shell, PID: 1342 E/AndroidRuntime( 1342): java.lang.NullPointerException E/AndroidRuntime( 1342): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) E/AndroidRuntime( 1342): at org.xwalk.core.xwview.shell.XWalkViewShellActivity.onXWalkViewCreated(XWalkViewShellActivity.java:367) E/AndroidRuntime( 1342): at org.xwalk.core.xwview.shell.XWalkViewSectionFragment.onCreateView(XWalkViewSectionFragment.java:42) E/AndroidRuntime( 1342): at android.app.Fragment.performCreateView(Fragment.java:1700) E/AndroidRuntime( 1342): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890) E/AndroidRuntime( 1342): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062) E/AndroidRuntime( 1342): at android.app.BackStackRecord.run(BackStackRecord.java:684) E/AndroidRuntime( 1342): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447) E/AndroidRuntime( 1342): at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:479) E/AndroidRuntime( 1342): at android.support.v13.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:145) E/AndroidRuntime( 1342): at android.support.v4.view.ViewPager.populate(ViewPager.java:1073) E/AndroidRuntime( 1342): at android.support.v4.view.ViewPager.populate(ViewPager.java:919) E/AndroidRuntime( 1342): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1441) E/AndroidRuntime( 1342): at android.view.View.measure(View.java:16497) E/AndroidRuntime( 1342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) E/AndroidRuntime( 1342): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) E/AndroidRuntime( 1342): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) E/AndroidRuntime( 1342): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) E/AndroidRuntime( 1342): at android.view.View.measure(View.java:16497) E/AndroidRuntime( 1342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) E/AndroidRuntime( 1342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) E/AndroidRuntime( 1342): at android.view.View.measure(View.java:16497) E/AndroidRuntime( 1342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) E/AndroidRuntime( 1342): at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:327) E/AndroidRuntime( 1342): at android.view.View.measure(View.java:16497) E/AndroidRuntime( 1342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) E/AndroidRuntime( 1342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) E/AndroidRuntime( 1342): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291) E/AndroidRuntime( 1342): at android.view.View.measure(View.java:16497) E/AndroidRuntime( 1342): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1916) E/AndroidRuntime( 1342): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1113) E/AndroidRuntime( 1342): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295) E/AndroidRuntime( 1342): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000) E/AndroidRuntime( 1342): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670) E/AndroidRuntime( 1342): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) E/AndroidRuntime( 1342): at android.view.Choreographer.doCallbacks(Choreographer.java:574) E/AndroidRuntime( 1342): at android.view.Choreographer.doFrame(Choreographer.java:544) E/AndroidRuntime( 1342): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) E/AndroidRuntime( 1342): at android.os.Handler.handleCallback(Handler.java:733) E/AndroidRuntime( 1342): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 1342): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 1342): at android.app.ActivityThread.main(ActivityThread.java:5017) E/AndroidRuntime( 1342): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1342): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 1342): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 1342): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 1342): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 376): Force finishing activity org.xwalk.core.xwview.shell/.XWalkViewShellActivity
    via by Dong Jun,
    • java.lang.ExceptionInInitializerError at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:340) at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:376) at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:368) at com.example.hello1.hello1.onCreate(hello1.java:31) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class org.xwalk.core.XWalkCoreWrapper.getBridgeClass(java.lang.String)' on a null object reference at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:106) at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:897) ... 16 more
    No Bugmate found.