You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Qt Keychain 0.14.3, if ReadPasswordJob is running at the moment when the application gets a quit event, the library crashes with on_password_lookup() in libsecret.cpp trying to call (in my case) q->emitFinishedWithError(QKeychain::EntryNotFound) - however, q is pointing to freed memory by then. Perhaps it's worth using QPointer for callbackArg::self and check its validity somewhere around this line.
The text was updated successfully, but these errors were encountered:
The problem I see is that we can pass the QPointer to libsecret and have it manage its lifetime. Looking at the API documentation, I would think we would have to pass a GCancellable and make sure to cancel it when the job is destroyed. This might be easy to trigger by deleting a job just after start.
I can trigger this by e.g. adding deleteLater() in ReadJobPrivate::scheduledStart(), after triggering the async password lookup. A tried passing a GCancellable during construction and cancel it in the job's dtor, but that didn't work how I expected, the callback is still called by libsecret. Needs more investigation whether I'm holding it wrong, or libsecret not checking whether the cancellable was canceled before calling the callback.
With Qt Keychain 0.14.3, if
ReadPasswordJob
is running at the moment when the application gets a quit event, the library crashes withon_password_lookup()
inlibsecret.cpp
trying to call (in my case)q->emitFinishedWithError(QKeychain::EntryNotFound)
- however,q
is pointing to freed memory by then. Perhaps it's worth usingQPointer
forcallbackArg::self
and check its validity somewhere around this line.The text was updated successfully, but these errors were encountered: