java.lang.NullPointerException

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.

  • Impacted Cases ============== {code} java.lang.NullPointerException at org.xwalk.core.internal.XWalkSettingsInternal$EventHandler.access$600(XWalkSettingsInternal.java:100) at org.xwalk.core.internal.XWalkSettingsInternal.setAllowFileAccessFromFileURLs(XWalkSettingsInternal.java:371) at com.yoren.canon.MainActivity.onXWalkReady(MainActivity.java:81) at org.xwalk.core.XWalkActivity$2.run(XWalkActivity.java:122) at org.xwalk.core.XWalkActivityDelegate.onActivateCompleted(XWalkActivityDelegate.java:179) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:303) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:266) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5117) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) {code} Reproduce Test Steps ==================== run... Expected Outcome ================ .setAllowFileAccessFromFileURLs(true); .setAllowUniversalAccessFromFileURLs(true); Actual Outcome ============== crash Test Case Source Code ===================== {code} XWalkView web_view = (XWalkView) findViewById(R.id.login_web_view); {code} . . . {code} @Override protected void onXWalkReady() { try { Method ___getBridge = XWalkView.class.getDeclaredMethod("getBridge"); ___getBridge.setAccessible(true); XWalkViewBridge xWalkViewBridge = null; xWalkViewBridge = (XWalkViewBridge) ___getBridge.invoke(web_view); XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //17.46.448.4 crash here ↓ xWalkViewBridge.getSettings().setAllowFileAccessFromFileURLs(true); xWalkViewBridge.getSettings().setAllowUniversalAccessFromFileURLs(true); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } web_view.load(url, null); } {code} Test Builds =========== Issue Analysis ==============
    via by 朱杰,
  • Impacted Cases ============== {code} java.lang.NullPointerException at org.xwalk.core.internal.XWalkSettingsInternal$EventHandler.access$600(XWalkSettingsInternal.java:100) at org.xwalk.core.internal.XWalkSettingsInternal.setAllowFileAccessFromFileURLs(XWalkSettingsInternal.java:371) at com.yoren.canon.MainActivity.onXWalkReady(MainActivity.java:81) at org.xwalk.core.XWalkActivity$2.run(XWalkActivity.java:122) at org.xwalk.core.XWalkActivityDelegate.onActivateCompleted(XWalkActivityDelegate.java:179) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:303) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:266) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5117) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) {code} Reproduce Test Steps ==================== run... Expected Outcome ================ .setAllowFileAccessFromFileURLs(true); .setAllowUniversalAccessFromFileURLs(true); Actual Outcome ============== crash Test Case Source Code ===================== {code} XWalkView web_view = (XWalkView) findViewById(R.id.login_web_view); {code} . . . {code} @Override protected void onXWalkReady() { try { Method ___getBridge = XWalkView.class.getDeclaredMethod("getBridge"); ___getBridge.setAccessible(true); XWalkViewBridge xWalkViewBridge = null; xWalkViewBridge = (XWalkViewBridge) ___getBridge.invoke(web_view); XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //17.46.448.4 crash here ↓ xWalkViewBridge.getSettings().setAllowFileAccessFromFileURLs(true); xWalkViewBridge.getSettings().setAllowUniversalAccessFromFileURLs(true); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } web_view.load(url, null); } {code} Test Builds =========== Issue Analysis ==============
    via by 朱杰,
    • java.lang.NullPointerException at org.xwalk.core.internal.XWalkSettingsInternal$EventHandler.access$600(XWalkSettingsInternal.java:100) at org.xwalk.core.internal.XWalkSettingsInternal.setAllowFileAccessFromFileURLs(XWalkSettingsInternal.java:371) at com.yoren.canon.MainActivity.onXWalkReady(MainActivity.java:81) at org.xwalk.core.XWalkActivity$2.run(XWalkActivity.java:122) at org.xwalk.core.XWalkActivityDelegate.onActivateCompleted(XWalkActivityDelegate.java:179) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:303) at org.xwalk.core.XWalkLibraryLoader$ActivateTask.onPostExecute(XWalkLibraryLoader.java:266) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5117) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)
    No Bugmate found.