We have been using SQLite3 for a while now without issues. We are 
running a EXE calling a DLL (Which calls a DLL which eventually uses 
the SQLite functions)

These two DLL's are both written in Delphi - in Windows (with a 
delphi wrapper that runs the SQLite DLL)

This code has worked fine under fairly nasty conditions for a LONG 
time.

Recently we tried to tie in with a third party program that calls one 
of our DLL's (which access the SQLite3 DB and returns a data set)
[Note: We eventually started a fresh project for this DLL, so there 
was less of a chance legacy code was the issue]

We don't control the EXE that calls our DLL, basically we export a 
couple of functions determined by the third party. The EXE that calls 
our DLL is written in C++

Now the issue is, randomly, but ALWAYS within a few dozen calls, the 
function sqlite3_step access violates.The first 10 calls 
(sqlite3_prepare -> sqlite3_step -> sqlite3_finalise basically) work 
fine, then maybe the 11th sqlite3_step AV's

It can be the first, or the 40th but is guarenteed.

We tried using sqlite3_get_table and it does the same thing, same 
sort of AV

We tore out any SQLite3 code but kept every other line of code, 
returning some made up garbage data. The code worked fine without any 
SQlite3 calls, it seems entirely located in sqlite3_step or any call 
that uses it...

Now having used SQLite3 for a while, I'm not convinced the issue is 
in the SQLite3 dll, but maybe the pointer populated by 
sqlite3_prepare is being trashed by one of the various parties... 

Has anyone had issues like this before? Or any ideas as to what we 
can try next?

Reply via email to