WordPress.org

Support

Support » Plugins and Hacks » WP Ajaxify Comments » [Resolved] Plugin crashes Android's WebView?

[Resolved] Plugin crashes Android's WebView?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author janjonas

    @janjonas

    Hi,

    thanks for your comment. Do you have any further information about the error ? Is it a client side (JavaScript) error or an application (Java) error? Something like a StackTrace, line of code where the error occurred would be helpful to find the cause.
    Have you tried to disable the WP-Ajaxify-Comments plugin to make sure that the error is caused by the plugin?

    Hope this helps…

    I’ve tried disabling the plugin and the site works normally – comments go through fine on the app. Here’s the (java?) error I see when the app crashes:

    04-20 17:04:49.588: D/WebView(29814): onSizeChanged - w:480 h:762
    04-20 17:04:51.743: I/GATE(29814): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
    04-20 17:04:51.743: D/AndroidRuntime(29814): Shutting down VM
    04-20 17:04:51.743: W/dalvikvm(29814): threadid=1: thread exiting with uncaught exception (group=0x40fdc2a0)
    04-20 17:04:51.938: E/AndroidRuntime(29814): FATAL EXCEPTION: main
    04-20 17:04:51.938: E/AndroidRuntime(29814): java.lang.NullPointerException
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.shuffleelffuhs.shufflemylife.MainActivity$WebClientClass.onPageFinished(MainActivity.java:110)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.os.Handler.dispatchMessage(Handler.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.os.Looper.loop(Looper.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at android.app.ActivityThread.main(ActivityThread.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at java.lang.reflect.Method.invokeNative(Native Method)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at java.lang.reflect.Method.invoke(Method.java:511)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
    04-20 17:04:51.938: E/AndroidRuntime(29814): 	at dalvik.system.NativeStart.main(Native Method)

    The specific code in the app that seems to be breaking:

    @Override
      public void onPageFinished(WebView view, String url) {
       super.onPageFinished(view, url);
       pd.dismiss();
       pd = null;
      }
     }
    }

    This code basically just dismisses a ‘loading’ popup in the app once a page has finished loading. I suppose there’s some bug here because the comments code isn’t technically reloading the page? I’m not sure.

    Also note that there are other AJAX elements being used on the site but these don’t seem to crash?

    Plugin Author janjonas

    @janjonas

    I don’t know the internals of your Android application, but you may have to check if pd is (already) null before calling dismiss() in the onPageFinished method.

    Plugin Author janjonas

    @janjonas

    Problem seems to be fixed. Please feel free to reopen the thread if you need further assistance…

    Plugin Author janjonas

    @janjonas

    Resolved…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Plugin crashes Android's WebView?’ is closed to new replies.
Skip to toolbar