View Ticket
Not logged in
Ticket Hash: eba55ae574a05ba8e49bb37ed185737cae139f2c
Title: 64 bit Windows extension causes crash when closing dataset
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2016-11-26 08:33:20
Version Found In: 3.0.1
Description:
I've been having a problem with the x64 extension (ie 'libspatialite-2.dll') when closing a dataset through the .NET provider for SQLite. I managed to compile the native sqlite.exe as 64 bit, and get the same problem when closing the connection to the database when I've got the spatialite extension loaded.

Basically, I start sqlite.exe, call "SELECT load_extension('libspatialite-2.dll')", then .quit. This causes a fatal error. Not being a C developer, I'm not sure how to debug this further.


bradh added on 2012-02-20 20:16:46 UTC:
Thanks for the report.

To make sure we're working on the same problem, can you tell me which download you used (i.e. the URL you got the spatialite-2.dll from)?


anonymous added on 2012-02-26 22:41:52 UTC:
http://www.gaia-gis.it/gaia-sins/windows-bin-amd64/spatialite-3.0.1-DLL-win-amd64.zip

Cheers,

Ross


bradh added on 2012-02-27 07:22:24 UTC:
I don't have a pure sqlite binary built for amd64, but using the spatialite command line tool (http://www.gaia-gis.it/gaia-sins/windows-bin-amd64/spatialite-3.0.0-stable-win-amd64.zip) it works OK.

Does that application work for you?

I understand that this isn't the problem you're trying to resolve, but I'm not sure where the problem could be, and this might provide some insight.

Also, which version(s) of sqlite3 are you building / using with .NET?


anonymous added on 2012-03-01 01:53:13 UTC:
Yes, the 64bit spatialite EXE does work fine. I compiled the 64bit sqlite EXE myself as a test to see whether this was a problem with the .NET component or SQLite code.

I'm using the latest .NET SQLite (1.0.79.0), which I think is linked against the latest native SQLite (3.7.10).

I can provide the x64 EXE that I compiled if required.

Cheers,

Ross


anonymous added on 2013-01-25 20:54:18 UTC:
I can confirm on win32 XP, libspatialite-2.dll from the same place. I upgraded to 4.0.0 and it was fixed. Snooping around, it seems that mixing of sqlite3_malloc/free() and malloc()/free() may be the culprit:

http://comments.gmane.org/gmane.comp.db.sqlite.general/74935

User Comments:
anonymous added on 2016-05-16 08:48:46:
If the issue has been fixed already in version 4.0.0, wouldn't it be time to close the ticket as fixed?

sandro added on 2016-07-30 09:47:48:
this bug seems to be definitely fixed in more recent versions.