Bug 126366 - Writer: Numbering problem in Mail Merge toolbar
Summary: Writer: Numbering problem in Mail Merge toolbar
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.0.0 target:6.4.3 target:6.3.6
Keywords: bibisectRequest, regression
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2019-07-12 13:43 UTC by Andrés Maldonado
Modified: 2020-03-19 17:00 UTC (History)
5 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 Andrés Maldonado 2019-07-12 13:43:42 UTC
Description:
When navigating through Mail Merge entries, the numbering is incorrect.

Steps to Reproduce:
1. In Writer, enable Mail Merge toolbar (View > Toolbars > Mail Merge)
2. Enable Data Sources (View > Data Sources)
3. Open the built-in table 'biblio'
4. Select the 'Identifier' column and drag&drop it into the document

Actual Results:
The counter is set to -1. If I click on the right arrow (Next Mail Merge Entry), the counter changes successively to 1,1,3,3,5,5,...

Expected Results:
The counter should be set to 1. Clicking on the right arrow should change it successively to 2,3,4,5...


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
I found that there are two commits that generate a regression:
- cbf3e0d241: tdf#121607 defer other requests until password dialog is dismissed
- 60714a8148: tdf#121606: displaying Mail Merge toolbar shouldn't activate connection

Before cbf3e0d241, the counter starts at 1 and updates as expected: 2,3,4,5,...
After cbf3e0d241 and before 60714a8148: 1,2,2,4,4,6,6,...
After 60714a8148: -1,1,1,3,3,5,5,...

Note: I found those commits while doing bisects with bibisect-linux-64-6.1

Note 2: I still get -1,1,1,3,3,5,5,... on:

Version: 6.4.0.0.alpha0+
Build ID: b9a7be7731ee7f03c8aa5498aa890b34552c94b1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Dieter 2019-07-13 10:35:16 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-10_02:13:57
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

and with

Version: 6.1.6.3 (x64)
Build-ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group threaded

but not with

Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 2 Jean-Baptiste Faure 2020-03-11 10:19:58 UTC
Added links to bug #121606 and bug #121607

@ Andrés Maldonado : you should have done that yourself.

Best regards. JBF
Comment 3 Caolán McNamara 2020-03-11 15:43:57 UTC
fix of bug #121607 looks like the offender, seems the Unlock there doesn't actually continue processing the update requests so the status doesn't change until somethere else prompts processing the pending updates
Comment 4 Commit Notification 2020-03-12 11:33:22 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22225256e8e2c64978fdcd87c5390764a3ac7b6b

Resolves: tdf#126366 revert use of SfxDispatcher::Lock

It will be available in 7.0.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 5 Caolán McNamara 2020-03-12 11:39:28 UTC
fixed in master, backports to 6-4 and 6-3 in gerrit
Comment 6 Commit Notification 2020-03-17 10:28:28 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

Resolves: tdf#126366 revert use of SfxDispatcher::Lock

It will be available in 6.4.3.

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 7 Commit Notification 2020-03-19 16:55:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/32b8d32e4b36684b14a53450cb16df7c3026852a

Resolves: tdf#126366 revert use of SfxDispatcher::Lock

It will be available in 6.3.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 Xisco Faulí 2020-03-19 17:00:19 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: 9d7fdcd6b5c7b5a9fe781bb99b135fba7d04ddec
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!