Bug 13770 - JIT Exception raising PropertyChanged
Summary: JIT Exception raising PropertyChanged
Status: ASSIGNED
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
URL:
Depends on:
Blocks:
 
Reported: 2013-08-06 00:03 UTC by jacobf
Modified: 2013-10-28 10:55 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 for Bug 13770 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
ASSIGNED

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
Runtime:
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (2.12.0.0)
	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: 6.4.1.1 (Business Edition)
Hash: 5a0fe54
Branch: 
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.
Tdsi.RtCloudApp.CanHandlePropertyChangesExtensions:HandlePropertyChangedFromEventThread
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:
https://bugzilla.xamarin.com/show_bug.cgi?id=15744