Bug 770 - Catnap LINQ Statements give JIT error
Summary: Catnap LINQ Statements give JIT error
Status: RESOLVED DUPLICATE of bug 587
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 4.x
Hardware: Other Other
: --- major
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-09-12 23:21 UTC by t9mike
Modified: 2011-09-13 09:20 UTC (History)
2 users (show)

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


Attachments
Complete test solution (1.11 MB, application/x-gzip)
2011-09-12 23:21 UTC, t9mike
Details


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 DUPLICATE of bug 587

Description t9mike 2011-09-12 23:21:48 UTC
Created attachment 336 [details]
Complete test solution

This is related to https://bugzilla.novell.com/show_bug.cgi?id=551623.

See attached sample project. The following code causes JIT compile error on device:

Domain.Configure
(
Map.Entity<Person>()
.Table("Users")
.Map(new ValuePropertyMap<Person, string>(x =>
x.FirstName))
.Map(new ValuePropertyMap<Person, string>(x =>
x.LastName)),
Map.Entity<Forum>()
.Map(new ValuePropertyMap<Forum, string>(x => x.Name))
.Map(new ListPropertyMap<Forum, Post>(x => x.Posts, true)),
Map.Entity<Post>()
.ParentColumn("ForumId")
.Map(new ValuePropertyMap<Post, string>(x => x.Title))
.Map(new ValuePropertyMap<Post, string>(x => x.Body))
.Map(new BelongsToPropertyMap<Post, Person>(x => x.Poster,
"PosterId"))
);

The error I get is:

Attempting to JIT compile method
System.Linq.Expressions.ParameterExpression:.ctor(System.Type,string)'
while running with --aot-only
at System.Linq.Expressions.Expression.Parameter(System.Type type,
System.String name)

This is with MonoTouch 4.2 and MonoDevelop 2.8.
Comment 1 Sebastien Pouliot 2011-09-13 09:20:25 UTC
If I set the project to "Link SDK assemblies" (which is the default* for device builds) then the problem disappear (but I had another exception later wrt to the sqlite database).

* you should always use "Link SDK assemblies" for device builds. It makes
smaller application and it makes the AOT compilation faster (faster enough so
you'll likely build faster when linking).

*** This bug has been marked as a duplicate of bug 587 ***