Bug 13770 - JIT Exception raising PropertyChanged
Summary: JIT Exception raising PropertyChanged
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: 6.4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2013-08-06 00:03 UTC by jacobf
Modified: 2013-10-28 10:55 UTC (History)
4 users (show)

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


Description jacobf 2013-08-06 00:03:30 UTC
Since upgrading Xamarin Studio, etc., I'm now getting the following exception on the device:

    System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) <Module>:invoke_void__this___object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

In the following method:

    public class ViewModelBase : INotifyPropertyChanged
        public event PropertyChangedEventHandler PropertyChanged;

        protected void Notify(params string[] propertyNames)
            if (PropertyChanged != null)
                foreach (var propertyName in propertyNames)
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
     // ...

The exception does not occur for all invocations of the method... I have not narrowed down the conditions under which it occurs.

Version Info:

=== Xamarin Studio ===

Version 4.0.10 (build 7)
Installation UUID: d607f156-0fa2-4d15-aeb1-754da529fd97
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (
	Package version: 302000000

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.8.0
Android SDK: Not found

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 5a0fe54
Build date: 2013-30-07 08:24:03-0400

=== Build Information ===

Release ID: 400100007
Git revision: f324e2154ee86ae1b6b8483392eddbf418e6381b
Build date: 2013-07-20 06:23:58+0000
Xamarin addins: fe4f180e2386eafc00087ef68c3a580cff4a2592

=== Operating System ===

Mac OS X 10.8.4
Darwin Jacob-Foshees-MacBook-Air.local 12.4.1 Darwin Kernel Version 12.4.1
    Tue May 21 17:04:50 PDT 2013
    root:xnu-2050.40.51~1/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-08-06 04:25:17 UTC
Can you attach a project we can use to reproduce this?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-08-07 06:47:48 UTC
That's pretty much a perfect test case, thanks.

Zoltan, can you have a look?
Comment 4 jacobf 2013-08-13 17:51:49 UTC
Hey guys, thanks for having a look at this. Any update?
We make weekly releases to our stakeholders, and we are blocked until this is resolved... :-(
Comment 5 Zoltan Varga 2013-08-13 20:09:32 UTC
As a workaround, try not using extension methods as event handlers, i.e.
in the testcase, this seems to trigger the error.
Comment 6 jacobf 2013-08-14 18:12:48 UTC
Thanks for the suggested work-around. I've verified that works and we will be able to make a release this week. (-=
Comment 8 Zoltan Varga 2013-10-09 12:47:47 UTC
Yes, this is still not fixed.
Comment 9 felix.Speedmaster 2013-10-28 04:51:30 UTC
When is this getting fixed? We can't release our updates without big changes on our code. All the code worked before. It is possible to give this bug a higher priority?
Comment 10 Zoltan Varga 2013-10-28 09:01:56 UTC
Comment #7 might be a different issues that this one. I don't think the original test case in #2 ever worked, and it's pretty hard to fix.
Comment 11 felix.Speedmaster 2013-10-28 10:55:57 UTC
Added the bug as seperate bug:

Note You need to log in before you can comment on or make changes to this bug.