[Mono-bugs] [Bug 662315] Accessing System.Text.Encoding.Default results in a SIGILL

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 12 15:09:51 EST 2011



Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jpryor at novell.com
         Resolution|                            |FIXED

--- Comment #2 from Jonathan Pryor <jpryor at novell.com> 2011-01-12 20:09:50 UTC ---
I can't reproduce this in svn, so presumably it's been fixed.

My guess, based on your statement that it fails in 2.2 but works in 2.3, is
that the the problem isn't WebClient/Encoding/etc., but rather an ABI change
between Android v8 and Android v9.

As an example that bit me, one of our test apps is basically:

    class TestActivity : Activity {
        protected override void OnCreate(Bundle b)
            var tv = new TextView (this);
            var sv = new ScrollView (this);
            sv.AddView (tv);
            tv.Touch += (o, e) => Log.Info ("TestApp", "touched!");

It starts normally on a 2.2 device.  Touch the screen to scroll, and BOOM, it
crashes because it can't find the type android/view/InputEvent.  This comes up
because the Touch event passes a View.TouchEventArgs instance, which has a
View.TouchEventArgs.Event property, of type MotionEvent.  So MonoDroid
dutifully attempts to create a proxy for the MotionEvent instance.

Here's why it breaks in the above sample: in Android v8, MotionEvent inherits
Object.  In Android v9, MotionEvent inherits InputEvent, which is new to v9. 
Since the Mono.Android.dll you built your app against was based on Android v9,
it references v9-specific types, and things go boom.


The next release will be fixing the above problem (and presumably the
Encoding.Default & WebClient problems, as I can't reproduce them on trunk) by
moving to a "one Mono.Android.dll per Android api level" model; documentation

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list