dlang-community / d2sqlite3

A small wrapper around SQLite for the D programming language
Boost Software License 1.0
75 stars 26 forks source link

Crash in unittest on db.execute("DROP TABLE test"), Windows x86, sqlite 3.10.0 #22

Open MrSmith33 opened 8 years ago

MrSmith33 commented 8 years ago

Crash occurs on these lines: https://github.com/biozic/d2sqlite3/blob/master/source/d2sqlite3.d#L934 https://github.com/biozic/d2sqlite3/blob/master/source/d2sqlite3.d#L940

Crashes with and without assertThrown Happens with master and 0.8.1.

biozic commented 8 years ago

I managed to have access to a Windows setup. I could reproduce the crash using the precompiled sqlite3 DLL from the sqlite website. But then I built it from the amalgamation source, and there were no problems. Maybe you could check that yourself as well.

DMD 2.069.2 (-m32mscoff)

MrSmith33 commented 8 years ago

I compiled it myself "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" && cl /O2 /Isqlite3.h /D_USRDLL /D_WINDLL sqlite3.c /LD /Fesqlite3.dll /link then coffimplib.exe sqlite3.lib -f and used resulting .lib and .dll files.

But it works with 64bit version (used static lib here) 32bit version without -m32mscoff

Can you give your sc.ini for -m32mscoff?

biozic commented 8 years ago

I guess the sc.ini file is the default one, because I just downloaded DMD from the website and compiled. Actually, I linked my home-built sqlite3 statically, not as a DLL. If it's ok with static libs but not with DLLs, I'm afraid it's beyond my knowledge of the Windows toolchain...