Skip to content

System.ExecutionEngineException: Attempting to JIT compile method 'string SQLite.SQLite3:ColumnString (SQLitePCL.sqlite3_stmt,int)' while running in aot-only mode #870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
suihanhbr opened this issue Sep 12, 2019 · 4 comments

Comments

@suihanhbr
Copy link

I get the error on Xamarin.iOS.

System.ExecutionEngineException: Attempting to JIT compile method 'string SQLite.SQLite3:ColumnString (SQLitePCL.sqlite3_stmt,int)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

at SQLite.SQLiteCommand.ReadCol (SQLitePCL.sqlite3_stmt stmt, System.Int32 index, SQLite.SQLite3+ColType type, System.Type clrType) [0x0001c] in :0
at SQLite.SQLiteCommand.ExecuteScalar[T] () [0x00051] in :0
at SQLite.SQLiteConnection.ExecuteScalar[T] (System.String query, System.Object[] args) [0x00039] in :0
at SQLite.SQLiteConnection..ctor (System.String databasePath, SQLite.SQLiteOpenFlags openFlags, System.Boolean storeDateTimeAsTicks, System.Object key) [0x00119] in :0

the sqlite-net-pcl version is 1.5.231.
image

There is my IDE information.

=== Visual Studio Community 2019 for Mac (Preview) ===

Version 8.3 Preview (8.3 build 1583)
Installation UUID: 4e60959a-758f-48ce-ae6d-26e15276ea83
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.16.1.17 (d16-3 / f9d8e0d4)

Package version: 604000179

=== Mono Framework MDK ===

Runtime:
Mono 6.4.0.179 (2019-06/3608a495413) (64-bit)
Package version: 604000179

=== NuGet ===

Version: 5.3.0.6192

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.0.0-preview5-27626-15
3.0.0-preview-27324-5
2.1.8
2.1.7
2.1.2
2.1.1
2.0.5
2.0.0
1.1.1
1.0.4
SDK: /usr/local/share/dotnet/sdk/3.0.100-preview5-011568/Sdks
SDK Versions:
3.0.100-preview5-011568
3.0.100-preview-010184
2.1.504
2.1.503
2.1.302
2.1.301
2.1.4
2.0.0
1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 10.3 (14492.2)
Build 10G8

=== Xamarin.Mac ===

Version: 5.16.1.17 (Visual Studio Community)
Hash: f9d8e0d4
Branch: d16-3
Build date: 2019-08-22 22:56:42-0400

=== Xamarin.iOS ===

Version: 12.16.1.17 (Visual Studio Community)
Hash: f9d8e0d4
Branch: d16-3
Build date: 2019-08-22 22:56:43-0400

=== Xamarin Designer ===

Version: 16.3.0.178
Hash: 725c87d57
Branch: remotes/origin/d16-3
Build date: 2019-08-29 22:57:50 UTC

=== Xamarin.Android ===

Version: 10.0.0.40 (Visual Studio Community)
Commit: xamarin-android/d16-3/080eaac
Android SDK: /Users/huangboru/myfile/sdk
Supported Android versions:
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.2
SDK Build Tools Version: 29.0.2

Build Information:
Mono: mono/mono@6434153d8b7
Java.Interop: xamarin/java.interop/d16-3@5836f58
LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/huangboru/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 1.4.0.64
Hash: f70cfd2
Branch: remotes/origin/d16-3
Build date: 2019-09-02 17:32:00 UTC

=== Android Device Manager ===

Version: 1.2.0.112
Hash: 791e68e
Branch: remotes/origin/d16-3
Build date: 2019-09-02 17:32:26 UTC

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 803001583
Git revision: c561487480e8ff4ce3db0ba3de1ed8d90abb6560
Build date: 2019-09-06 16:09:21+00
Build branch: release-8.3-prebiew3.1
Xamarin extensions: db1b28a18b579d2965e64fa18229338a49f3db56

=== Operating System ===

Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
Tue Aug 20 16:57:14 PDT 2019
root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

@duraz0rz
Copy link

Do you have a code snippet?

@VaslD
Copy link

VaslD commented Sep 18, 2019

Late to the party but I think it's because you're using 2.0 version of SQLitePCLRaw (and dependencies).

SQLitePCLRaw 2.0 made significant changes (dependencies, library structure, even dropped a few older platforms) and is not compatible with version 1.5.x of SQLite-Net. I don't know if any pre-release SQLite-Net has support for SQLitePCLRaw 2.0. There is another issue #865 open for that.

Not saying this is definitely the cause because the exception was kinda generic. But try to downgrade all those SQLitePCLRaw libraries and see if it helps.

@JKennedy24
Copy link

Does this commit:

7d6359d

Mean this issue is resolved and that this library now supports Sqlite 2.0

Release notes seem a bit vague

@JKennedy24
Copy link

actually by the looks of it, the above commit looks like it was commited after todays nuget release

v1.6.292...master

So I don't think the nuget supports sqlite 2.0 yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants