libreoffice-online/kit
Jan Holesovsky f2d017a74a android: Fix crash on the 2nd editing start.
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>
2019-12-06 09:30:04 +01:00
..
ChildSession.cpp Spelling context menu: Fix execution of LanguageStatus 2019-12-03 14:44:09 +01:00
ChildSession.hpp android: Fix crash on the 2nd editing start. 2019-12-06 09:30:04 +01:00
Delta.hpp DeltaBitmapRow: make members private 2018-11-08 09:16:57 +01:00
DummyLibreOfficeKit.cpp Rotate Watermarks with 45 degree angle 2019-11-10 23:42:03 +01:00
DummyLibreOfficeKit.hpp
ForKit.cpp Add REST endpoint for admin metrics. 2019-11-25 13:06:01 +01:00
Kit.cpp insert image needs fps_office component these days. 2019-11-30 22:47:01 +00:00
Kit.hpp wsd: improved kit thread naming 2019-09-22 20:23:27 +02:00
KitHelper.hpp wsd: leaflet: status now includes selected parts 2019-08-17 04:30:42 +02:00
TestStubs.cpp TestStubs: add more stubs for sanitizers 2019-05-28 09:10:45 +02:00
Watermark.hpp Fix minor comparison error 2019-11-27 05:34:27 +01:00