Roger,

I am 100% Windows:(  I agree with you that it is "99 point lots of
nines percent" my program, not SQLite.  Especially because I added the
SQLITE_DEBUG and it isn't catching anything extra.

I am 99.9% sure the issue is NOT calling close on the db twice, I
wrapped that in a C++ class so the call on close is contained, checks
db for null before closing, and sets to null after the call so it
cannot be called twice.  The only exception is if two threads are
using the same db, but my code always keeps a connection in one
thread.

So, that seems to leave a memory error in my code, which is also very
tough to find.  All the code that is blowing up is within an Apache
Module and I am following the Apache rules very closely.  To top it
off, the code crashes in two different places, two different
open/closes of the database. Which brings up a question I have asked
in the past, but never gotten an answer to:

Through one request from the client, I open and close the database
multiple times.  Since everything is very module, I am taking that
approach with the DB, too:  For authentication it is open/closed, for
the initialization of the request the db is open/closed, for the
processing of the request, the db is opened and closed.  All of these
are using the one and only C++ class to open and close the db.  This
approach allows me to keep all the open's and closes VERY close
together, there might be lots of code that gets called because of a
function call in between, but the function that does the open, does
the close.  This is why I took this approach.  Since there are
different threads access the DB at the same time, could this approach
be causing problems I am unaware of?  Would I be better off switching
over to an approach of: each request opens the DB once and uses the
same connection through the whole request?

Sam
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to