Bug 156546 - Writer freezes/hangs at redo inserting a table
Summary: Writer freezes/hangs at redo inserting a table
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: All All
: high critical
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.1 target:7.5...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Tables Undo-Redo
  Show dependency treegraph
 
Reported: 2023-07-31 09:46 UTC by Telesto
Modified: 2024-04-18 10:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2023-07-31 09:46:06 UTC
Description:
Writer freezes/hangs at redo inserting a table

Steps to Reproduce:
1. Open attachment 188605 [details]
2. Press CTRL+A (2x)
3. CTRL+C
4. CTRL+N
5. CTRL+V
6. CTRL+Z
7. CTRL+Y -> Freeze 

Actual Results:
Hang

Expected Results:
Redo


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e26aeb882dd236adf19679d5df9b7ba5da1ed226
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2023-07-31 09:47:07 UTC
Fine with
Version: 7.0.7.0.0+ (x64)
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 2 Stéphane Guillou (stragu) 2023-08-01 10:11:54 UTC
Thanks Telesto!

Bibisected with linux-64-7.5 to first bad commit a34cc1135108bb252b8a58f6a9706b2630599735 which points to core commit ad03ed5106499f74b38da28489a9352ce3f01d1a which is a cherrypick of:

commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda
author	Michael Stahl Mon May 08 16:38:03 2023 +0200
committer	Michael Stahl Tue May 09 10:34:40 2023 +0200
tdf#154877 sw: generalise ExtendedSelectAll()
This used to work only in the body text; make it work in any text, so
also text frame, header/footer, footnote, table cell.
(fixes regression from commit 0590cd2857f68f48b8847071a9c1a7dbef135721)
This is made much more difficult by table cells, which may contain
nested tables; there is already some code to switch between text
selection (via m_pCurrentCursor) and table cell selection (via
m_pTableCursor). [...]
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151544

Michael, can you please have a look?

Bumping the priority given that it was cherrypicked to 7.5.4 and we're getting closer to the last bugfix releases for 7.5.
Comment 3 Commit Notification 2023-08-02 18:41:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d96d69322ac18f53668b75397c8587f94cd043b

tdf#156546 sw: fix infinite loop in SwUndoInsert::RedoImpl()

It will be available in 24.2.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.
Comment 4 Michael Stahl (allotropia) 2023-08-03 09:30:37 UTC
fixed on master
Comment 5 Commit Notification 2023-08-03 12:00:24 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/b7e07ea397cfac2a2260f01e64495e4e6d4c1bc6

tdf#156546 sw: fix infinite loop in SwUndoInsert::RedoImpl()

It will be available in 7.6.1.

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.
Comment 6 Stéphane Guillou (stragu) 2023-08-03 14:03:40 UTC
Fix verified in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: eef0c5d4d45ba35acfb6d8f7551fe565ca4badaa
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks Michael!
Comment 7 Commit Notification 2023-08-16 09:12:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/13ddb8bdc0e62f21b16f16088d5180234791eb7b

tdf#156546 sw: fix infinite loop in SwUndoInsert::RedoImpl()

It will be available in 7.5.6.

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.
Comment 8 Hussam Al-Tayeb 2023-08-19 11:29:41 UTC
I just compliled libreoffice-7-5 bramch from source and now I get the following crash when I follow the instructions in #comment0

