Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out crash in PersistentStore::deinit() #564

Open
gperciva opened this issue Oct 24, 2023 · 1 comment
Open

Figure out crash in PersistentStore::deinit() #564

gperciva opened this issue Oct 24, 2023 · 1 comment

Comments

@gperciva
Copy link
Member

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;
    }
}
@gperciva gperciva mentioned this issue Oct 24, 2023
7 tasks
@gperciva
Copy link
Member Author

This might not be relevant to the current code:

  • d8aba6f stopped having the database as a class member (which the Qt API warned against doing)
  • 049c09b moved the mutex from being a class member to a static variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant