Bug 4806 - WebViewJavascriptInterface crashes when hitting [Click Me!!] in API 10 emulator
Summary: WebViewJavascriptInterface crashes when hitting [Click Me!!] in API 10 emulator
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.1.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
: 6661 ()
Depends on:
Reported: 2012-05-01 13:48 UTC by PJ
Modified: 2013-06-24 02:53 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description PJ 2012-05-01 13:48:18 UTC
Steps to reproduce this issue:
1. Run/Debug WebViewJavaScriptInterface.
2. Click 'ClickMe!'.

Actual result:
Application crash after clicking 'ClickMe!'.

Expected Result:
Application should displayed message after click on 'ClickMe!' button.

Logcat: https://gist.github.com/2569555

Mac 10.7.3

Device info:
API 10 emulator

Not seen on:
API 8 emulator

App info:
WebViewJavascriptinterface/monodoid-4.1 preview
Comment 1 Jonathan Pryor 2012-05-03 15:32:12 UTC
I don't think that this is fixable:


> This is a bug with 2.3.x. simulator - Javascript->Java bridge is bugged

It even crashes with Google's WebViewDemo Java app.

Worse (though unsurprising, given the above info) this has nothing to do with [Export]. If we stick to e.g. IRunnable.Run, as done here:


It still fails.

Finally, from the logcat:

> W/dalvikvm(  390): JNI WARNING: jarray 0x40549fe8 points to non-array object (Ljava/lang/String;)

If we enable all logging (lref & gref), the JNI handle 0x40549fe8 _never_ enters or exits Mono for Android.


(Of course 0x40549fe8 is specific to the process. The point is that no matter what JNI handle value causes the process to abort, it never goes through the lref & gref logging code. We're not producing that value, and we're not consuming that value. I have no idea where it's even coming from; presumably it's being generated in Android's JavaScript bridge code.)
Comment 2 Jonathan Pryor 2012-08-23 14:57:51 UTC
*** Bug 6661 has been marked as a duplicate of this bug. ***
Comment 3 Prashant manu 2013-06-24 02:53:12 UTC
I have checked the Read me file and test cases as well. Things are updated and hence changing the status to verified.