Figure out crash in PersistentStore::deinit()
gperciva opened this issue · comments
Apparently tarsnap-gui 1.0.2 can crash in PersistentStore::deinit() (???)
Excerpt from crash log:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x10464bc84 QReadWriteLock::tryLockForWrite(int) + 36
1 QtSql 0x103058e84 0x103050000 + 36484
2 Tarsnap 0x102ae0038 PersistentStore::deinit() + 112
3 Tarsnap 0x102ae02f8 PersistentStore::~PersistentStore() + 36
4 libsystem_c.dylib 0x18c827060 __cxa_finalize_ranges + 476
5 libsystem_c.dylib 0x18c826de8 exit + 44
The code in question is:
void PersistentStore::deinit()
{
QMutexLocker locker(&_mutex);
if(_initialized)
{
_db.close();
_db = QSqlDatabase();
_db.removeDatabase("tarsnap");
_initialized = false;
}
}