Bug 38974 - LLVM Incorrectly Compiling Method
Summary: LLVM Incorrectly Compiling Method
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 9.4 (iOS 9.2)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2016-02-21 19:56 UTC by Dillon Buchananq
Modified: 2017-07-26 18:40 UTC (History)
4 users (show)

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 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 Dillon Buchananq 2016-02-21 19:56:26 UTC
Compiling with LLVM enabled is resulting in bad compilation which ultimiately crashes the app. For some reason, an Ad-Hoc deployment, with LLVM enabled, and SDK link only, is causing the JIT compilation of a method, which is explicitly in many code paths:

Feb 21 14:45:45 Dillon-Buchanans-iPhone CodeHubiOS[244] <Warning>: Unhandled managed exception:
	Attempting to JIT compile method 'CodeHub.iOS.DialogElements.RootElement:Reload (CodeHub.iOS.DialogElements.Element)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
	  at CodeHub.iOS.Views.Repositories.RepositoryView.Render () <0x100035308 + 0x0011b> in <filename unknown>:0 
	  at CodeHub.iOS.Views.Repositories.RepositoryView+<ViewDidLoad>c__AnonStorey0.<>m__5 (System.Collections.Generic.List`1 _) <0x1000764ec + 0x0000f> in <filename unknown>:0 
	  at System.Reactive.AnonymousSafeObserver`1[T].OnNext (System.Reactive.T value) <0x100bf9d7c + 0x00033> in <filename unknown>:0 
	  at System.Reactive.Linq.ObservableImpl.Concat`1+_[TSource].OnNext (TSource value) <0x10097b1fc + 0x0003b> in <filename unknown>:0 
	  at System.Reactive.Linq.ObservableImpl.ToObservable`1+_[TSource].LoopRec (System.Reactive.Linq.ObservableImpl.State state, System.Action`1 recurse) <0x1009b653c + 0x00157> in <filename unknown>:0 
	  at System.Reactive.Concurrency.Scheduler+<>c__DisplayClass50`1[TState].<InvokeRec1>b__4d (TState state1) <0x100c00048 + 0x00077> in <filename unknown>:0 
	  at System.Reactive.Concurrency.Scheduler.InvokeRec1[TState] (IScheduler scheduler, Pair`2 pair) <0x100bfdae0 + 0x000e7> in <filename unknown>:0 
	  at (wrapper unknown) System.Object:gsharedvt_out ()
	  at (wrapper delegate-invoke) System.Func`3[System.Reactive.Concurrency.IScheduler,System.Reactive.Concurrency.Scheduler+Pair`2[System.Reactive.Linq.ObservableImpl.ToObservable`1+_+State[System.Collections.Generic.List`1[GitHubSharp.Models.BranchModel]],System.Action`2[System.Reactive.Linq.ObservableImpl.ToObservable`1+_+State[System.Collections.Generic.List`1[GitHubSharp.Models.BranchModel]],System.Action`1[System.Reactive.Linq.ObservableImpl.ToObservable`1+_+State[System.Collections.Generic.List`1[GitHubSharp.Models.BranchModel]]]]],System.IDisposable]:invoke_TResult_T1_T2 (System.Reactive.Concurrency.IScheduler,System.Reactive.Concurrency.Scheduler/Pair`2<System.Reactive.Linq.ObservableImpl.ToObservable`1/_/State<System.Collections.Generic.List`1<GitHubSharp.Models.BranchModel>>, System.Action`2<System.Reactive.Linq.ObservableImpl.ToObservable`1/_/State<System.Collections.Generic.List`1<GitHubSharp.Models.BranchModel>>, System.Action`1<System.Reactive.Linq.ObservableImpl.ToObservable`1/_/State<System.Collections.Generic.List`1<GitHubSharp.Models.BranchModel>>>>>)
	  at (wrapper unknown) System.Object:gsharedvt_in ()
	  at (wrapper unknown) System.Object:gsharedvt_out ()
	  at System.Reactive.Concurrency.ImmediateScheduler.Schedule[TState] (System.Reactive.Concurrency.TState state, System.Func`3 action) <0x100c26b60 + 0x0006f> in <filename unknown>:0 
	  at (wrapper unknown) System.Object:gsharedvt_in ()
	  at System.Reactive.Concurrency.Scheduler.Schedule[TState] (IScheduler scheduler, System.Reactive.Concurrency.TState state, System.Action`2 action) <0x100bfd9cc + 0x000c3> in <filename unknown>:0 
	  at System.Reactive.Linq.ObservableImpl.ToObservable`1+_[TSource].Run () <0x1009b6338 + 0x0016f> in <filename unknown>:0 
	  at System.Reactive.Linq.ObservableImpl.ToObservable`1[TSource].Run (IObserver`1 observer, IDisposable cancel, System.Action`1 setSink) <0x1009b6268 + 0x00073> in <filename unknown>:0 
	  at System.Reactive.Producer`1[TSource].SubscribeRaw (IObserver`1 observer, Boolean enableSafeguard) <0x100c03de0 + 0x0023f> in <filename unknown>:0 
	  at System.ObservableExtensions.SubscribeSafe[T] (IObservable`1 source, IObserver`1 observer) <0x100bf84f8 + 0x000c3> in <filename unknown>:0 
	  at System.Reactive.TailRecursiveSink`1[TSource].MoveNext () <0x1009301bc + 0x0044b> in <filename unknown>:0 
	  at System.Reactive.Concurrency.AsyncLock.Wait (System.Action action) <0x100c1a6a0 + 0x0014b> in <filename unknown>:0
Comment 1 Dillon Buchananq 2016-02-21 19:56:34 UTC
Xamarin Studio
Version 5.10.2 (build 56)
Installation UUID: 40092b7e-459f-4111-aa2e-40816f060767
	Mono 4.2.2 (explicit/996df3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020030

Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Version: (Business Edition)
Android SDK: /Users/dillonb/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.1   (API level 22)

SDK Tools Version: 24.3.3
SDK Platform Tools Version: 22.0.0
SDK Build Tools Version: 22.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Xamarin Android Player
Not Installed

Apple Developer Tools
Xcode 7.2 (9548)
Build 7C68

Version: (Business Edition)
Hash: 962a050
Branch: master
Build date: 2016-01-29 16:59:11-0500

Not Installed

Build Information
Release ID: 510020056
Git revision: bb74ff467c62ded42b7b7ac7fdd2edc60f8647b0
Build date: 2016-01-26 16:24:41-05
Xamarin addins: 8b797d7ba24d5abab226c2cf9fda77f666263f1b
Build lane: monodevelop-lion-cycle6-c6sr1

Operating System
Mac OS X 10.11.1
Darwin Dillons-Mini.cable.rcn.com 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 2 Zoltan Varga 2016-02-22 03:11:37 UTC
Could you attach some kind of testcase which demonstrates the problem ?
Comment 3 Dillon Buchananq 2016-04-03 05:27:34 UTC
I don't have a test case other than my project which it keeps occuring on. https://github.com/thedillonb/CodeHub (https://github.com/thedillonb/CodeHub.git). Why are methods not getting AoT compiled in release builds? How does that happen?
Comment 4 Zoltan Varga 2016-04-03 07:05:46 UTC
-> reopen.
Comment 5 Zoltan Varga 2016-04-04 20:47:07 UTC
How can I reproduce this when running the app ? What device does it happen on ?
Comment 6 John Miller [MSFT] 2017-07-26 18:40:54 UTC
Because we have not received a reply to our request for more information, we are marking this issue as RESOLVED→NORESPONSE. If you are still encountering this issue on the latest Xamarin.iOS, please don’t hesitate to reopen the ticket with the requested information. Thanks!