Bug 53811 - "Code supposed to be unreachable" (System.InvalidOperationException) on Xamarin iOS
Summary: "Code supposed to be unreachable" (System.InvalidOperationException) on Xamar...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 10.8 (d15-1)
Hardware: Macintosh Other
: --- normal
Target Milestone: 15.2
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-03-22 22:20 UTC by Sean Fisher
Modified: 2017-05-18 14:57 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 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:
Status:
RESOLVED FIXED

Description Sean Fisher 2017-03-22 22:20:10 UTC
I reported this on the Automapper issues page (https://github.com/AutoMapper/AutoMapper/issues/2011) and they recommended I open a bug here.

Compiling an AutoMapper configuration's lambda expression after upgrading to AutoMapper 5 or 6 in Xamarin iOS throws a "Code supposed to be unreachable" (System.InvalidOperationException).

Versions:

=== Xamarin Studio Enterprise ===

Version 6.3 (build 834)
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/8f6d0f6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000520

=== NuGet ===

Version: 3.5.0.0

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: 10.8.0.20 (Xamarin Enterprise)
Hash: f94cf26
Branch: d15-1
Build date: 2017-03-14 12:37:51-0400


I tried creating a smaller project with just the following files, but I wasn't able to reproduce the issue. Here's a simplified project layout:

**SharedProject (PCL profile 111)**
*Model.cs*

    public abstract class Model: IModel
    {
        Guid Id {get; set;}
        // ... Other basic properties of types Guid, Guid?, bool, byte[], string, DateTimeOffset?
    }

*Dto.cs*

    public abstract class Dto: IDto
    {
        string Id {get; set;}
        // ... Other properties with types string, DateTimeOffset?, byte[], bool, and Dictionary<string, object>
    }

*SharedMapperConfig.cs*

    public class SharedMapperConfig : Profile
    {
        public SharedMapperConfig()
        {
            CreateMap<Model, Dto>()
                // Ignore some of the properties
                .ForMember(d => d.Tenant, opt => opt.Ignore())
                .ForMember(d => d.CreatedByUserName, opt => opt.Ignore())
                .ForMember(d => d.ModifiedByUserName, opt => opt.Ignore())
                .ForMember(d => d.Extension, opt => opt.Ignore())
                ;
        }
    }

iOS Native Xamarin project (references SharedProject)
*Main.cs*

    static void Main(string[] args)
    {
        AutoMapper.Mapper.Initialize(cfg =>
        {
            cfg.AddProfile<SharedMapperConfig>();
        });

        var c = AutoMapper.Mapper.Configuration;
        c.CompileMappings();
    }

On the `c.CompileMappings();` call (also happens when trying to use the map), I get the following error/stack trace:

    
> 2017-03-17 11:42:47.220 MyProjectiOS[69862:1260074] Unhandled managed exception:
> The type initializer for 'iOS.App.Application' threw an exception. (System.TypeInitializationException)
> (null)
>     --- inner exception ---
> Code supposed to be unreachable (System.InvalidOperationException)
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileReducibleExpression (System.Linq.Expressions.Expression expr) [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1585 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x004ea] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1721 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileIndexAssignment (System.Linq.Expressions.BinaryExpression node, System.Boolean asVoid) [0x00047] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:452 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAssignBinaryExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00041] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:524 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00059] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1602 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1591 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:379 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1606 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockStart (System.Linq.Expressions.BlockExpression node) [0x000b0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:405 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00007] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:376 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1606 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1591 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileConditionalExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00071] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:828 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x001d2] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1644 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00085] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1620 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileLoopExpression (System.Linq.Expressions.Expression expr) [0x00064] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:856 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x00469] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1694 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00085] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1620 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1591 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:379 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1606 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockStart (System.Linq.Expressions.BlockExpression node) [0x000b0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:405 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00007] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:376 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x003d0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1683 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1593 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileConditionalExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x000b7] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:834 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x001d2] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1644 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileVariableAssignment (System.Linq.Expressions.BinaryExpression node, System.Boolean asVoid) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:513 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAssignBinaryExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x0005b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:533 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00059] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1602 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockStart (System.Linq.Expressions.BlockExpression node) [0x000b0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:405 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00007] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:376 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1606 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1591 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:379 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1606 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1591 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:379 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x003d0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1683 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileTryExpression (System.Linq.Expressions.Expression expr) [0x0005a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1159 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x004a2] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1697 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileAsVoid (System.Linq.Expressions.Expression expr) [0x00085] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1620 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockStart (System.Linq.Expressions.BlockExpression node) [0x000b0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:405 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00007] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:376 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x003d0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1683 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1593 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileConditionalExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x000b7] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:834 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x001d2] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1644 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1593 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileBlockExpression (System.Linq.Expressions.Expression expr, System.Boolean asVoid) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:379 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x003d0] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1683 
>     at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729 
>     at Microsoft.Scripting.Interpreter.LightCompiler.CompileTop (System.Linq.Expressions.LambdaExpression node) [0x00055] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:221 
>     at Microsoft.Scripting.Generation.CompilerHelpers.LightCompile (System.Linq.Expressions.LambdaExpression lambda) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Generation/CompilerHelpers.cs:619 
>     at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression lambda, System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/System.Core/System.Linq.Expressions.Interpret/LambdaCompiler.cs:41 
>     at System.Linq.Expressions.LambdaExpression.Compile () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs:127 
>     at AutoMapper.MapperConfiguration+MapperFuncs..ctor (AutoMapper.MapRequest mapRequest, System.Linq.Expressions.LambdaExpression typedExpression) [0x00014] in <9d31ff1ce9684892a94fa57ea76dd5aa>:0 
>     at AutoMapper.MapperConfiguration.CreateMapperFuncs (AutoMapper.MapRequest mapRequest) [0x00008] in <9d31ff1ce9684892a94fa57ea76dd5aa>:0 
>     at (wrapper delegate-invoke) System.Func`2[AutoMapper.MapRequest,AutoMapper.MapperConfiguration+MapperFuncs]:invoke_TResult_T (AutoMapper.MapRequest)
>     at AutoMapper.LockingConcurrentDictionary`2+<>c__DisplayClass2_1[TKey,TValue].<.ctor>b__1 () [0x00000] in <9d31ff1ce9684892a94fa57ea76dd5aa>:0 
>     at (wrapper delegate-invoke) System.Func`1[AutoMapper.MapperConfiguration+MapperFuncs]:invoke_TResult ()
>     at System.Lazy`1[T].CreateValue () [0x00075] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.128/src/mono/mcs/class/referencesource/mscorlib/system/Lazy.cs:437 
> 2017-03-17 11:42:47.221 MyProjectiOS[69862:1260074] critical: Stacktrace:
> 
> 2017-03-17 11:42:47.221 MyProjectiOS[69862:1260074] critical: 
> Native stacktrace:
> 
> 2017-03-17 11:42:47.222 MyProjectiOS[69862:1260074] critical: 	0   MyProjectiOS                  0x0029fa4d mono_handle_native_sigsegv + 317
> 2017-03-17 11:42:47.222 MyProjectiOS[69862:1260074] critical: 	1   MyProjectiOS                  0x002a9af1 sigabrt_signal_handler + 161
> 2017-03-17 11:42:47.222 MyProjectiOS[69862:1260074] critical: 	2   libsystem_platform.dylib            0x0c8a6ebb _sigtramp + 43
> 2017-03-17 11:42:47.222 MyProjectiOS[69862:1260074] critical: 	3   ???                                 0xffffffff 0x0 + 4294967295
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	4   libsystem_c.dylib                   0x0c61b11f abort + 141
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	5   MyProjectiOS                  0x0047eb50 _ZL20print_all_exceptionsP10MonoObject + 0
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	6   MyProjectiOS                  0x0031fc8b mono_invoke_unhandled_exception_hook + 139
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	7   MyProjectiOS                  0x00227d9e mono_jit_exec + 350
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	8   MyProjectiOS                  0x0048cf14 xamarin_main + 3380
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	9   MyProjectiOS                  0x00524031 main + 113
> 2017-03-17 11:42:47.223 MyProjectiOS[69862:1260074] critical: 	10  libdyld.dylib                       0x0c575799 start + 1
> 2017-03-17 11:42:47.224 MyProjectiOS[69862:1260074] critical: 
> =================================================================
> Got a SIGABRT while executing native code. This usually indicates
> a fatal error in the mono runtime or one of the native libraries 
> used by your application.
> =================================================================
Comment 1 Marek Safar 2017-03-23 10:18:15 UTC
It should be fixed in dev 15.2
Comment 2 Alok Kulkarni 2017-05-09 10:15:41 UTC
Hi @Sean Fisher, It will be great if you can provide steps to verify this bug.
Comment 3 Sean Fisher 2017-05-18 14:57:32 UTC
I tried the latest version of Xamarin Studio with my code and it seems to have resolved the issue. I would say we can mark this as verified. I'm sorry I can't provide good repro steps!