Do you want to request a feature or report a bug?
bug
What is the current behavior?
I create a simple test project with share code and iOS UI. I try to use reactiveUI (v7) command to test binding.
It can run on Simulator. But whenever I compile and run on real iOS device. It crashes.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
You can get the source code here: TestReactiveUI.zip
What is the expected behavior?
Error log is below:
System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) System.Func
3<System.Reactive.Concurrency.IScheduler, System.Reactive.Concurrency.Scheduler/Pair21/_/State<bool>, System.Action2 1/_/State<bool>, System.Action1 1/_/State<bool>>>>, System.IDisposable>:invoke_TResult_T1_T2 (System.Reactive.Concurrency.IScheduler,System.Reactive.Concurrency.Scheduler/Pair2 1/_/State<bool>, System.Action2 1/_/State<bool>, System.Action1 >>>)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at (wrapper unknown) System.Object:gsharedvt_out ()
at System.Reactive.Concurrency.ImmediateScheduler.Schedule[TState] (TState state, System.Func3[T1,T2,TResult] action) [0x00014] in <ab76b1b1678341d69f8fc2c1f68d0bf5>:0 at at (wrapper unknown) System.Object:gsharedvt_in () at System.Reactive.Concurrency.Scheduler.Schedule[TState] (System.Reactive.Concurrency.IScheduler scheduler, TState state, System.Action2[T1,T2] action) [0x00042] in:0
at at (wrapper unknown) System.Object:gsharedvt_out ()
at System.Reactive.Linq.ObservableImpl.ToObservable1+_[TSource].Run () [0x0007f] in <d0067ed104ac455987b6feb85f80156b>:0 at at (wrapper unknown) System.Object:gsharedvt_in () at at (wrapper unknown) System.Object:gsharedvt_out () at System.Reactive.Linq.ObservableImpl.ToObservable1[TSource].Run (System.IObserver1[T] observer, System.IDisposable cancel, System.Action1[T] setSink) [0x00010] in:0
at System.Reactive.Producer1[TSource].SubscribeRaw (System.IObserver1[T] observer, System.Boolean enableSafeguard) [0x00083] in:0
at at (wrapper unknown) System.Object:gsharedvt_out ()
at System.ObservableExtensions.SubscribeSafe[T] (System.IObservable1[T] source, System.IObserver1[T] observer) [0x00036] in:0
at at (wrapper unknown) System.Object:gsharedvt_in ()
at at (wrapper unknown) System.Object:gsharedvt_out ()
at System.Reactive.TailRecursiveSink`1[TSource].MoveNext () [0x00197] in:0
at System.Reactive.Concurrency.AsyncLock.Wait (System.Action action) [0x000a2] in:0
What is the motivation / use case for changing the behavior?
The code should work on real iOS device.
Which versions of ReactiveUI, and which platform / OS are affected by this issue? Did this work in previous versions of ReativeUI? Please also test with the latest stable and snapshot (http://docs.reactiveui.net/en/contributing/snapshot/index.html) versions.
Xamarin Studio Community
Version 6.1.2 (build 44)
MacOS - Sierra 10.12.1
Test device: iPad iOS 10.1.1
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I read and tried all suggestion on the web related to "Attempting to JIT compile method". All of them are failed.
If anyone has any suggestion please share with me. Thanks you a lot. I love this framework :)
@phamhieu thanks for getting in touch.
I've just tried your project on my iPad and it worked as expected.
My setup is different though as I use VS on Windows (connected to a Mac mini).
What Xamarin channel are you on? Latest stable?
Yes I'm on stable channel. Below is my Xamarin version in detail.
FYI: I also try to use VS for Mac Preview 2 to build the project. It still fails on real device.
Thanks so much for your info. I will try to setup VS on Windows and give it a try.
_Xamarin Studio Community
Version 6.1.2 (build 44)
Installation UUID: 0d020193-a554-4362-9e93-5708a5135f4e
Runtime:
Mono 4.8.0 (mono-4.8.0-branch/f5fbc32) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 408000344
NuGet
Version: 3.4.3.0_
_Xamarin.Profiler
Not Installed_
_Apple Developer Tools
Xcode 8.1 (11544)
Build 8B62_
_Xamarin.Mac
Version: 3.0.0.290 (Xamarin Studio Community)_
_Xamarin.iOS
Version: 10.4.0.20 (Xamarin Studio Community)
Hash: 62816dd
Branch: master
Build date: 2016-11-15 06:24:02-0500_
_Xamarin Inspector
Version: 1.0.0.0
Hash: 1f3067d
Branch: master
Build date: 11/16/2016 5:13:59 AM_
_Build Information
Release ID: 601020044
Git revision: 0ccfcd52b95305ebd5b7eca0d88c1017035910ae
Build date: 2016-10-28 15:12:43-04
Xamarin addins: a39a869d8a78d87bdc6775f696c13a4cc9024501
Build lane: monodevelop-lion-cycle8_
_Operating System
Mac OS X 10.12.1
Darwin Phams-MacBook-Pro.local 16.1.0 Darwin Kernel Version 16.1.0
Thu Oct 13 21:26:57 PDT 2016
root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64_
_Enabled user installed addins
EMDK for Xamarin 2.1.1.1
Xamarin Inspector 1.0.0.0_
I'm having the same issue, still trying to figure out what is causing this.
Have you solved this @phamhieu ?
After updating my Xcode to 8.2 and Xamarin as the log bellow shows, it's all working now.
Two different projects, both had the same problem, both solved now.
`Xamarin Studio Community
Version 6.1.2 (build 44)
Installation UUID: 6d7f9291-aad8-4a9d-933b-26af792e3ad4
Runtime:
Mono 4.6.2 (mono-4.6.0-branch/08fd525) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 406020007
NuGet
Version: 3.4.3.0
Xamarin.Profiler
Version: 1.0.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Xamarin.Android
Version: 7.0.2.37 (Xamarin Studio Community)
Android SDK: /Users/giusepecasagrande/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.1 (API level 16)
4.4 (API level 19)
5.0 (API level 21)
6.0 (API level 23)
7.0 (API level 24)
SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 24.0.2
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Xamarin Android Player
Not Installed
Apple Developer Tools
Xcode 8.2 (11766)
Build 8C38
Xamarin.Mac
Version: 2.10.0.113 (Xamarin Studio Community)
Xamarin.iOS
Version: 10.3.0.0 (Xamarin Studio Community)
Hash: e02d272
Branch: xcode8.2
Build date: 2016-12-12 23:00:41-0500
Xamarin Inspector
Version: 1.0.0.0
Hash: 1f3067d
Branch: master
Build date: 11/15/2016 7:13:59 PM
Build Information
Release ID: 601020044
Git revision: 0ccfcd52b95305ebd5b7eca0d88c1017035910ae
Build date: 2016-10-28 15:12:43-04
Xamarin addins: a39a869d8a78d87bdc6775f696c13a4cc9024501
Build lane: monodevelop-lion-cycle8
Operating System
Mac OS X 10.12.2
Darwin JARVIS 16.3.0 Darwin Kernel Version 16.3.0
Thu Nov 17 20:23:58 PST 2016
root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
Enabled user installed addins
MFractor 2.06.00
NuGet Package Management Extensions 0.11.1
Xamarin Inspector 1.0.0.0
XamlStyler 1.0.3
`
@GiusepeCasagrande Thanks for your advice. Confirm that updating Xcode to 8.2 and Xamarin Studio fixes the build problem for iOS.
=== Xamarin Studio Community ===
Version 6.1.2 (build 44)
Installation UUID: 0d020193-a554-4362-9e93-5708a5135f4e
Runtime:
Mono 4.8.0 (mono-4.8.0-branch/aca1492) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 408000382
=== NuGet ===
Version: 3.4.3.0
=== Xamarin.Profiler ===
Not Installed
=== Apple Developer Tools ===
Xcode 8.2.1 (11766.1)
Build 8C1002
=== Xamarin.Mac ===
Version: 2.10.0.113 (Xamarin Studio Community)
=== Xamarin.iOS ===
Version: 10.3.0.0 (Xamarin Studio Community)
Hash: e02d272
Branch: xcode8.2
Build date: 2016-12-12 23:00:41-0500
=== Xamarin.Android ===
Version: 7.0.2.37 (Xamarin Studio Community)
Android SDK: /Users/phamhieu/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.0 (API level 21)
6.0 (API level 23)
SDK Tools Version: 25.2.2
SDK Platform Tools Version: 25.0.0
SDK Build Tools Version: 25.0.0
Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin Android Player ===
Not Installed
=== Xamarin Inspector ===
Version: 1.0.0.0
Hash: 1f3067d
Branch: master
Build date: 11/16/2016 5:13:59 AM
=== Build Information ===
Release ID: 601020044
Git revision: 0ccfcd52b95305ebd5b7eca0d88c1017035910ae
Build date: 2016-10-28 15:12:43-04
Xamarin addins: a39a869d8a78d87bdc6775f696c13a4cc9024501
Build lane: monodevelop-lion-cycle8
=== Operating System ===
Mac OS X 10.12.2
Darwin Phams-MacBook-Pro.local 16.3.0 Darwin Kernel Version 16.3.0
Thu Nov 17 20:23:58 PST 2016
root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
EMDK for Xamarin 2.2.0.7
Xamarin Inspector 1.0.0.0