Bug 153866 - .uno:IndexMarkToIndex not working
Summary: .uno:IndexMarkToIndex not working
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Björn Michaelsen
URL:
Whiteboard: target:24.2.0 target:7.5.6 target:7.6...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: TableofContents-Indexes-Dialog Crash
  Show dependency treegraph
 
Reported: 2023-02-27 17:37 UTC by sdc.blanco
Modified: 2024-08-20 14:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["SwTextFrame::MapViewToModel(o3tl::strong_int<long,Tag_TextFrameIndex>)","SwTextFrame::MapViewToModel","SwTextFrame::MapViewToModel(o3tl::strong_int<int, Tag_TextFrameIndex>) const"]


Attachments
sample ODT to test .uno:IndexMarkToIndex (13.66 KB, application/vnd.oasis.opendocument.text)
2024-07-31 10:36 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2023-02-27 17:37:03 UTC
This bug was filed from the crash reporting server and is br-8157a899-4bef-46fb-8528-f7a3c1ddd3b6.
=========================================

STR

1. Insert - Table of Contents and Index - Insert Entry
2. In "Insert Entry" dialog, choose Index: User-Defined
3. Give any string for "Entry"
4. Press "Insert"
5. Place cursor on the inserted entry.
6. Execute  .uno:IndexMarkToIndex (Index Mark to Index)
   (you probably have to add it to a menu or toolbar or key shortcut from Tools - Customise)

CRASH

Also reproduced with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c41e872ed248f804249ecf4d65c4afc2e426e329
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 1 Stéphane Guillou (stragu) 2023-02-28 09:39:06 UTC
Confirmed crash with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 508a610808631bc292a8daf4f78bd8726b2d56be
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2023-02-28 11:01:42 UTC
Not reproduced in:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Reproduced in:

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 Stéphane Guillou (stragu) 2023-02-28 11:11:17 UTC
Bibisected with linux-64-7.1 repo to commit 6795676ae6d8a45cde4ba64b763d1f3baf2e5be0 which points to core commit:

commit 3b9aa11d885c91a3b040cb2b103b815c75d170bc
author	Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>	Sun Jul 05 02:20:52 2020 +0200
committer	Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>	Sun Jul 05 13:24:17 2020 +0200
tree 6d27ceaa5b4683214438523aacdd080f550c8893
parent 25c1a9be773fd3248463bdbd64c30140ac0d2406
GotoTOXMarkBase: SwIterator no more ...
Change-Id: I60935850596eeb7209bd84782c954919c02cb259
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98050

Björn, can you please have a look?
Comment 4 Commit Notification 2023-07-14 09:11:19 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

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

tdf#153866: Fix TOX crash

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 5 Commit Notification 2023-07-14 13:10:11 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/30933ad497fe0e8dd6af36721561706886ed0281

tdf#153866: Fix TOX crash

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 6 Commit Notification 2023-07-14 16:36:28 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/27c57627fcd28a8f533b535b37ec6376f1505e6f

tdf#153866: Fix TOX crash

It will be available in 7.6.0.2.

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 sdc.blanco 2023-07-15 16:43:10 UTC
I can now execute .uno:IndexMarkToIndex without a crash.

On the other hand, I cannot get this command to do anything.

But I do not know if the problem is that:
(a) "fix" has not restored intended functionality of "Index Mark to Index" or 
(b) I do not understand how to use the command or what it should do (because it is not documented).

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 693411e60c6bbd1c2ef25490cc3902f6b2461682
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 8 Stéphane Guillou (stragu) 2024-07-31 10:36:55 UTC
Created attachment 195621 [details]
sample ODT to test .uno:IndexMarkToIndex

In 7.1, I get the signature "SwTextFrame::MapViewToModel": https://crashreport.libreoffice.org/stats/crash_details/1f2b44e6-bf5a-4d63-90d7-2f4a055a03a9
In 7.2, 7.3 and 7.4, I get "SwTextFrame::MapViewToModel(o3tl::strong_int<int, Tag_TextFrameIndex>) const": https://crashreport.libreoffice.org/stats/crash_details/ceed0ab9-6a59-4f33-b0f0-6c2863b93d61

Crash is resolved in 7.6.7.2.

(In reply to sdc.blanco from comment #7)
> I can now execute .uno:IndexMarkToIndex without a crash.
> 
> On the other hand, I cannot get this command to do anything.
> 
> But I do not know if the problem is that:
> (a) "fix" has not restored intended functionality of "Index Mark to Index"
> or 
> (b) I do not understand how to use the command or what it should do (because
> it is not documented).
The command is a navigation feature that makes the cursor jump from the index entry in the text to the index, if it exists:

https://opengrok.libreoffice.org/xref/core/sw/inc/cmdid.h?r=913e26de#747

You can use the attachment to test it.

I tested it at the commit before 3b9aa11d885c91a3b040cb2b103b815c75d170bc, it works as expected: when cursor is in the index entry "test", running .uno:IndexMarkToIndex jumps to the index.

Since the crash is fixed, at 27c57627fcd28a8f533b535b37ec6376f1505e6f, it does not work.

Björn, do you think that might still be a side-effect of the same commit? Or something else might have broken it between 7.1 and 7.6?
Comment 9 Björn Michaelsen 2024-07-31 22:26:49 UTC
Not a crash anymore, adjusting importance.
Comment 10 Björn Michaelsen 2024-08-02 21:18:43 UTC
proposed patch: https://gerrit.libreoffice.org/c/core/+/171440
Comment 11 Commit Notification 2024-08-05 14:35:10 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

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

tdf#153866: fix .uno:IndexMarkToIndex

It will be available in 25.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 12 Commit Notification 2024-08-20 14:15:11 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/79d6953eddd08b22301798c58ad36cd39c127faf

tdf#153866: fix .uno:IndexMarkToIndex

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