Files
loongoffice/comphelper
Miklos Vajna 3974af7dca sfx2: fix crash in SfxObjectShell::IsHelpDocument()
Seen while running the online.git unit-quarantine testcase:

	#0  std::__uniq_ptr_impl<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::_M_ptr() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:191
	#1  0x00007f2f25fa398a in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::get() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:462
	#2  0x00007f2f25f9fae2 in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::operator->() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:455
	#3  0x00007f2f25f8bbd2 in SfxMedium::GetFilter() const (this=0x0) at sfx2/source/doc/docfile.cxx:3272
	#4  0x00007f2f260067ce in SfxObjectShell::IsHelpDocument() const (this=0x5c6adc0) at sfx2/source/doc/objcont.cxx:589
	#5  0x00007f2f0f6991c1 in SwLayIdle::isJobEnabled(IdleJobType, SwViewShell const*) (eJob=IdleJobType::SMART_TAGS, pViewShell=0x5a573f0)
	    at sw/source/core/layout/layact.cxx:2218
	#6  0x00007f2f0f69926d in SwLayIdle::DoIdleJob(IdleJobType, IdleJobArea) (this=0x7ffc9daf4180, eJob=IdleJobType::SMART_TAGS, eJobArea=IdleJobArea::VISIBLE)
	    at sw/source/core/layout/layact.cxx:2234
	#7  0x00007f2f0f699d81 in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (this=0x7ffc9daf4180, pRt=0x5a8fad0, pI=0x5a58860)
	    at sw/source/core/layout/layact.cxx:2355
	#8  0x00007f2f0fdccf21 in SwViewShell::LayoutIdle() (this=0x5a573f0) at sw/source/core/view/viewsh.cxx:826

Assume that in case the object shell has no underlying medium, then
that's not a help document.

Also fix the higher level problem that the LOK AnyInput callback should
not be invoked while doing a LOK background save, as the object shell in the
forked process has no underlying medium. That fixes the failure seen
while running the online.git unit-save-torture test.

Change-Id: Idcdd62cc177ac4b7edfbcef8906da2e42610ee98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171950
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-16 18:31:27 +02:00
..

Helpers for Implementing UNO Components

Here goes anything not generic / mature enough to end up in URE's stable interface at cppuhelper, etc.