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

Tags:
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:
Status:
VERIFIED UPSTREAM

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


Environment:
mono-android-4.1.2.230625174
MonoDevelop-aea1769d05f0ca1fbbf25aa223ee2af419bafbbf
Mac 10.7.3

Device info:
API 10 emulator


Not seen on:
Device
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:

http://stackoverflow.com/questions/5253916/why-does-the-webviewdemo-die

> 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:

    http://stackoverflow.com/a/9746911/83444

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.

http://docs.xamarin.com/android/advanced_topics/diagnostics

(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.