memory leaks from OnlineAccounts::Manager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Online Accounts API |
Confirmed
|
Medium
|
Alberto Mardegan | ||
webapps-sprint |
New
|
Undecided
|
Unassigned | ||
storage-framework (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When running valgrind over the the storage-framework test suite, we noticed a leak that seemed to originate from online-
Running valgrind over online-
2,579 (112 direct, 2,467 indirect) bytes in 1 blocks are definitely lost in loss record 365 of 380
at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/
by 0x40B7811: QDBusConnection
by 0x40A5A67: QDBusConnection
by 0x40C19C8: QDBusAbstractIn
by 0x40C39FC: QDBusAbstractIn
by 0x4E4D666: OnlineAccounts:
by 0x4E4F76F: OnlineAccounts:
by 0x4E4F8A8: OnlineAccounts:
And:
2,701 (112 direct, 2,589 indirect) bytes in 1 blocks are definitely lost in loss record 366 of 380
at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/
by 0x40B7811: QDBusConnection
by 0x40A5A67: QDBusConnection
by 0x40C19C8: QDBusAbstractIn
by 0x40C39FC: QDBusAbstractIn
by 0x4E4D047: OnlineAccounts:
by 0x4E4FD53: OnlineAccounts:
by 0x4E52F30: ManagerPrivate (manager.cpp:51)
by 0x4E52F30: OnlineAccounts:
by 0x4E531AE: OnlineAccounts:
Based on the size of the leaks, it is a QDBusPendingCal
Related branches
- Alberto Mardegan (community): Approve
-
Diff: 42 lines (+4/-2)3 files modifiedsrc/lib/OnlineAccounts/pending_call.h (+2/-1)
src/lib/OnlineAccountsDaemon/i18n.cpp (+1/-1)
src/lib/Ubuntu/OnlineAccounts.2/account.cpp (+1/-0)
- Michi Henning (community): Approve
- Online Accounts: Pending requested
-
Diff: 53 lines (+18/-0)2 files modifiedtests/lib/OnlineAccounts/functional_tests/functional_tests.cpp (+9/-0)
tests/lib/qml_module/tst_qml_module.cpp (+9/-0)
summary: |
- memory leaks from OnlineAccounts::Manager constructor + memory leaks from OnlineAccounts::Manager |
Changed in online-accounts-api: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Alberto Mardegan (mardy) |
Changed in storage-framework (Ubuntu): | |
status: | New → Fix Released |
So looking at the Qt code, the QDBusPendingCal lPrivate class is ref counted, where most references will be owned by a QDBusPendingCall instance (or a subclass). It has one additional reference that is managed manually in the QDBusConnection Private code.
I suspect it is this last reference that is getting lost somewhere, but I've got no idea why I haven't noticed something similar in other pieces of code invoking asynchronous methods with QtDBus.