Skip to content
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

It seems that the 2.0.3 version of SQLitePCLRaw.bundle_winsqlite3 will cause UWP to fail to activate in Release mode #346

Closed
zhuxb711 opened this issue May 21, 2020 · 6 comments

Comments

@zhuxb711
Copy link

If I use version 2.0.2 of SQLitePCLRaw.bundle_winsqlite3, it works fine.

If you use version 2.0.3, it will cause UWP to fail to activate normally at startup

@ericsink
Copy link
Owner

Hmmm.

My first guess is that winsqlite3 doesn't support sqlite3_stmt_isexplain, which was introduced in SQLite 3.28.0

@Shad0wlife
Copy link

Can confirm, version 2.0.3 causes .NET Native builds to throw a 0xc0000139 entry point not found error. 2.0.2 works fine.

@zhuxb711
Copy link
Author

zhuxb711 commented Jun 8, 2020

@Shad0wlife Do you have a sample program that can reproduce this problem ?

@Shad0wlife
Copy link

Setting up a repo for this would be way overkill already.
This is what you need to do to reproduce the issue:

  1. Create a new UWP Project with min version Fall Creators Update 16299 (to enable .NET Standard compatibility)
  2. add SQLitePCLRaw.bundle_winsqlite3 via NuGet
  3. try to run the project in a configuration with the .NET Native Toolchain enabled (eg. a Release-Build with default settings) will cause the program start to fail. The 0xc0000139 error can then be seen in the program output window
  4. for reference, disable the .Net Native Toolchain in the build settings for the release build (or just use a debug build), the program will start fine

Hope this helps!

@Shad0wlife
Copy link

Just a follow up because I recently looked into the cause for thi issue again:

I'm currently on Win10 1809 for compatibility reasons, and the winsqlite3.dll is of version 3.23.2 (according to file details).
The "sqlite3_stmt_isexplain" function was only added in v3.28.0, so that's the reason it is not available in winsqlite. Bundled e_sqlite obviously doesn't have this problem, since it does not depend on Win10's sqlite.

So basically what I'm saying is: this issue was caused by Win10 having an outdated version of sqlite included (at least in older versions), so newer builds of Windows may have this issue fixed by default.

@ericsink ericsink mentioned this issue Aug 13, 2020
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

3 participants