You are not logged in.
Arnaud,
I got this error in my multi-threaded program, when it happened there were multiple threads reading the DB. I use
AcquireWriteMode := amUnlocked;
since you previously suggested the unlocked mode is still thread-safe, I'm not sure if it has anything to do with the problem. Let me know if you need any other details.
Note, the stacks bellow is copied at the second debugger break, I forgot to copy the stack trace after the first debugger break.
---------------------------
Debugger Exception Notification
---------------------------
Project MyEXE.exe raised exception class ESQLite3Exception with message 'library routine called out of sequence'.
---------------------------
Break Continue Help
---------------------------
SynSQLite3.sqlite3_check(63587656,21)
SynSQLite3.TSQLRequest.Prepare(63587656,'SELECT ID...')
SynSQLite3.TSQLStatementCached.Prepare('SELECT ID...')
mORMotSQLite3.TSQLRestServerDB.GetAndPrepareStatement('...')
mORMotSQLite3.TSQLRestServerDB.MainEngineList('SELECT ID...',False,nil)
mORMot.TSQLRestServerURIContext.ExecuteORMGet
mORMot.TSQLRestServerURIContext.Execute(execORMGet)
mORMot.TSQLRestServer.URI($D5CFC2F)
mORMotSQLite3.TSQLRestClientDB.InternalURI($D5CFC2F)
mORMot.TSQLRestClientURI.URI('root','GET',$D5CFCD0 {''},nil {''},$D5CFCEC {'SELECT ID...'})
mORMot.TSQLRestClientURI.ExecuteList((...),'SELECT ID...')
mORMot.TSQLRest.MultiFieldValues(TSQLMail,'ID...')
mORMot.TSQLRest.MultiFieldValues(TSQLMail,'ID...',(...))
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
In TSQLRestServerDB.MainEngineList() there are a global lock, as with any other method of mORMotSQlite3.pas:
DB.LockJSON()..
try
..
finally
DB.UnLockJSON();
end;
So there is no reason why there should be a multi-thread problem.
Are using some backup method during process?
In general, is there anything outside basic CRUD operation within the ORM methods?
Do you call the SQlite3 engine directly?
Online
ab, There was not backup process, and I did not call the sqlite engine directly, everything goes through the TSQLRestClientDB methods. PS, the WALMode is enabled.
And I couldn't catch you about your question: "is there anything outside basic CRUD operation within the ORM methods?"
The error happened only once, I'll report if I'll get any new details.
Last edited by edwinsn (2014-07-05 07:38:31)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline