I'm currently trying to write an app for the compact framework (3.5) using an sqlite database in c#. The application is occasionally throwing up odd Access Violation errors, crashing the application. Getting precious little from the crash dumps produced but from experimentation it seems that the error occurs when the background thread accesses the database while the foreground thread switches between forms. (Increasing the speed of the background thread and continually opening and closing forms in the foreground make the crash more frequent). Does anyone know of any issues with sqlite/garbage collection/the compact framework that could cause this? Any common coding mistakes I could be making in declaring the connections that could cause this? Have tried two versions of SQLite. 1.0.56.0 and 1.0.82.0 but both have same results. Switching the database to sqlce seems to fix the issue but really don't want to do that if possible. Also read one old comment on a support site that suggested it was essential to keep sqliteconnections in using blocks to avoid a similar issue but this has had no effect in this case.
Don't know if the following helps: ExceptionCode: 0xc0000005 ExceptionAddress: 0x03f6bba8 Reading: 0x00000010 Faulting module: coredll.dll Offset: 0x00022ba8 at UnsafeNativeMethods.sqlite3_close_interop(IntPtr db) at SQLiteBase.CloseConnection(SQLiteConnectionHandle db) at SQLiteConnectionHandle.ReleaseHandle() at CriticalHandle.Cleanup() at CriticalHandle.Dispose(Boolean disposing) at CriticalHandle.Dispose() at SQLite3.Close() at SQLiteConnection.Close() Any input welcome. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users