Merge lp:~vanvugt/mir/fix-1358191 into lp:mir
Status: | Rejected |
---|---|
Rejected by: | Daniel van Vugt |
Proposed branch: | lp:~vanvugt/mir/fix-1358191 |
Merge into: | lp:mir |
Diff against target: |
41 lines (+17/-2) 1 file modified
src/client/mir_connection_api.cpp (+17/-2) |
To merge this branch: | bzr merge lp:~vanvugt/mir/fix-1358191 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Disapprove | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+232062@code.launchpad.net |
Commit message
Avoid confusing weak/shared pointer ownership. In the case that
connect() fails and throws an exception, make sure the shared_ptr to your
ClientPlatformF
weak_ptr to it (inside conf). If you let the shared_ptr destruct first in
this case, the weak_ptr it came from somehow loses track and tries to
delete the object a second time, hence crashing (LP: #1358191)
Description of the change
Unfortunately testing this fix is hit and miss. For several hours today I could reproduce the bug reliably and verified this proposal does fix it. Other times (like all of Friday and now this evening) the bug stops happening so you can't be sure at all.
If this isn't a compiler bug then I can only assume there are compliant cases where weak_ptr stops communicating properly with shared_ptr's of the same object. I'm not aware of any way C++ allows that intentionally though.
Safe to say I'm still confused by this and hoping someone finds a simpler explanation before I wake up...
PASSED: Continuous integration, rev:1862 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/2492/ jenkins. qa.ubuntu. com/job/ mir-android- utopic- i386-build/ 1445 jenkins. qa.ubuntu. com/job/ mir-clang- utopic- amd64-build/ 1451 jenkins. qa.ubuntu. com/job/ mir-mediumtests -utopic- touch/1430 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- amd64-ci/ 1014 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- amd64-ci/ 1014/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- utopic- armhf/367 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- utopic- armhf/367/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/2511 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 12030
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/2492/ rebuild
http://