Hi,
first post here. Got a perplexing problem with SQLite and no, the database is
perfectly writable.
In my app I use a different database as main database that unfortunately
doesn't have an FTS. Therefore, I'm using an SQLite database as index. The
SQLite database is very simple:
CREATE VIRTUAL TABLE bodyindex USING fts4(tokenize=unicode61,content='',
messagebody);
I noticed for large messagebody fields that I see the beachball. Another SQLite
library offers multithreaded methods to get rid of the beachball. Now, if I
start writing to the database I get the above error. If I create the SQLite
database with the old SQLite library and then start writing everything works
fine.
Here is the code for writing:
dim thePreparedStatement as SQLitePreparedStatement =
SQLiteIndexDB.Prepare("INSERT INTO bodyindex(docid, messagebody) VALUES(" +
str(theRecID) + ", ?)")
thePreparedStatement.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
thePreparedStatement.SQLExecute(MessageBody)
If SQLiteIndexDB.Error Then
globals.theErrorLog.LogItem(CurrentMethodName)
Globals.theErrorLog.DialogErrorProceed kErrorWrite + " " +
SQLiteIndexDB.ErrorMessage
globals.StopArchiving = True
Return
End If
thePreparedStatement = Nil
I made an example and - of course - everything works fine there.
I think that the problem is thread-related. Does anyone have an idea what might
cause this odd problem?
macOS 10.13 + 10.14. I'm using a language + IDE called Xojo.
And just because I like fun I get some SQLite related zombies on 10.14:
0 MBS_SQL_SQLite_Plugin_19846.dylib 0x000000010d6e515c
sqlite3LeaveMutexAndCloseZombie + 1596
1 MBS_SQL_SQLite_Plugin_19846.dylib 0x000000010d6e454e sqlite3Close + 878
2 MBS_SQL_SQL_Plugin_19846.dylib 0x000000010d460a1f
Isl3Connection::Disconnect() + 31
3 MBS_SQL_SQL_Plugin_19846.dylib 0x000000010d409307
SAConnection::Disconnect() + 87
4 MBS_SQL_SQL_Plugin_19846.dylib 0x000000010d48297a closeDB(dbDatabase*)
+ 42
5 XojoFramework 0x0000000109b10206 databaseClose + 58
6 Mail Archiver X.debug 0x0000000105aa002b
Database.Close%%o<Database> + 11
7 Mail Archiver X.debug 0x0000000106c949e4
SQLiteIndex.CloseSQLite%%o<SQLiteIndex> + 580 (/SQLiteIndex:376)
8 Mail Archiver X.debug 0x000000010767bf7f
MaxModel.CloseArchive%%o<MaxModel> + 1343 (/MaxModel:696)
9 Mail Archiver X.debug 0x0000000108088439
MainWindowController.CloseArchive%%o<MainWindowController> + 329
(/MainWindowController:358)
10 Mail Archiver X.debug 0x00000001080d66ec
MainWindow.MainWindow.CloseDB%%o<MainWindow.MainWindow>b + 6476
(/MainWindow:1253)
11 Mail Archiver X.debug 0x00000001080be27f
MainWindow.MainWindow.Event_CloseDatabase%%o<MainWindow.MainWindow>b + 671
(/MainWindow:714)
12 Mail Archiver X.debug 0x000000010815935e
DBWindow.CloseArchive%%o<DBWindow> + 958 (/DBWindow:579)
13 Mail Archiver X.debug 0x000000010814f611
DBWindow._FileClose_Action%b%o<DBWindow> + 337 (/DBWindow:235)
14 XojoFramework 0x0000000109b58979
RuntimeMenuItemClick(RunMenuItem*, unsigned char, Window*, unsigned char*) +
1063
15 XojoFramework 0x0000000109a5bef8
CocoaMenu::_MenuItemAction(NSMenuItem*) + 72
10.13 just dies without crashlog. Sometimes and not always.
Mit freundlichen Grüßen/Regards
Beatrix Willius
http://www.mothsoftware.com <http://www.mothsoftware.com/>
Mail Archiver X: The email archiving solution for professionals
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users