On 2014-10-29, 12:13 PM, Mike McWhinney wrote:
System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception
  e)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
  IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
  msg)
    at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
  dwComponentID, Int32 reason, Int32 pvLoopData)
    at

I'm not very knowledgeable about Windows forms but if you are writing the SQLite database from multiple threads, that could be the reason. The main reasons I've seen this happen are when something is trying to write to the database when something else has it open for a read.

If you are using threads, then ensure that reader threads exhaust their result sets. Unfortunately some third party libraries do lazy loading which doesn't work well with SQLite. Pseudo-code:

# guithread.pseudo
def fetchResults(query):
  while(query.hasMore())
    query.fetchMore() # without this, the sqlite result is active...

# writethread.pseudo
def execQuery(query):
  query.exec() # ...which would lock this

If you are not using threads, then it is possible that having the DB itself on a network share is causing the problem. I seem to recall some issues along these lines in the docs but I don't have any personal experience.

Sohail

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

Reply via email to