I can now create the "disappearing images" fault every time I test it.
The problem is almost certainly caused by the Tools > Options > OpenOffice > Memory > Graphics cache settings and by AOO's failure to handle things gracefully when these settings' values are exceeded. To reproduce it, just drag lots of photos into an odt file without saving it, and sooner or later Writer will crash/hang and lose some or all of the photos. Note this is exactly what ribbony reported - he was pulling lots of images into his document.
Steps to reproduce are:
1 Create an odt file. Insert a table with 60 or 70 rows - it makes it easy to drag in and position the photos. By default, the table rows are set to autoheight so they adjust to the picture size. Do not save the odt file - leave it as Untitled.odt
2 Open a folder of photos. I used 14 megapixel JPG photos, where each JPG was about 5MB. They
must be different photos - AOO recognises if an image is repeated and only stores one copy of it. The JPG files were stored as 5MB JPG files in the odt file.
3 Drag photo 1 to row 1 in the document. The row height adjusts to the picture height.
4 Repeat, dragging photo 2 to row 2, photo 3 to row 3 etc.
5 After I got to 26 photos inserted, when I dragged photo 27 into the table it did not go. Instead, the Insert Section window popped up and the photo could not be placed in the odt file. After several repeated tries - in other words, after a delay - the photo went in OK.
6 as I dragged more photos into the odt, the Insert sections window came up more and more frequently.
7 I was watching the memory usage with TaskManager - the memory was climbing to 2.5 to 3GB used (Out of 4GB).
8 When I got to about 70 photos, AOO hanged, "greyed out", and I got the hourglass. I left it and after a few minutes AOO closed OK, but the file needed recovering.
9 untitled.odt was only about 150MB - much too small as 70 x 5 MB = 350 MB. When I opened it, Navigator showed that images 1 - 26 (apart from 6!) were missing - note the Insert Section I got at Photo 27 in step 5 above. The odt file was very flaky and kept crashing.
10 On my first test, I was not interrupted, and I only got to about 30 photos before Writer hanged. The recovered file had the table, but no photos.
11 On my second test, I was interrupted by a phone call, and got to about 70 photos before Writer hanged. Note that there is a "Remove from memory after" setting which I have set to 10 minutes - it might have come into play.
12 I then repeated the test, saving after 15 photos, and intending to save after 30 photos. But when I got to 29 photos, I got the Insert sections pop-up window and the photo would not go in. I waited, and it went in, but Writer then hanged and the file recovered, but then crashed immediately.
13 I then repeated the test, but saving after every 10 photos. I now never got the Insert Section pop-up window and I carried on and place 73 photos in the odt file. When I saved it was now taking a long time - 45 seconds for the "blue squares" to run across the bottom of the screen. However, Writer was unresponsive for a further 45 or 50 seconds after the blue squares had stopped. AFter that it was fine and accepted more photos. The final odt file was 355MB and saved OK, but Writer crashed when I opened it. I hadn't run out of memory - I was only using 3 GB of my 4 GB. I recovered it and Navigator showed it had 73 images in it (as expected 73 x 5 MB = 365 MB) but each was showing the "empty box with Read error" and no images were showing. This was strange as all the images were in the odt file and when I unzipped the odt, each image was properly saved. The problem is therefore not with the images themselves, but with calling them. I have posted content.xml below.
Edit: I then extracted all the saved images from the ODT file and resampled them to half their size. As the default Quality Factor was only 85% on re-sampling, this reduced each JPG to about 600 kB, or about 52 MB in total. I re-inserted the smaller files back into the ODT file - it was then only 49 MB. The ODT now opened and saved OK, suggesting it was the large size of the individual photos causing the difficulty in opening/saving the original 355 MB ODT file. |
So, it seems the basic problem is something to do with dragging in lots of images and/or not saving the file regularly and/or something to do with the Graphics Cache settings. I don't know whether the settings can be adjusted to prevent it as presumably, if you "double" the settings values, the same thing will happen after twice as many photos. At least the developers should be able to reproduce this.
Note That while I suspected that these settings might be behind this problem (see my earlier post) I was prompted to do these tests by reading the bug report Bill posted which says:
I think I found a workaround for this problem, maybe even a way to reproduce the error on other machines where that has been unsuccessful so far.
For me the problem occurred when my document reached around 80 pages with about 70 embedded images, 50 of which I had added since I saved the last time. The bug vanished after I changed the memory settings in OOo under Extras -> Options -> Memory (freely translated from German). There I increased the image cache size from 20 to 200 MB, the number of objects from 20 to 200, the "remove after" time to 1 hour and possibly the memory per object to 5,2 MB. So far the error has not since appeared again. It was even possible to add more pages and images compared to when the bug first materialized.
For those who were unable to reproduce the bug, have you tried decreasing the image cache size, etc?
I'm running OOo 3.1.1 (OOO310m19, build 9420) on Windows XP Home 32-bit with 3GB RAM.