Bug 115039 - FILESAVE: to ODP/ODG: some of the draw:image tags are empty
Summary: FILESAVE: to ODP/ODG: some of the draw:image tags are empty
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 11:38 UTC by Simon Schmeisser
Modified: 2019-05-08 20:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Schmeisser 2018-01-16 11:38:07 UTC
During normal editing at some unknown point details about images are dropped in the written ODP file. In our example file there is the same picture on two subsequent slides. One gets saved as

<draw:frame draw:style-name="gr9" draw:text-style-name="P1" draw:layer="layout" svg:width="16cm" svg:height="10.667cm" svg:x="6.6cm" svg:y="8cm">
   <draw:image xlink:href="Pictures/10000201000004B300000322CD561078D6D62065.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad">
            <text:p/>
   </draw:image>
</draw:frame>

and on the next slide it's

<draw:frame draw:style-name="gr9" draw:text-style-name="P1" draw:layer="layout" svg:width="16cm" svg:height="10.667cm" svg:x="6.6cm" svg:y="8cm">
  <draw:image xlink:href="">
      <text:p/>
  </draw:image>
</draw:frame>

I will try to trim down the presentation to a minimal example and attach it later

Note: this is just an example, there are other places where an image is not repeated and still missing while other unrelated images remain.

I had the same issue in 2014 on my master thesis presentation, no fun! was running the version of Impress that was current on Fedora at that time. Now I'm on Ubuntu 16.04 with the version number given above
Comment 1 Xisco Faulí 2018-01-16 12:01:33 UTC Comment hidden (obsolete)
Comment 2 Simon Schmeisser 2018-01-16 12:58:38 UTC
I checked back with my coworker who encountered the bug and he actually runs 5.4.4.2 from LP-PPA-LibreOffice/Now

deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main
Comment 3 Simon Schmeisser 2018-01-17 10:13:12 UTC
Why did you change the version tag? I updated it to the version my coworker was using when the bug occurred ( 5.4.4.2 as stated in #2). I put in 5.1.6.2 solely because that is the version I use and which is distributed by Ubuntu 16.04. However I didn't know he had installed a newer version from PPA (as stated in #2)

Just read now that this field means earliest affected not latest reproduced, so then it should probably be 4.1. (the version used in fedora core 19 during my master thesis)
Comment 4 Buovjaga 2018-02-11 15:06:26 UTC
Yep, would be cool to get a minimal test case.
Comment 5 Xisco Faulí 2018-03-15 10:04:44 UTC
Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 6 Justin L 2018-08-24 08:54:13 UTC
We are running into the same problem using Draw (also using Linux), where images are "randomly" lost, but no particular pattern or rationale is observed. Similar to OP, there are a lot of duplicate pictures in these large (30+ page) documents. So unfortunately no unit test or "steps to reproduce" are available - but it happens VERY frequently (using LO 5.4 and now 6.0.6).

I tested a few different scenarios.
1.) insert an image into page1 and copy the entire page 4 times. Pictures folder contains a single picture. Deleting a page (tried first, last, middle) and reloading was fine.
2.) create a 4 page document, insert an image into page1, copy the image, and paste it into the remaining three pages. Pictures folder contains a single picture. Deleting a picture from one of the pages, and reloading was fine.
3.) create a 4 page document, and insert an the same image into each page separately using insert image (not copy paste). Pictures folder contains a single picture (that was unexpected!!).
4.) unzipped the file, deleted the picture from the pictures folder, and re-zipped into .odg. File opened without complaint, but images were lost. Upon saving, xlink:href="" exactly as indicated by OP.

Observations and conclusions:
A.) in our 30+ page document, some of the images are duplicated multiple times in the Pictures folder (at least 5 times in one case, under different ID names of course). So this is slightly inconsistent - I couldn't duplicate this because changing the filename or the file path of the to-be-imported file still resulted in a single picture instance.
B.) likely the image itself is irrelevant since sometimes one disappears and at a different time another will disappear.
C.) I expect that the root problem is that the image in the Pictures file is removed when still referenced elsewhere, either through corruption, or through document cleanup. The key will be to find a reproducable way to trigger this.
Comment 7 Buovjaga 2018-08-24 10:01:12 UTC
Justin: if it happens very frequently, is there a chance you could test with master? Hopefully this work will have fixed the problem: https://tomazvajngerl.blogspot.com/2018/01/improving-image-handling-in-libreoffice.html
Comment 8 Justin L 2018-08-24 19:00:37 UTC
I should note that crashing may be related to this - which would make a lot of sense as a cause of missing pictures - however the last communication from her makes it sound as if no crashes had occurred but the problem was still seen when "I made some changes in one doc, reducing the number of pages, which caused some icons to vanish". Unfortunately, as I mentioned earlier, we can't recreate this on-demand yet.
Comment 9 Justin L 2018-09-01 06:30:10 UTC
attachment 144412 [details] from bug 119479 is one of the documents I was using to do my testing in comment 6. It doesn't really qualify for the NEEDINFO request though since the procedure to lose the images is unknown still.
Comment 10 QA Administrators 2019-03-21 11:11:34 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2019-05-08 20:36:22 UTC
Dear Simon Schmeisser,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp