SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

SQLitePCLRaw.bundle_winsqllite3 cases a UWP ARM64 app to fail to start

Open GaryCaldwell opened this issue 3 years ago • 9 comments

The app fails to start with the error 'The program '[15380] SQLLiteTestApp.exe' has exited with code 3221225785 (0xc0000139) 'Entry Point Not Found'. The e_sqlite3 bundle seems to at least load.

GaryCaldwell avatar Aug 18 '22 00:08 GaryCaldwell

Can you post a minimal repro sample project?

ericsink avatar Aug 22 '22 17:08 ericsink

SQLLiteArmSample.zip

Here you go, I left x64 and Arm64 in the sample. All you have to do is use remote debugger on an Arm64 device and deploy the Arm64 Debug build to it. It will fail to start with the error above. x64 works fine. No code other than a Blank UWP sample auto generated from VS and the inclusion of the latest stable build of your package from Nuget

GaryCaldwell avatar Aug 24 '22 00:08 GaryCaldwell

Hmmm. Sorry for the slow response on this one.

Yeah, the repro is pretty simple.

I don't have an ARM device for testing, so I'm just looking for things that might be wrong.

The repro sample doesn't even call SQLitePCL to initialize it. Are we sure the error is coming from SQLitePCLRaw? Do you have the full error message?

So, er, Windows on ARM does have a SQLite library, right?

ericsink avatar Aug 31 '22 18:08 ericsink

Let me see if I can get an Arm device setup for you to access remotely. No promises

"Are you sure....", Never sure but if I remove that package on arm64 the app starts successfully.

Yes there is a winsqlite3.dll in Windows on ARM. Here is a directory listing of c:\windows

image

One other thing of note is if I build for x64 and deploy that to the Arm device it runs. I even added the sample database creation code from your wiki that creates an in memory db and creates a table. And it runs

Gary

GaryCaldwell avatar Sep 01 '22 00:09 GaryCaldwell

OK. One theory is that even if the SQLitePCLRaw code is not called, the assembly is being loaded, and it is trying to resolve DllImports, and one of them is not found, thus resulting in the entry point not found error.

BTW, that exception. Did it give the name of the entry point which was not found?

The most likely cause for this would be an older version of SQLite.

Would it be possible for you to figure what version of SQLite is used in winsqlite3.dll ?

ericsink avatar Sep 01 '22 00:09 ericsink

@ericsink I have a remote Arm64 machine ready for you to remotely connect to and debug. Please send me a message at [email protected] and I can share connection information.

GaryCaldwell avatar Sep 05 '22 19:09 GaryCaldwell

@GaryCaldwell Before we do that, please address the questions I asked in the previous comment.

ericsink avatar Sep 05 '22 20:09 ericsink

@ericsink, The name of the entry point is not listed that I can see. The fileversion for winsqlite3.dll is 3.34.1. Same as my x64 Win11 box. Does that help?

hypermoose avatar Sep 05 '22 21:09 hypermoose

Humph. It would've been MORE helpful if the version on ARM was different.

This still feels like an attempt to load an entry point that got introduced after 3.34. But the fact that it only happens on ARM doesn't fit very well with that theory.

I need to know the name of the missing entry point. I'll get back to you about setting up the remote thing.

ericsink avatar Sep 05 '22 23:09 ericsink