Bug 78580 - VIEWING: Linked images are not displayed when files are on read-only media (e.g. DVD)
Summary: VIEWING: Linked images are not displayed when files are on read-only media (e...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: Other Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 06:32 UTC by Ulrich Windl
Modified: 2016-05-27 20:42 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Here's the directory on DVD-R where the document and linked WMF files reside (55.11 KB, image/png)
2014-07-08 09:06 UTC, Ulrich Windl
Details
Screenshot showing the problem (missing images, marked yellow) (165.54 KB, image/png)
2014-07-08 09:07 UTC, Ulrich Windl
Details
Same result when I copied DVD content to hard disk (note different path) (186.53 KB, image/png)
2014-07-08 09:10 UTC, Ulrich Windl
Details
Properties of one example image (105.06 KB, image/png)
2014-07-08 09:11 UTC, Ulrich Windl
Details
Attempt to re-link the image (169.67 KB, image/png)
2014-07-08 09:12 UTC, Ulrich Windl
Details
Content ist shown in preview, but not in document! (104.89 KB, image/png)
2014-07-08 09:13 UTC, Ulrich Windl
Details
Finally, the same document (DVD) on WIndows/XP with LibreOffice 4.1 (249.46 KB, image/png)
2014-07-08 09:15 UTC, Ulrich Windl
Details
File properties for file on Hard disk (179.05 KB, image/jpeg)
2014-07-15 07:54 UTC, Ulrich Windl
Details
ISO image with test case (packed into ZIP archive) (38.65 KB, application/zip)
2014-08-11 06:19 UTC, Ulrich Windl
Details
Simple test case (103.09 KB, application/x-zip-compressed)
2016-04-18 07:01 UTC, Ulrich Windl
Details
Screenshots to compare (original file) (280.42 KB, image/jpeg)
2016-04-18 07:03 UTC, Ulrich Windl
Details
OpenOffice.org Writer 2.01 has no problems opening Sample.odt (102.54 KB, image/jpeg)
2016-05-02 06:07 UTC, Ulrich Windl
Details
Screenshot: OpenOffice 4.1.2 does not have the problem. (137.37 KB, image/jpeg)
2016-05-24 08:05 UTC, Ulrich Windl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2014-05-12 06:32:37 UTC
Linked (as opposed to embedded) images are not displayed when a document is opened read-only; instead placeholders with the URI are displayed. However when the same document is opened as "working copy", images are displayed correctly.
The document and images reside on a filesystem where the user has no change permissions (in case that matters).
Comment 1 Yousuf Philips (jay) (retired) 2014-05-29 00:36:08 UTC
Please provide instructions for creating a linked image or alternatively provide a document which has a linked image in it for us to test.
Comment 2 Ulrich Windl 2014-06-10 07:18:50 UTC
When trying to reproduce the problem with 4.2, I found it reproducible: Linked images were not displayed, but when I tried 4.1.6, the images were displayed correctly. The document and the images are on a DVD (files and directoriy R/O), and the same DVD was used on the same computer (4.2 runs on 64-bit Windows 7, 4.1 runs on 32-bit Windows/XP). For 4.2 when opening the image dialog's image URL, the file could be loacted and the preview was displayed. But after clicking "OK", the images still did not appear.
I can provide a series of screen shots showing the problem, but I cannot provide the sample document for legal reasons.
Comment 3 Yousuf Philips (jay) (retired) 2014-06-21 07:10:24 UTC
I tested creating a document with a linked image and set the file properties of both the document and image as read-only and was able to open it fine. Please send in screenshots so i can do some more testing.
Comment 4 Ulrich Windl 2014-07-08 09:04:35 UTC
Sorry for the delay; I'll add a series of screen shots demonstrating the problem.
Also, the problem still exists in 4.2.5.
Comment 5 Ulrich Windl 2014-07-08 09:06:09 UTC
Created attachment 102422 [details]
Here's the directory on DVD-R where the document and linked WMF files reside
Comment 6 Ulrich Windl 2014-07-08 09:07:07 UTC
Created attachment 102423 [details]
Screenshot showing the problem (missing images, marked yellow)
Comment 7 Ulrich Windl 2014-07-08 09:10:07 UTC
Created attachment 102424 [details]
Same result when I copied DVD content to hard disk (note different path)
Comment 8 Ulrich Windl 2014-07-08 09:11:39 UTC
Created attachment 102425 [details]
Properties of one example image

File name marked yellow for clarity.
Comment 9 Ulrich Windl 2014-07-08 09:12:46 UTC
Created attachment 102426 [details]
Attempt to re-link the image
Comment 10 Ulrich Windl 2014-07-08 09:13:59 UTC
Created attachment 102427 [details]
Content ist shown in preview, but not in document!
Comment 11 Ulrich Windl 2014-07-08 09:15:42 UTC
Created attachment 102428 [details]
Finally, the same document (DVD) on WIndows/XP with LibreOffice 4.1

Here the images are shown correctly.
Comment 12 Yousuf Philips (jay) (retired) 2014-07-08 16:54:00 UTC
After seeing attachment 102426 [details] and attachment 102427 [details], this reminded me of bug 80636. Can you send a screenshot of the properties dialog of one of the files when they are running on your computer and not the dvd.
Comment 13 Ulrich Windl 2014-07-09 06:10:52 UTC
(In reply to comment #12)
You mean the properties dialog for a linked image? You mean properties like in attachment 102424 [details], where the image still isn't displayed (after being copied to hard disk), or properties of a configuration that is actually displayed?
Comment 14 Yousuf Philips (jay) (retired) 2014-07-09 15:28:25 UTC
The file properties dialog that appears when you right-click on one of the files and select the last properties entry. Something like < http://www.jegsworks.com/lessons/words/report/dialog-fileproperties-general.gif >
Comment 15 Ulrich Windl 2014-07-15 07:54:48 UTC
Created attachment 102834 [details]
File properties for file on Hard disk
Comment 16 Yousuf Philips (jay) (retired) 2014-08-06 12:36:52 UTC
Needed to switch this back to unconfirmed as i hadnt confirmed it and dont seem to be able to do so.
Comment 17 Ulrich Windl 2014-08-06 13:34:26 UTC
(In reply to comment #16)
> Needed to switch this back to unconfirmed as i hadn't confirmed it and don't
> seem to be able to do so.

You had been asking for info (comment 12), and I provided the info (comment 13, comment 15). After that you say you lack info (comment 16). Personally I had thought about the possibility whether missing document fonts could trigger that; while trying to examine, I realized the problem described in bug 78186.
Comment 18 Yousuf Philips (jay) (retired) 2014-08-06 13:42:33 UTC
I hadnt said that i lack info, i said that i'm unable to confirm it, but hope someone else is able to do so.
Comment 19 Jacques Guilleron 2014-08-06 15:11:41 UTC
Hello Ulrich,

In your document, try:

Menu Edit > Select All
Menu Edit > Links
In this window, select all the links(clic on the first, Maj + clic on the last)
Select Break Link
Close the window.
All images are now displayed.

Does it work for you?

Jacques
Comment 20 Ulrich Windl 2014-08-08 06:46:11 UTC
(In reply to comment #19)
For some reason those items in the Edit menu are grayed out; even if I toggle the read-only button, or if I copy the ODT to the local hard disk.

Installing some missing fonts did not change a thing. However I realized that the machine has no Java installed, hope that's not the reason...
Comment 21 Jacques Guilleron 2014-08-08 07:24:21 UTC
Another point to verify:
Tools > Options > LibreOffice Writer > View
In Display, ensure that 
Graphics and objects is checked.

Next, see again in Edit menu if Links are available and break them.

regards,

Jacques
Comment 22 Ulrich Windl 2014-08-11 06:07:21 UTC
It seems the procedure in comment 19 was wrong: You can only select Edit->Links if exactly one image is selected (call it a bug if you like). Then you can select all links. However refreshing the links or breaking them did not change a thing.
And the setting suggested in comment 21 had already been effective.
Finally I had the idea to create a small ISO image to demonstrate the problem with a simple test case. I was amazed to find that the compressed ISO image needs less than 50kB, and I could reproduce the problem with it: In Windows/XP and LibreOffice 4.1.6 all images are displayed, while in Windows 7 and LibreOffice 4.2.6 no image is displayed. I hope someone can help to find the cause of the problem when providing the ISO image.
Comment 23 Ulrich Windl 2014-08-11 06:19:06 UTC
Created attachment 104409 [details]
ISO image with test case (packed into ZIP archive)

The test document has three linked images. Due to a mistake the first image is linked to the wrong path outside the ISO image (and cannot be displayed for that reason), but the other two images (WMF) should be displayed.
Comment 24 Buovjaga 2014-11-12 09:21:46 UTC
(In reply to Ulrich Windl from comment #23)
> Created attachment 104409 [details]
> ISO image with test case (packed into ZIP archive)
> 
> The test document has three linked images. Due to a mistake the first image
> is linked to the wrong path outside the ISO image (and cannot be displayed
> for that reason), but the other two images (WMF) should be displayed.

The two other images display for me just fine. Mounted the ISO on Windows and Ubuntu.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@42, Branch:master, Time: 2014-11-12_00:19:18

Ubuntu 14.10 64-bit Version: 4.4.0.0.alpha2+
Build ID: 1c526c9ddda5d52f7a4db5655a4ec60b8c62835c
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2014-11-11_23:20:41
Comment 25 Gordo 2015-05-26 16:34:44 UTC
I could not reproduce with either opening the document from the iso or copying the document out and fixing the links and changing it to read only.

I was going to say that perhaps the Images on/off got toggled in the View menu but that wasn't added as default until 4.4.  After 4.1 it was renamed from Graphics on/off to Images on/off.

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

4.3.6.2
4.2.8.2
4.1.6.2

@Ulrich
Can you try with a more recent version of LO?
Comment 26 Ulrich Windl 2015-06-05 06:04:48 UTC
I still could reproduce the problem with LO 4.3.7.2 on Windows 7: The images are not displayed, and there is NO idication that the link to the image is broken; they aren't just displayed. I tried to force a refresh, but that didn't help, also. Even when going to "edit mode" and doing some dummy change to the text, none of the images displayed. I also tried to tun images off and then back on, but that also did not make any difference.
Iff the problem is really gone in LO 4.4, there must have been some change to address this issue; if not I doubt it will suddenly work. Can't anybody else reproduce?
Comment 27 Jean-Baptiste Faure 2015-08-01 22:13:19 UTC
Not reproducible with LO 5.0.1.0+ built at home under Ubuntu 15.04 x86-64 with GCC 5.1

As it works on the PC with XP but not on the PC with W7, I think the problem is in the W7 installation, perhaps some missing library. Did you try to open the wmf pictures outside LibreOffice under W7 ?

Best regards. JBF
Comment 28 Ulrich Windl 2016-04-18 06:59:06 UTC
I haven't used linked images for a long time, but recently I found that this problem still exists in LibreOffice 5.0.5.2, and the problem seems independent of using a read-only media:
I had created a new document with linked images, and the document displayed OK. However after saving the document, closing Writer, and reopening the document, none of the images was displayed (This is nothing new to the state known).
However I found this interesting news: When selecting the whole document (that does not display the linked images) copying the contents, and the pasting it into a new text document, all the images display! However if I save that new document, and re-open it, the images don't display again!
Please raise the severity to "major" (I'm not allowed to do that).
Comment 29 Ulrich Windl 2016-04-18 07:01:16 UTC
Created attachment 124444 [details]
Simple test case

This simple test case contains a document with one linked image and the image. When opening it in LibreOffice 5.0.5.2 (Windows 7 SP1, 64bit), the image does not display. When I copy all the contents to a new test document, the image displays.
Comment 30 Ulrich Windl 2016-04-18 07:03:40 UTC
Created attachment 124445 [details]
Screenshots to compare (original file)

Here is a screenshot comparing both versions of the original document: Left the opened document after being saved (no images displayed with no reason given); right a new document with the contents of the left document pasted (images are displayed).
Comment 31 Buovjaga 2016-04-18 07:03:56 UTC
I guess it can be considered as a type of data loss.
Comment 32 Jean-Baptiste Faure 2016-04-28 04:28:41 UTC
Please, do not set to NEW your own bug report. Each one must be independently confirmed.
This bug report has never been confirmed, set status back to UNCONFIRMED.

Best regards. JBF
Comment 33 Jean-Baptiste Faure 2016-04-28 04:33:19 UTC
(In reply to Jean-Baptiste Faure from comment #32)
> Please, do not set to NEW your own bug report. Each one must be
> independently confirmed.
> This bug report has never been confirmed, set status back to UNCONFIRMED.
> 
> Best regards. JBF

Of course, not reproducible for me under Ubuntu 16.04 x86-64. Tested with LO 5.1.4.0.0+ and the master (next 5.2). 

Best regards. JBF
Comment 34 Ulrich Windl 2016-04-28 08:04:31 UTC
(In reply to Jean-Baptiste Faure from comment #33)
(...)
> Of course, not reproducible for me under Ubuntu 16.04 x86-64. Tested with LO
(...)

Why "Of course"?
Comment 35 Buovjaga 2016-04-28 08:45:53 UTC
(In reply to Ulrich Windl from comment #34)
> (In reply to Jean-Baptiste Faure from comment #33)
> (...)
> > Of course, not reproducible for me under Ubuntu 16.04 x86-64. Tested with LO
> (...)
> 
> Why "Of course"?

Because he tried already in 2015-08-01 and also implied by his setting this to unconfirmed. He didn't mean that not reproducing would be self-evident.
Comment 36 Jean-Baptiste Faure 2016-04-28 09:21:28 UTC
(In reply to Buovjaga from comment #35)
> (In reply to Ulrich Windl from comment #34)
> > (In reply to Jean-Baptiste Faure from comment #33)
> > (...)
> > > Of course, not reproducible for me under Ubuntu 16.04 x86-64. Tested with LO
> > (...)
> > 
> > Why "Of course"?
> 
> Because he tried already in 2015-08-01 and also implied by his setting this
> to unconfirmed. He didn't mean that not reproducing would be self-evident.

Indeed, in my comment #32 I forgot to add that I tested this bug report again. If I had reproduced the behavior described I would have set the status to NEW.

Best regards. JBF
Comment 37 Ulrich Windl 2016-04-28 14:27:21 UTC
(In reply to Buovjaga from comment #35)
> (In reply to Ulrich Windl from comment #34)
> > Why "Of course"?
> 
> Because he tried already in 2015-08-01 and also implied by his setting this
> to unconfirmed. He didn't mean that not reproducing would be self-evident.

But in comment 28 I indicated that the problem occurred in a newer version of LibreOffice, and I had provided a new simplified test case. As the problem actually exists (see attachment 124445 [details]), I wonder whether there is any type of quality assurance that can tell when the bug was introduced, and when it was fixed. Between the version reported first and the version reported last several updates were made.
I don't like the strategy: "Update today to see what we broke, and report tomorrow; repeat tomorrow. Maybe this helps fixing your problem."
Comment 38 Jean-Baptiste Faure 2016-04-28 14:58:07 UTC
Until the bug is independently confirmed there is no bug, then when it was introduced et when it has been fixed are irrelevant.

regression keyword set because it worked with LO 4.1.

Did you try with your anti-virus deactivated?

Best regards. JBF
Comment 39 Buovjaga 2016-04-28 15:17:38 UTC
(In reply to Ulrich Windl from comment #37)
> problem actually exists (see attachment 124445 [details]), I wonder whether
> there is any type of quality assurance that can tell when the bug was
> introduced, and when it was fixed. Between the version reported first and

Yes: https://wiki.documentfoundation.org/QA/Bibisect/Windows
Comment 40 Ulrich Windl 2016-04-29 06:44:48 UTC
(In reply to Jean-Baptiste Faure from comment #38)
> Did you try with your anti-virus deactivated?

On an installation with a virus scanner, the problem did not show, but the machine where the problem shows up does not have a virus scanner.
What would be the most plausible explanation that the images are not displayed on one machine, but when I copy and paste everything to a new document, the images are displayed? And when I save that document where the images are displayed, close it, and load it again, the images are not displayed again?
Could it be related to the settings of some image cache?
Comment 41 Ulrich Windl 2016-05-02 06:05:50 UTC
I can still 100% reproduce the problem. When running Writer under Sysinternal's ProcessMonitor, I see that Writer looks for Sample.jpg, but does not even try to open it! However when I paste the contents to a new document, Sample.jpg is opened! When I do not link the image, the image is also displayed.
Then I tried the oldest version of OpenOffice I could find (2.01), and I opened the sample document on the very same machine, and the document opened fine. I saved the document with OOo 2.01 and opened wit with 5.0.5.2, and the image isn't displayed.
To summarize: YOU BROKE IT. YOU BROKE IT. YOU BROKE IT. BELIEVE ME. BELIEVE ME BELIEVE ME.
Comment 42 Ulrich Windl 2016-05-02 06:07:05 UTC
Created attachment 124776 [details]
OpenOffice.org Writer 2.01 has no problems opening Sample.odt
Comment 43 Norbert Thiebaud 2016-05-02 07:36:23 UTC
(In reply to Ulrich Windl from comment #41)

> To summarize: YOU BROKE IT. YOU BROKE IT. YOU BROKE IT. BELIEVE ME. BELIEVE
> ME BELIEVE ME.

https://www.youtube.com/watch?v=z-5iCygFd9M
Comment 44 Ulrich Windl 2016-05-24 08:04:26 UTC Comment hidden (no-value)
Comment 45 Ulrich Windl 2016-05-24 08:05:27 UTC
Created attachment 125256 [details]
Screenshot: OpenOffice 4.1.2 does not have the problem.
Comment 46 Aron Budea 2016-05-25 07:44:32 UTC
Ulrich, please understand that several people here tried to reproduce the bug based on the details in this report, but failed so far. Your efforts at providing details are appreciated, but until it's reproduced, there's nothing we can do. How do you expect anyone to fix an issue if they can't make it appear?

Anyway, I found another setting that could result in images not being loaded, if this checkbox is checked: Tools -> Options -> LibreOffice -> Security -> Options -> Block any links from documents not among the trusted locations (see Macro Security).

If that doesn't help, I'm still not ruling out that it could be caused by some settings, and it seems no one else suggested clearing your LibreOffice user settings so far. However, what I would do instead is installing a separate instance of LibreOffice, and see what happens (it'll have default settings). Details are here: https://wiki.documentfoundation.org/QA/Triage_For_Beginners#Regression_Testing
(it doesn't have to be an old version, can be any you expect the bug to occur with)
Comment 47 Ulrich Windl 2016-05-25 08:03:10 UTC
(In reply to Aron Budea from comment #46)
> Anyway, I found another setting that could result in images not being
> loaded, if this checkbox is checked: Tools -> Options -> LibreOffice ->
> Security -> Options -> Block any links from documents not among the trusted
> locations (see Macro Security).

What I did is this: I renamed "LibreOffice" in C:\Users\myself\AppData\Roaming to "LibreOffice_", effectively wiping the defaults. Then I started LibreOffice and opened the sample document: The image displayed!

Then I changed the option above, and tried to open the sample document again: The image did not load!

Now the question is: If you open a document that has linked images, why are the images trusted less than the document (if both reside in the same location)?
Or the other way: Are embedded images more secure than linked ones?
Comment 48 Aron Budea 2016-05-25 22:02:53 UTC
(In reply to Ulrich Windl from comment #47)
> What I did is this: I renamed "LibreOffice" in
> C:\Users\myself\AppData\Roaming to "LibreOffice_", effectively wiping the
> defaults. Then I started LibreOffice and opened the sample document: The
> image displayed!
> 
> Then I changed the option above, and tried to open the sample document
> again: The image did not load!

So, does this mean a clear profile solved the issue for you? Can you also check what happens if you change the option after you copy back your original user data? (was it checked, and does unchecking it also make the images appear?)

> Now the question is: If you open a document that has linked images, why are
> the images trusted less than the document (if both reside in the same
> location)?
> Or the other way: Are embedded images more secure than linked ones?

It's somewhat more secure. If the linked content is in an unknown place, they can be more easily be replaced by attackers, while if it's in your document, they have to get hold of the document, tamper with it, and replace the original file (digitally signing the document can protect against that). I'm not sure how relevant it is for images in particular, it's more of a general basic security feature.
Comment 49 Ulrich Windl 2016-05-27 06:03:41 UTC
When I think about this bug, the main issue is the message "some liked images were not displayed due to security restrictions" does not display anywhere. ;-)
If it were, it would have been more obvious to the user and to the developers what actually had happened.
Comment 50 Aron Budea 2016-05-27 06:47:59 UTC
I agree. Thunderbird displays a similar warning when it blocks remote content (for a bit different reasons, see here: https://support.mozilla.org/en-US/kb/remote-content-in-messages ), something like that would be nice.
We can keep this bug report open about adding a message for the user.

Also, there's no mention of this setting in the help:
https://help.libreoffice.org/index.php?title=Common/Security&Language=en-US&System=WIN&Version=5.1#bm_id1976683
Comment 51 Yousuf Philips (jay) (retired) 2016-05-27 08:17:33 UTC
an infobar message to display when loading external content is suggested in bug 83665.
Comment 52 Aron Budea 2016-05-27 20:42:00 UTC
(In reply to Yousuf (Jay) Philips from comment #51)
> an infobar message to display when loading external content is suggested in
> bug 83665.

I didn't know about that, thanks! It has a great description of the different threats automatic loading can enable.
I opened a bug report on the documentation issue, bug 100096.

Finally, this bug report is getting closed as NOTABUG.