Bug 12254 - removing delegate from LayoutChange crashes emulator
Summary: removing delegate from LayoutChange crashes emulator
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.6.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Jonathan Pryor
: 12049 ()
Depends on:
Reported: 2013-05-15 15:20 UTC by Bas Smit
Modified: 2013-06-06 14:32 UTC (History)
3 users (show)

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

logcat output from emulator, see line 333 (22.28 KB, text/plain)
2013-05-15 15:20 UTC, Bas Smit

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 Bas Smit 2013-05-15 15:20:07 UTC
Created attachment 3971 [details]
logcat output from emulator, see line 333

I have a very simple app consisting of the following classes. Running it in the emulator results in an unsupported exception. I added the entire logcat output for completeness. The first relevant exception can be found at line 333. Please let me know if additional information is required.


    using Android.App;
    using Android.OS;
    using Android.Widget;
    namespace Android
        [Activity(Label = "Android", MainLauncher = true, Icon = "@drawable/icon")]
        public class Activity1 : Activity
            protected override void OnCreate(Bundle bundle)
                SetContentView(new View1(this, null));
    using Android.Content;
    using Android.Util;
    using Android.Views;
    namespace Android
        public class View1 : View
            public View1(Context context, IAttributeSet attrs) :
                base(context, attrs)
                LayoutChange += LayoutChanged;
            void LayoutChanged(object sender, LayoutChangeEventArgs e)
                LayoutChange -= LayoutChanged;
Comment 1 Jonathan Pryor 2013-05-23 14:10:10 UTC
*** Bug 12049 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Pryor 2013-06-06 14:32:49 UTC
Fixed in monodroid master/1b6077b9.