Crash error on quit (Mac) after a time of inactivity ? Error DB: Stream read error. - Error number: 394506

Hi,
if i leave open my App (i’m using Valentina Server for SQLite) for more than an hour (don’t know exactly the time) and then try to close the app i receive this error crash log.

If i try to use the app, instead of closing it, i receive the error:

Error DB: Stream read error. - Error number: 394506

In Open App event i’ve inserted:

App.AllowAutoQuit = True

But that not solve the issue.
Any hints ?
A workaround could be to close the App after xxx time of inactivity and how to do ?