Bug 101536 - New message "Document in use" when creating Table of contents
Summary: New message "Document in use" when creating Table of contents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.3 rc
Hardware: All Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.3.0 target:5.2.3
Keywords: bisected, regression
: 102918 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-15 08:43 UTC by ribotb
Modified: 2019-09-22 04:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Message "Document in use" (8.07 KB, image/png)
2016-08-15 08:43 UTC, ribotb
Details
English message (22.95 KB, image/jpeg)
2016-08-29 13:55 UTC, Pierre C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ribotb 2016-08-15 08:43:10 UTC
Created attachment 126838 [details]
Message "Document in use"

Hi,

In a new document or an existing document, if I want to create a table of contents (Insert > Table of contents and index), I obtain a message (never seen before v5.2) saying that the document is currently  in use. We have the choice between "Open read only", "Open", "Cancel". See the attachment (sorry, it is in french).

If we choose "Open read only" or "Open" the dialog box for creating a table of contents is displayed, and in both cases - even with "read only"  - we can create the table and save the document.

But if we choose "Cancel", LO freezes.

This message does not appear in 5.3.0 master.

I do not know if it is a coincidence but the entry "Table of contents" is not in the same place in v5.2 than in v5.1 and v5.3, in the list of the three entries in Insert > Table of contents and index 

Regards,
Bernard
Comment 1 Pierre C 2016-08-15 08:48:26 UTC
Confirmed on Windows 10 + LO 5.2.1.1 & Windows 7 x64 AND LO 5.2.0.3
Comment 2 Philippe Clément 2016-08-15 11:35:03 UTC
Confirmed too on Windows 7 x64 + LO 5.2.0.4
Comment 3 Ysabeau 2016-08-16 09:19:01 UTC
Confirmed: Windows 10 + LibreOffice 5.2.0.4 32 bits.
Comment 4 Cor Nouws 2016-08-22 08:50:22 UTC
Does not happen on Linux with Versie: 5.2.1.1 
Build ID: 2d75cf29e6d05e44c404f0547047f1da6563d380
CPU Threads: 4; Versie besturingssysteem:Linux 4.4; UI Render: standaard; 
Locale: nl-NL (nl_NL.UTF-8);
Comment 5 Pierre C 2016-08-29 09:44:30 UTC
This is a Windows specific bug. Still in LO 5.2.1.2
Comment 6 Pierre C 2016-08-29 13:55:20 UTC
Created attachment 127062 [details]
English message

Same problem with latest master LO under Windows 7 x64 29/08/2015
Error message in attachment
Of course I have no such a file "idxexample.odt"

It should help finding where this file-name is hard-coded
Comment 7 dany franck 2016-09-12 08:38:30 UTC
idxexample is the file used for the preview of the table of contents. No preview, no problem.
Comment 8 Michael Stahl (allotropia) 2016-09-20 15:49:43 UTC
5.2 creates a lock file, 5.1 didn't:

  share/template/common/internal/.~lock.idxexample.odt#

regression from:

commit 6a8407d82d71083c8bdec6a106ba9092a5196cbe
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Wed Jun 1 15:48:47 2016 +0200

    tdf#99827 sw: don't create AutoText dialog's preview doc ReadOnly
    
    Since commit 5334ff287c65f028753171c7b38da7ffbcebc1cc the framework
    refuses to create new documents as ReadOnly, so don't do that.


the difference is that the AutoText dialog wants a new document,
and this index one loads an existing one...

fixed on master
Comment 9 Commit Notification 2016-09-20 15:51:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b7faef01678573f7b060ad26798aa841689ce3e6

tdf#101536 sw: do load Insert Index dialog's document ReadOnly

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 ribotb 2016-09-21 07:42:30 UTC
Hi,

It's OK with :

Version: 5.3.0.0.alpha0+
Build ID: dec8da2a9aadbb6758ee76c30582bd8620a10ecb
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-21_04:46:24
Locale: fr-FR (fr_FR); Calc: group

Thank you,
Bernard
Comment 11 Commit Notification 2016-09-21 09:31:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e91e11d091a323d13b480a8bf995e1d70a0f8e89&h=libreoffice-5-2

tdf#101536 sw: do load Insert Index dialog's document ReadOnly

It will be available in 5.2.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Jean-Baptiste Faure 2016-10-02 19:00:20 UTC
*** Bug 102918 has been marked as a duplicate of this bug. ***