There are a few users reporting the same issue that they experience multiple crashes in the query when the query is released. All of them said that they don't close the database in their application either. Currently, they don't have reproducible steps and mostly the issue happens to their end-users.
As this happens to multiple users, I think we should at least review the issue and code from our side.
Crash Log: https://pastebin.com/raw/dBwFGR4d
Exception : EXC_BAD_ACCESS KERN_INVALID_ADDRESS