Bug 142294 - MAILMERGE: Starting "Insert → Field → More Fields" second time leads to hang of LO.
Summary: MAILMERGE: Starting "Insert → Field → More Fields" second time leads to hang ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.2.0 target:7.1.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-05-15 06:14 UTC by Robert Großkopf
Modified: 2021-05-25 10:06 UTC (History)
4 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 Robert Großkopf 2021-05-15 06:14:26 UTC
Open a new Writer document.
Go to
Insert → Filed → More Fields → Database
Type → Mail merge fields
Database Selection → Select a Field of a table → Insert

Close the dialog. File has been inserted.

Now the second field:
Insert → Filed → More Fields: Whole LO will hang, nor response any more.

This bug appears on OpenSUSE 15.2 64bit rpm Linux with LO 7.1.3.2
It will work right on the same machine with the same userprofile in LO 7.0.5.2.
Comment 1 Xisco Faulí 2021-05-18 08:25:44 UTC
Reproduced in

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: c781776f3c79bbe3175b1452d26c79ebb931a500
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

but not with GTK3
Comment 2 Xisco Faulí 2021-05-18 08:38:56 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=351edb44eb0548f7e56464de42c1758a1f5e4ab4

author	Mike Kaganski <mike.kaganski@collabora.com>	2021-03-14 14:33:34 +0300
committer	Mike Kaganski <mike.kaganski@collabora.com>	2021-03-14 13:58:18 +0100
commit 351edb44eb0548f7e56464de42c1758a1f5e4ab4 (patch)
tree 2ae52f50280b774f6cf3f97f70e3af3c4d0ecd45
parent 924733c65902d0b17764aded56c88c99d4b9a568 (diff)
tdf#141012: do not try to expand the node if RequestingChildrenHdl failed

Bisected with: bibisect-linux64-7.2

Adding Cc: to Mike Kaganski
Comment 3 Mike Kaganski 2021-05-18 08:59:23 UTC
The problem is in SwDBTreeList::ShowColumns, which never leaves iteration. It gets a "biblio" item (I tested with the default bobliography), calls 'GotoRootLevelParent' on it, so it now points to "Bibliography", collapses the row, sees that it has no children (gets a dummy entry), and gets "next", which is "biblio" again.

Caolan: do you have an idea what's wrong here? I don't quite see what is the intended logic here.
Comment 4 Caolán McNamara 2021-05-21 15:42:55 UTC
There's a <dummy> entry to indicate the load-on-demand state. It needs to be there for the expander indicator to be drawn/shown when there are no "real" entries yet.

Typically the user clicks on the expander, the expansion remove the dummy entry and calls the provided expander-callback which has the change to populate the node.

Here RequestingChildrenHdl is the expander-callback (set via connect_expanding) and populates the node, but then there are two places where it is called directly and it merrily appends entries into the node, but because it's called outside the expander-callback the <dummy> entry was never removed which is then a problem because of the inconsistency.
Comment 5 Commit Notification 2021-05-21 18:54:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/89cc421a6b246df36415fc3fbbec00435ffc5a85

tdf#142294 drop placeholder on-demand node on directly populating node

It will be available in 7.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 6 Caolán McNamara 2021-05-21 18:59:33 UTC
backport to 7-1 in gerrit
Comment 7 Commit Notification 2021-05-22 17:31:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#142294 drop placeholder on-demand node on directly populating node

It will be available in 7.1.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.
Comment 8 Xisco Faulí 2021-05-24 09:16:05 UTC
Verified in

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 42d2b2d55a27f11153ea1713737d93540a19211d
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 9 Commit Notification 2021-05-24 13:49:27 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1-4":

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

tdf#142294 drop placeholder on-demand node on directly populating node

It will be available in 7.1.4.

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.