So, I'm in the habit of creating and solving my own problems. The problem was a double open on the same db. The same thread opened the same DB, AND using the same pointer/handle, so sqlite3_open was called twice on the same pointer. Removing the double open seems to have fixed the problem.
Perhaps there should be a safety check for this? If you want me to file a feature request, I can do so, and create some code to reproduce the crash. Cheers, Jonathan Jonathan Hendler wrote: > Wishing all a joyous and prosperous 2008 - filled with happy coding and > happy clients/customers/bosses/families. > > Cheers... > > > Now a question. :) > > I have 3 different database handles running in the same thread. One of > them is ":memory:". > I send an update statement to one and the program crashes. > > Of note: > - SQLite is compiled into the program, I'm not using the dynamic lib. > - it's compiled within an extern of a GNU c++ compiler on OSX. I mark > my sqlite wrappers in extern. > - I am not running multiple threads, but I do have threadsafe enabled > via sqlite3_threadsafe(); > > Running my program from within GDB. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x3a676e69 > 0x90001408 in pthread_mutex_lock () > (gdb) bt > #0 0x90001408 in pthread_mutex_lock () > #1 0x0002eef5 in sqlite3_mutex_enter (p=0x3a676e69) at > ../../src/ext/sqlite/src/mutex_unix.c:186 > #2 0x0002dd03 in sqlite3_exec (db=0x1472dc, zSql=0x59b7358 "UPDATE > words SET count = count+1 WHERE wid=999", xCallback=0, pArg=0x0, > pzErrMsg=0xbffff2ac) at ../../src/ext/sqlite/src/legacy.c: > > I would expect, (if I understand potential problems), that I would get > a return int != SQLITE_OK , with a BUSY or something. > > What could all this mean? > > (I know this may not be enough information, but please let me know I > could provide more.) > > > PRAGMA default_cache_size= 23000 > PRAGMA fullfsync= 0 > PRAGMA synchronous= 2 > PRAGMA locking_mode= normal > PRAGMA integrity_check= ok > PRAGMA vdbe_listing = ON > > > - Jonathan > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------