f2d017a74a
The failing scenario was reproducible on my old phone: * start editing the document from the shell * add a word * leave the editing using the '<' in the top left * start editing the document again => boom! In the normali, non-crashing case, the order of destruction is that ~ChildSession is called first (and calls ChildSession::disconnect() that consequently calls Document::onUnload() via _docManager->onUnLoad(...). The Document::onUnload() then deregisters callbacks and all is fine. The in the above described crashing case, the Document is destroyed before ChildSession and calls resetDocManager() for all sessions. Before this patch, this meant that the _docManager was set to nullptr, leading to situation that later, in the ~ChildSession, the call of onUnload() was avoided, the callbacks were not unregistered, and later, on the next document load, the app crashed because it called stale callbacks. I suspect the change might be useful even for the non-mobile case, but not 100% sure, so rather do it MOBILEAPP-only. Change-Id: I279a160ccaab3080e84fe0437ed72684331b6e13 Reviewed-on: https://gerrit.libreoffice.org/84588 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> |
||
---|---|---|
.. | ||
ChildSession.cpp | ||
ChildSession.hpp | ||
Delta.hpp | ||
DummyLibreOfficeKit.cpp | ||
DummyLibreOfficeKit.hpp | ||
ForKit.cpp | ||
Kit.cpp | ||
Kit.hpp | ||
KitHelper.hpp | ||
TestStubs.cpp | ||
Watermark.hpp |