When attachment 191094 [details] from bug 153193 is opened in Writer then switched to print preview mode, Writer crashes. 1. Open Options - Writer - Formatting Aids 2. Enable Hidden Characters (without this, below steps work) 3. Open attachment 191094 [details] 4. On the toolbar press the Print Preview button -> crash Seems to have started in: https://git.libreoffice.org/core/+/b8521d969ab5be4fc947e467d4afe969f9d3b563 author Miklos Vajna <vmiklos@collabora.com> Mon Sep 25 08:38:28 2023 +0200 committer Miklos Vajna <vmiklos@collabora.com> Mon Sep 25 09:41:41 2023 +0200 tree b8c80fb5cc0debcf3b4144cb147bae13c671a493 parent 6acdde8006e6b59758b00bc178f15f32796a1987 [diff] tdf#157263 sw floattable: prefer join over split after moving fwd
Happens in a fresh nightly: Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: threaded Adding CC to: Miklos Vajna
Yes, I can reproduce this.
Just for the record, on pc Debian x86-64 with master sources updated today I don't reproduce this (with gen or gtk3 renderings). (I confirm I enabled Hidden Characters in Options - Writer - Formatting Aids) Since Miklos reproduced this, I supposed I missed something unless it's a Windows only bug.
It happened for me on Linux with gtk3. I'll try to find a fix; failing that I'll post more info here (backtrace, etc).
The backtrace I see is: #0 std::__uniq_ptr_impl<svx::FmTextControlShell, std::default_delete<svx::FmTextControlShell> >::_M_ptr() const (this=0x6666666600000278) at /usr/include/c++/12/bits/unique_ptr.h:191 #1 0x00007ffff1813a2a in std::unique_ptr<svx::FmTextControlShell, std::default_delete<svx::FmTextControlShell> >::get() const (this=0x6666666600000278) at /usr/include/c++/12/bits/unique_ptr.h:462 #2 0x00007ffff180c038 in std::unique_ptr<svx::FmTextControlShell, std::default_delete<svx::FmTextControlShell> >::operator->() const (this=0x6666666600000278) at /usr/include/c++/12/bits/unique_ptr.h:455 #3 0x00007ffff1806cb4 in FmXFormShell::IsActiveControl_Lock(bool) const (this=0x6666666600000000, _bCountRichTextOnly=false) at /home/vmiklos/git/libreoffice/core/svx/source/form/fmshimp.cxx:3840 #4 0x00007ffff17e0047 in FmFormShell::IsActiveControl() const (this=0x5166ee0) at /home/vmiklos/git/libreoffice/core/svx/source/form/fmshell.cxx:1227 #5 0x00007fffd276a5c4 in SwView::SelectShell() (this=0x4e282e0) at /home/vmiklos/git/libreoffice/core/sw/source/uibase/uiview/view.cxx:296 I.e. SwView::SelectShell() dereferences its m_pFormShell pointer, but sanitizers say that it's already deleted earlier in SfxDispatcher::FlushImpl(). Need to find a way so that the dying FmFormShell notifies SwView, so the view cal clear its form shell pointer before it becomes invalid.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/164fb25f7b2db7d833d6d0f28e49c5cac68426b3 tdf#158686 sw floattable: fix print preview crash It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/e6bdd44e314907535db181d5f65342c1bfa7e3da tdf#158686 sw floattable: fix print preview crash It will be available in 24.2.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/1f4e1b84722c4387f65614ad7f1765dcddb8aeb9 tdf#158686 sw floattable: fix print preview crash It will be available in 7.6.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.