I have tried running the db toolset. The first tool found three problems and fixed them. I then ran the remaining tools. Then I did a backup. I closed the app and got the sqlite error. Then I opened the app and did a restore. I ran the tools again and repeat. I still get the error.
The app becomes inconsistent and eventually hangs.
Worse yet this same problems happen with this db on Windows!
The problem has been addressed by Bruce Buzbee in - of all places - Facebook. Why would anyone think they should check here for answers?