Fatal exception: Signal 6
Stack:
/usr/lib/libreoffice/program/libuno_sal.so.3(+0x3f8e4)[0x7f878022e8e4]
/usr/lib/libreoffice/program/libuno_sal.so.3(+0x3fa71)[0x7f878022ea71]
/usr/lib/libc.so.6(+0x3dc10)[0x7f877b088c10]
/usr/lib/libc.so.6(+0x8a77c)[0x7f877b0d577c]
/usr/lib/libc.so.6(raise+0x18)[0x7f877b088b68]
/usr/lib/libc.so.6(abort+0xd3)[0x7f877b0730f2]
/usr/lib/libreoffice/program/libmergedlo.so(+0x119b4f5)[0x7f877c39b4f5]
/usr/lib/libreoffice/program/libmergedlo.so(+0x23ac19a)[0x7f877d5ac19a]
/usr/lib/libreoffice/program/libmergedlo.so(+0x3593dfb)[0x7f877e793dfb]
/usr/lib/libreoffice/program/libuno_sal.so.3(+0x17c42)[0x7f8780206c42]
/usr/lib/libreoffice/program/libuno_sal.so.3(+0x3f9cc)[0x7f878022e9cc]
/usr/lib/libc.so.6(+0x3dc10)[0x7f877b088c10]
/usr/lib/libreoffice/program/libmergedlo.so(_ZNK10SfxItemSet7GetItemEtb+0x18)[0x7f877d6c9008]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x45d651)[0x7f874b05d651]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN2sw18AccessibilityCheck9checkNodeEP6SwNode+0x67)[0x7f874b05c4a7]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x8b1e18)[0x7f874b4b1e18]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x8b30ef)[0x7f874b4b30ef]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN10SwTextNode16SplitContentNodeERK10SwPositionPKSt8functionIFvPS_N2sw4mark11RestoreModeEbEE+0x344)[0x7f874b4e57d4]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN7SwNodes9MoveRangeER5SwPaMR10SwPositionRS_+0xa6a)[0x7f874b22b34a]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x91c7dc)[0x7f874b51c7dc]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x94a414)[0x7f874b54a414]
/usr/lib/libreoffice/program/../program/libswlo.so(+0x91aba2)[0x7f874b51aba2]
/usr/lib/libreoffice/program/libmergedlo.so(_ZN17SfxListUndoAction15UndoWithContextER14SfxUndoContext+0x33)[0x7f877d7422e3]
/usr/lib/libreoffice/program/libmergedlo.so(_ZN17SfxListUndoAction15UndoWithContextER14SfxUndoContext+0x33)[0x7f877d7422e3]
/usr/lib/libreoffice/program/libmergedlo.so(_ZN14SfxUndoManager8ImplUndoEP14SfxUndoContext+0x144)[0x7f877d745304]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN2sw11UndoManager15impl_DoUndoRedoENS0_14UndoOrRedoTypeEm+0xf9)[0x7f874b5081d9]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN11SwEditShell4UndoEtt+0x174)[0x7f874b29a084]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN10SwWrtShell2DoENS_6DoTypeEtt+0x1f5)[0x7f874bb51c75]
/usr/lib/libreoffice/program/../program/libswlo.so(_ZN11SwBaseShell8ExecUndoER10SfxRequest+0x44e)[0x7f874b99849e]
/usr/lib/libreoffice/program/libmergedlo.so(+0x2110324)[0x7f877d310324]
/usr/lib/libreoffice/program/libmergedlo.so(+0x214cf98)[0x7f877d34cf98]
/usr/lib/libreoffice/program/libmergedlo.so(+0x214d78b)[0x7f877d34d78b]
/usr/lib/libreoffice/program/libmergedlo.so(+0x25e54a2)[0x7f877d7e54a2]
/usr/lib/libreoffice/program/libmergedlo.so(+0x329ff98)[0x7f877e49ff98]
/usr/lib/libreoffice/program/libmergedlo.so(_ZN16SalUserEventList18DispatchUserEventsEb+0x142)[0x7f877e743952]
/usr/lib/libreoffice/program/libvclplug_gtk3lo.so(+0xebe0a)[0x7f87748ebe0a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x175)[0x7f877a623625]
/usr/lib/libglib-2.0.so.0(+0xa8ca9)[0x7f877a677ca9]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x31)[0x7f877a620e71]
/usr/lib/libreoffice/program/libvclplug_gtk3lo.so(+0xed295)[0x7f87748ed295]
/usr/lib/libreoffice/program/libmergedlo.so(+0x3589fc3)[0x7f877e789fc3]
/usr/lib/libreoffice/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x76)[0x7f877e78c806]
/usr/lib/libreoffice/program/libmergedlo.so(+0x23b28b6)[0x7f877d5b28b6]
/usr/lib/libreoffice/program/libmergedlo.so(_Z10ImplSVMainv+0x51)[0x7f877e7959f1]
/usr/lib/libreoffice/program/libmergedlo.so(soffice_main+0xa2)[0x7f877d5d11e2]
/usr/lib/libreoffice/program/soffice.bin(+0x102e)[0x56111cfbe02e]
/usr/lib/libc.so.6(+0x28ece)[0x7f877b073ece]
/usr/lib/libc.so.6(__libc_start_main+0x81)[0x7f877b073f81]
/usr/lib/libreoffice/program/soffice.bin(+0x1065)[0x56111cfbe065]
Comment 9 Hussam Al-Tayeb 2023-08-20 21:21:48 UTC
No crash in libreoffice-7-6 branch. Looks like 7-5 might need additional changes?
Comment 10 Michael Stahl (allotropia) 2023-08-21 10:33:34 UTC
(In reply to Hussam Al-Tayeb from comment #9)
> No crash in libreoffice-7-6 branch. Looks like 7-5 might need additional
> changes?

i can repro it, but only after manually enabling officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck in expert config, not sure if there is a UI to enable it on this branch?

it's unrelated, this appears to be the fix:
https://gerrit.libreoffice.org/c/core/+/155789
Comment 11 Commit Notification 2024-04-18 10:21:01 UTC
Kira Tubo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/abab2d24b31f0857502d2fa527b433bd4ff0a0f5

tdf#156546: sw unit test: freeze redo insert table

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.