[
https://issues.apache.org/jira/browse/CB-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13581477#comment-13581477
]
mike billau commented on CB-2458:
---------------------------------
Thanks Simon!
> Clicking back button while app is loading causes a NPE
> ------------------------------------------------------
>
> Key: CB-2458
> URL: https://issues.apache.org/jira/browse/CB-2458
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.3.0, 2.4.0
> Reporter: Simon MacDonald
> Assignee: mike billau
> Fix For: 2.5.0
>
>
> Basically the problem is that they have a situation where the user will hit
> the "back" button before loadURL() has been called, causing an NPE and a bad
> exit.
> 02-18 09:49:35.681: E/AndroidRuntime(18993): FATAL EXCEPTION: main
> 02-18 09:49:35.681: E/AndroidRuntime(18993): java.lang.NullPointerException
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> org.apache.cordova.CordovaWebView.startOfHistory(CordovaWebView.java:912)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> org.apache.cordova.CordovaWebView.onKeyDown(CordovaWebView.java:719)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.KeyEvent.dispatch(KeyEvent.java:2609)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.View.dispatchKeyEvent(View.java:7198)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1354)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.webkit.WebView.access$701(WebView.java:262)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.webkit.WebView$PrivateAccess.super_dispatchKeyEvent(WebView.java:1786)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.webkit.WebViewClassic.dispatchKeyEvent(WebViewClassic.java:5716)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.webkit.WebView.dispatchKeyEvent(WebView.java:2110)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1359)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1359)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1359)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1359)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1920)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1395)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.app.Activity.dispatchKeyEvent(Activity.java:2370)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1847)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3701)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewRootImpl.handleImeFinishedEvent(ViewRootImpl.java:3651)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2818)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.os.Looper.loop(Looper.java:137)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> android.app.ActivityThread.main(ActivityThread.java:5039)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> java.lang.reflect.Method.invoke(Method.java:511)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
> 02-18 09:49:35.681: E/AndroidRuntime(18993): at
> dalvik.system.NativeStart.main(Native Method)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira