Bug 160700 - Regression: broken cross-reference to empty element of numbered list after saving
Summary: Regression: broken cross-reference to empty element of numbered list after sa...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.4 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2024-04-16 22:13 UTC by Serg Bormant
Modified: 2024-04-29 16:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
crossref saved with 24.2.1.2 (valid) (9.52 KB, application/vnd.oasis.opendocument.text)
2024-04-16 22:15 UTC, Serg Bormant
Details
crossref saved with 24.2.2.2 (invalid) (9.51 KB, application/vnd.oasis.opendocument.text)
2024-04-16 22:17 UTC, Serg Bormant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serg Bormant 2024-04-16 22:13:09 UTC
Description:
Writer in 24.2.2.2 breaks cross-references to empty elements of numbered lists.
Writer in 24.2.1.2 works.

Steps to Reproduce:
1. Create new Writer document
2. Press Enter, Up, F12, Down
3. Select menu Insert - Cross-reference
Type: Numbered paragraphs
Refer using: Number
Selection: 1
Click [ Insert ], click [ Close ]
4. Select menu File - Save, give name, for ex. test1.odt
5. Select menu File - Reload

Actual Results:
Error: Reference source not found
instead of cross-reference "1" as at steps 3 and 4.

Expected Results:
Cross-referense "1" to list item as at step 3 and 4.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.2.2.2 (x86) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 1 Serg Bormant 2024-04-16 22:15:07 UTC
Created attachment 193714 [details]
crossref saved with 24.2.1.2 (valid)
Comment 2 Serg Bormant 2024-04-16 22:17:24 UTC
Created attachment 193715 [details]
crossref saved with 24.2.2.2 (invalid)

This is test_crossref.odt, opened and saved with Writer 24.2.2.2 with invalid crossref.
Comment 3 Serg Bormant 2024-04-16 22:20:30 UTC
Another Steps to Reproduce:
1. Open attached test_crossref.odt (crossref saved with 24.2.1.2 (valid)) with 24.2.2.2.
2. Save file
3. Reopen file
Comment 4 Ansu Kailaanmäki 2024-04-17 15:12:35 UTC
Hello, Serg Bormant,

I can confirm that the bug is present in these versions:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0957ee9f5d379c80fca4027c187b471118d0490d
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: fi-FI (fi_FI); UI: fi-FI
Calc: CL threaded

and

Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: fi-FI (fi_FI); UI: fi-FI
Calc: CL threaded
Comment 5 raal 2024-04-17 16:15:04 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.
Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one?
Thanks
 4f623889ebb3e0dc0af6bb9c07a2759d48b3b205 is the first bad commit
commit 4f623889ebb3e0dc0af6bb9c07a2759d48b3b205
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Jan 30 18:57:59 2024 +0100

    source 1d7ce421480d9170316533de03feb8d04eb5c767

162743: tdf#159438: when there's no frame, close previous bookmark first | https://gerrit.libreoffice.org/c/core/+/162743
Comment 6 Mike Kaganski 2024-04-18 19:46:48 UTC
https://gerrit.libreoffice.org/c/core/+/166266
Comment 7 Commit Notification 2024-04-19 03:24:10 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58e79c4394783033f61e1309214d9060e2f0adf2

tdf#160700: Avoid both bookmark-start and bookmark-end at the same index

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.
Comment 8 Commit Notification 2024-04-19 09:01:00 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/028feacd6a459d613e7a0d12788bf05b0e4c778c

tdf#160700: Avoid both bookmark-start and bookmark-end at the same index

It will be available in 24.2.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.
Comment 9 Serg Bormant 2024-04-22 19:46:51 UTC
Confirm fixed for (2024-04-20_08.46.46 daily)

Version: 24.2.4.0.0+ (X86_64) / LibreOffice Community
Build ID: 0324cb1c85b6daab8abaf139ac6b372127b76f06
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 10 Commit Notification 2024-04-29 16:42:19 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2-3":

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

tdf#160700: Avoid both bookmark-start and bookmark-end at the same index

It will be available in 24.2.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.