Download it now!
Bug 76930 - Creating an Index produces error message
Summary: Creating an Index produces error message
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.2.4 target:4.1.6
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-04-02 06:46 UTC by Winfried Donkers (retired)
Modified: 2015-01-24 14:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample writer document (10.79 KB, application/vnd.oasis.opendocument.text)
2014-04-02 07:58 UTC, Winfried Donkers (retired)
Details
main.xcd from 4.2.3.3 on Windows7 (1.32 MB, text/xml)
2014-04-09 11:11 UTC, Winfried Donkers (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Winfried Donkers (retired) 2014-04-02 06:46:47 UTC
Open new writer document, enter text with at least one index item.
menu Insert - Indexes and Tables - Indexes and Tables...

A message appears: File "internal/idxexample.sdw" not found in path "[paths]".

After Acknowledging this message the Index dialog appears.

AFAICS this bug doesn't harm anything, but is annoying and confusing for users.
Comment 1 sophie 2014-04-02 07:27:03 UTC
For information, I do not reproduce with Version: 4.2.3.2
Build ID: 7c5c769e412afd32da4d946d2cb0c8b0674e95e0 on Ubuntu 13.10.
Comment 2 Winfried Donkers (retired) 2014-04-02 07:58:48 UTC
Created attachment 96763 [details]
sample writer document

Attached document showed the error message when the index was created and also shows it when I remove the index and insert a new one.

Extra O/S information: Windows 7-64 professional, Dutch

I can't reproduce the problem on fairly recent master (5 days old) and openSUSE 13.1.
Comment 3 Winfried Donkers (retired) 2014-04-02 08:00:07 UTC
(In reply to comment #1)
> For information, I do not reproduce with Version: 4.2.3.2
> Build ID: 7c5c769e412afd32da4d946d2cb0c8b0674e95e0 on Ubuntu 13.10.

My build ID is identical, but O/S is not (see comment #2)
Comment 4 Michael Stahl (CIB) 2014-04-04 13:02:54 UTC
apparently it's from SwMultiTOXTabDialog sw/source/ui/index/cnttab.cxx

it's trying to open this file from the LO installation:

share/template/common/internal/idxexample.odt

Winfried, is that file missing from your installation?
Comment 5 Winfried Donkers (retired) 2014-04-04 15:06:30 UTC
(In reply to comment #4)
> apparently it's from SwMultiTOXTabDialog sw/source/ui/index/cnttab.cxx
> 
> it's trying to open this file from the LO installation:
> 
> share/template/common/internal/idxexample.odt
> 
> Winfried, is that file missing from your installation?

Michael,
My office machine (where it occurred) is inaccessible till Monday because of a server update. My answer will have to wait till then.

BTW, the installation was a standard download from libreoffice.org executed with install all over version 4.2.2.
Comment 6 Winfried Donkers (retired) 2014-04-07 06:30:39 UTC
(In reply to comment #4)
> apparently it's from SwMultiTOXTabDialog sw/source/ui/index/cnttab.cxx
> 
> it's trying to open this file from the LO installation:
> 
> share/template/common/internal/idxexample.odt
> 
> Winfried, is that file missing from your installation?

Michael,

share/template/common/internal/idxexample.odt is present on my machine; that file opens well and has version 45 in the document properties.
What surpries me is that an .sdw file is looked for, I thought that to be an obsolete file type by now.
Comment 7 Winfried Donkers (retired) 2014-04-07 07:10:30 UTC
Just downloaded and installed version 4.2.3.3 : same behaviour.
Comment 8 Michael Stahl (CIB) 2014-04-07 09:22:24 UTC
it works-for-me when installing 4.2.3.2 on windows...

can you try installing Process Monitor
http://technet.microsoft.com/de-de/sysinternals/bb896645.aspx
and check what files named "idxexample" are being opened,
and why it fails?
Comment 9 Winfried Donkers (retired) 2014-04-07 10:19:00 UTC
(In reply to comment #8)
> it works-for-me when installing 4.2.3.2 on windows...
> 
> can you try installing Process Monitor
> http://technet.microsoft.com/de-de/sysinternals/bb896645.aspx
> and check what files named "idxexample" are being opened,
> and why it fails?

With version 4.2.3.2 I had file share/template/common/internal/idxexample.odt, after installing 4.2.3.3 I did not, I missed directory share/template/common/internal/ and so don't have idxexample.odt in it.

Process Monitor tells (after a lot of digging in the countkless lines):
[...] 
C:\Program Files (x86)\LibreOffice 4\share\template\internal\idxexample.odt NO SUCH FILE
[...]
C:\Program Files (x86)\LibreOffice 4\share\template\internal\idxexample.sxw NO SUCH FILE
[...]
C:\Program Files (x86)\LibreOffice 4\share\template\internal\idxexample.sdw NO SUCH FILE

The installation I did this morning was a full install of 4.2.3.3 with all LibreOffice documents and the quickstarter closed.

Incidentely, I have a machine on my desk too, which has Windows 7 freshly installed and on which I installed LibreOffice 4.2.3.2 (none was installed before), full install: same behaviour.

Both machines have nl-NL UI and Dutch locale.
Comment 10 Winfried Donkers (retired) 2014-04-07 10:21:46 UTC
(In reply to comment #9)

Forgot to mention that the machine with the newly installed LibreOffice doesn't have directory C:\Program Files\LibreOffice 4\share/template/common/internal/ .
(It's Windows 7-32, my own machine has Windows 7-64 in VirtualBox.)
Comment 11 Michael Stahl (CIB) 2014-04-07 12:20:15 UTC
so... you say that in 4.2.3.2 you did have the file but it was still not opened?

what does Process Monitor show in that case?

(btw you can filter for pretty much anything in the Process Monitor UI,
click the icon that looks like funnel, best to filter on "Path" "ends with" ...)
Comment 12 Winfried Donkers (retired) 2014-04-08 07:02:18 UTC
(In reply to comment #11)
> so... you say that in 4.2.3.2 you did have the file but it was still not
> opened?
> 
> what does Process Monitor show in that case?
> 
> (btw you can filter for pretty much anything in the Process Monitor UI,
> click the icon that looks like funnel, best to filter on "Path" "ends with"
> ...)

No, that is not correct, we (soffice.exe and myself) did/do not look in the correct place ;-(. The file (idxexample.odt) _is_ present in 
  C:\Program Files\LibreOffice 4\share/template/common/internal/, but
soffice.exe looks in
  C:\Program Files\LibreOffice 4\share/template/internal/ (see copy/paste from Process Monitor in comment #0).
Now we are making progress :-)

I do have a machine (Windows XP) with version 4.0.4 available for tests. The behaviour when creating the index is the same. I changed the version in the bug report header.

BTW the error message reporting idxexample.sdw missing, should IMHO report that idxexample.odt is missing (and not mention an old-style file).

We work a lot with indexes, but mostly with documents created from a template, which already contains the index. Updating an index does not produce the error message. That's why we didn't notice the problem before.
Comment 13 Michael Stahl (CIB) 2014-04-08 19:56:55 UTC
(In reply to comment #12)
> No, that is not correct, we (soffice.exe and myself) did/do not look in the
> correct place ;-(. The file (idxexample.odt) _is_ present in 
>   C:\Program Files\LibreOffice 4\share/template/common/internal/, but
> soffice.exe looks in
>   C:\Program Files\LibreOffice 4\share/template/internal/ (see copy/paste
> from Process Monitor in comment #0).
> Now we are making progress :-)

so i found out that the line:
aOpt.SetTemplatePath(OUString(LIBO_SHARE_FOLDER "/template/common"));
is totally bogus and fortunately doesn't do anything,
and have removed it in d2a73cf32375608a93175a221c769d667140d073.

which means that actually dialog relies on the Template path in the configuration to include the "<INSTALLATIONROOT>/share/template/common"
path.

strangely the UI Tools->Options->LibreOffice->Paths->Templates
does not display the path for me, but it is there.

share/registry/main.xcd contains this:

      <group oor:name="Path">
          ...
          <prop oor:name="Template" oor:type="oor:string-list">
            <value>
              <it>$(insturl)/share/template/$(vlang)</it>
              <it>$(insturl)/share/template/common</it>
              <it>$(userurl)/template</it>
            </value>
          </prop>

...

          <prop oor:name="Template" oor:type="oor:string-list" oor:nillable="false">
            <value>
              <it>$(insturl)/share/template/$(vlang)</it>
              <it>$(insturl)/share/template/common</it>
              <it>$(userurl)/template</it>
            </value>
          </prop>

...

      <node oor:name="Template" oor:op="fuse" oor:mandatory="true">
        <node oor:name="InternalPaths">
          <node oor:name="$(insturl)/share/template/common" oor:op="fuse"/>
          <node oor:name="$(insturl)/share/template/$(vlang)" oor:op="fuse"/>
        </node>
        <prop oor:name="WritePath">
          <value>$(userurl)/template</value>
        </prop>
      </node>

(don't know which of these would be relevant)
does that look the same for you?

> BTW the error message reporting idxexample.sdw missing, should IMHO report
> that idxexample.odt is missing (and not mention an old-style file).

that is fixed already with commit 97b20c9deee46195357896197440cc1cc43d3452
Comment 14 Michael Stahl (CIB) 2014-04-08 19:59:57 UTC
oh i did write something in the CC: field yesterday on the assumption it's an installation problem :)
Comment 15 Winfried Donkers (retired) 2014-04-09 06:45:05 UTC
(In reply to comment #13)
> share/registry/main.xcd contains this:
> ...
> does that look the same for you?

The first 2 are the same, the third differs in that the line
         <node oor:name="$(insturl)/share/template/common" oor:op="fuse"/>
is missing in my main.xcd (I checked on one machine only).
Comment 16 Michael Stahl (CIB) 2014-04-09 10:11:23 UTC
actually i pasted a main.xcd from master... the one in my 4.2.3.2
installation on Linux and the 4.2.3.3 install on Windows
both look like yours in comment #15 i.e. no "$(insturl)/share/template/common"

so... why does that work for me then?

now _that_ is interesting:

commit 6f48d0bb2d3f3b4e4d3e46d3a5cdeaa552df1933
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Tue Feb 25 09:55:48 2014 +0000

    explictly list common lang-independant template dir
    
    Change-Id: I50d8efe46fc2eb3dfe615ad1f6eb7ee03cdcd29a

diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index 2ef605e..2a9eb5c 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -158,6 +158,7 @@
     </node>
     <node oor:name="Template" oor:op="fuse" oor:mandatory="true">
       <node oor:name="InternalPaths">
+        <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/template/common" oor:op="fuse"/>
         <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/template/$(vlang)" oor:op="fuse"/>
       </node>
       <!--
Comment 17 Caolán McNamara 2014-04-09 10:55:44 UTC
can we get your main.xcd attached here ?
Comment 18 Winfried Donkers (retired) 2014-04-09 11:11:09 UTC
Created attachment 97134 [details]
main.xcd from 4.2.3.3 on Windows7

as requested by Caolan.
Comment 19 Caolán McNamara 2014-04-09 13:45:18 UTC
That looks as I would expect, and now the user/registrymodifications.xcu ?

I can reproduce the problem in 4.2 if I edit the paths manually (in the case where I have permissions to change the shared paths) and remove the "common" entry
Comment 20 Caolán McNamara 2014-04-09 13:59:09 UTC
if I then cherry-pick the above "make common explicit" commit and build and restart the same 4-2 then it does seem to "just work" again
Comment 21 Commit Notification 2014-04-09 14:08:46 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

Resolves: fdo#76930 explictly list common lang-independant template dir


It will be available in LibreOffice 4.2.4.

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 22 Caolán McNamara 2014-04-09 14:09:11 UTC
fixed by this we think
Comment 23 Commit Notification 2014-04-09 14:19:45 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=277531b0e434d2a101fc89f54128af63cc8b2772&h=libreoffice-4-1

Resolves: fdo#76930 explictly list common lang-independant template dir


It will be available in LibreOffice 4.1.6.

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 24 Winfried Donkers (retired) 2014-04-10 06:29:51 UTC
(In reply to comment #19)
> That looks as I would expect, and now the user/registrymodifications.xcu ?
> 
> I can reproduce the problem in 4.2 if I edit the paths manually (in the case
> where I have permissions to change the shared paths) and remove the "common"
> entry

Caolán, I presume you don't need my user/registrymodifications.xcu anymore?

Caolán, Michael, thank you for your efforts :)
I will install a daily build soon and check and - I expect - set this bug report to fixed.
Comment 25 Winfried Donkers (retired) 2014-04-10 07:30:21 UTC
Can't properly test with daily build:
4.2.4.0.0 from April 9, 16:25 doesn't show the problem,
but neither does 4.2.4.0.0 from April 8.
Probably because it's a dev-build and not an installation as release(-candidate) builds.
I will test again when the first 4.2.4 release candidate appears.

(Meanwhile I've assigned this bug to Caolán to avoid confusing with triaging etc.)
Comment 26 Winfried Donkers (retired) 2014-04-22 06:46:39 UTC
Confirmed as fixed in version 4.2.4.1

Michael and Caolán, thank you for the fast fixing :-)