Bug 88935 - Linked images - read error, flickering, freeze
Summary: Linked images - read error, flickering, freeze
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:4.5.0
Keywords: regression
: 89137 (view as bug list)
Depends on:
Blocks: mab4.4
  Show dependency treegraph
 
Reported: 2015-01-30 10:43 UTC by Nicolo
Modified: 2015-12-15 22:24 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Flickering Image frame (16.23 KB, image/png)
2015-01-30 10:43 UTC, Nicolo
Details
sample document and image for flickering behavior (211.37 KB, application/zip)
2015-01-31 16:12 UTC, thomas.gimpel
Details
MS Stacktrace of mini-dump during thrash (5.69 KB, text/plain)
2015-01-31 23:22 UTC, V Stuart Foote
Details
sample document using remote linked with URL images (31.65 KB, application/vnd.oasis.opendocument.text)
2015-02-11 13:36 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolo 2015-01-30 10:43:28 UTC
Created attachment 112948 [details]
Flickering Image frame

I always use linked images. They are on the local drive. When scrolling within the document, sooner or later it happens the image-frames begin flickering alternate showing 'Read error' and the path. The document freezes (see attached image). No chance to continue. I have to kill the swriter-process. Most of time this happens at the moment moving between the pages. 

Note that i use an exclamation mark within the path. With 4.3.5 and earlier i didn't experience this problem, also with documents containing a lot of images.

I can't provide a document to reproduce. Asuming it should contain several linked images including caption-frame to raise the problem.
Comment 1 V Stuart Foote 2015-01-30 15:33:22 UTC
@Nicolo, *,

Kind of a minimal issue report. We are going to need to know what Windows OS and locale, what GPU are your using,  what GPU settings (Options -> View -> Graphics output) you've selected for LibreOffice, what graphic image formats you are linking and having issues with.

Sorry but please we need you to provide a test case of some sort (4 to 5 page Writer document, and a dozen junk images linked and captioned).  Verify that it is also is actually having the issues with your configuration, and then zip it up and post as an attachment.

The test case is going to be needed to allow consistent attempts to reproduce under different OS and GPU configurations.

Thanks!
Comment 2 Nicolo 2015-01-31 15:56:19 UTC
Specifications: Windows 7 Professional, Service Pack 1, locale Swiss German, Graphics card NVIDIA GeoForce GTX 650, 8 GB RAM, Intel Core i7 CPU.

All images within the document are linked. They are within the attached zip-file, subdirectory 'Abbildungen'. Majority jpg, some png. The error happens casualy, it's not a specific image. Scroll down and up, at the beginning the images display correct. Sometimes, when swiching between pages, the flickering starts as described in my first post.

View.. Graphics Output: 
- Use hardware acceleration: yes
- Use anti-aliasing: yes
- Use OpenGL for all rendering: no
- Force OpenGL even if blacklisted..:no

The problem occours often and soon with the sample document.
Please download the sample document with images-subdirectory here (21 MB):
https://app.box.com/s/iuxs9b8uj4h9053gdtt397homtv65qis

Thanks a lot for your efforts. Looking forward to the investigation results.

Kind regards
Nicolo
Comment 3 thomas.gimpel 2015-01-31 16:12:08 UTC
Created attachment 113000 [details]
sample document and image for flickering behavior

This is a sample document to reproduce the bug on a MacBook Air (Intel HD Graphics 3000 384 MB, OS X 10.9.5 (13F34)).
The flickering stops as soon you click on an image. Once you start scrolling it starts again flickering. With only one linked image you can also see a temporary error message on each new position when scrolling the document. It seems that the linked images get reloaded every time for each new scroll position. What a waste of CPU time!

Regards
Thomas
Comment 4 Bo Siltberg 2015-01-31 19:22:16 UTC
Just a note that I also have this very same error. And it is a show stopper preventing me from migrating from Apache OpenOffice.
Comment 5 V Stuart Foote 2015-01-31 23:22:50 UTC
Created attachment 113009 [details]
MS Stacktrace of mini-dump during thrash

Confirming

On Windows 7 sp1, 64-bit en-US 12 GB Ram with nVidia GTX-260 and 2GB vRam 
Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: en_US

with default memory/cache settings

First couple pages/images load, then scrolling of document triggers issue of multiple Read-Error and file:///xxxxx links pairs being drawn to into the image frame.

StackTrace attached of MS Minidump during race condition.

sfxlo!SvFileObject::GetGraphic_Impl
vcllo!GraphicFilter::ImportGraphic

and then hangs for JPEG reader.
Comment 6 V Stuart Foote 2015-02-02 04:53:08 UTC
Also present on Linux 64-bit (Fedora 20), although it seems a bit more robust than Windows and allows further scrolling within the test document and linked files. Scrolling up and down in the document will eventually trigger the Read Error -- Path cycling--but with Linux able to scroll away and then back onto the page.

Version: 4.5.0.0.alpha0+
Build ID: d1c9bd13ec7af93f5368dfda6d6d3c955f0b0816
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-28_01:15:30
Locale: en_US

Adding to 4.4 MAB
Comment 7 blargh 2015-02-03 11:21:42 UTC
Confirmed on LibreOffice 4.4.0.3 (Windows 7 sp1, 64-bit)
It happens (at least) with .svg, .jpg, and .png images.
Comment 8 blargh 2015-02-03 11:24:54 UTC
(In reply to blargh from comment #7)
> Confirmed on LibreOffice 4.4.0.3 (Windows 7 sp1, 64-bit)
> It happens (at least) with .svg, .jpg, and .png images.

Graphics Output: 
 - Use hardware acceleration: yes
 - Use anti-aliasing: yes
 - Use OpenGL for all rendering: no
 - Force OpenGL even if blacklisted (...):no
Comment 9 mace 2015-02-10 12:46:01 UTC
Same here:
Ubuntu 14.04
NVIDIA binary driver 331.113
Version 4.4.0.3
happens with .png
regression from 4.3
Comment 10 mace 2015-02-10 14:01:31 UTC
Using Page Up and Page Down instead of scrolling with the mouse is a temporary workaround for me.
Comment 11 blargh 2015-02-11 08:16:59 UTC
(In reply to mace from comment #10)
> Using Page Up and Page Down instead of scrolling with the mouse is a
> temporary workaround for me.

In Windows, this doesn't work. The document just becomes unusable after a couple of figures are loaded.
Back to 4.3 for me..
Comment 12 blargh 2015-02-11 08:23:32 UTC
This seems like the same issue: https://bugs.documentfoundation.org//show_bug.cgi?id=89137
Comment 13 V Stuart Foote 2015-02-11 13:09:34 UTC
*** Bug 89137 has been marked as a duplicate of this bug. ***
Comment 14 V Stuart Foote 2015-02-11 13:15:25 UTC
Seems to also manifest with remotely linked--by URL--images.
Comment 15 V Stuart Foote 2015-02-11 13:36:51 UTC
Created attachment 113309 [details]
sample document using remote linked with URL images

Not just locally linked images, remote linked images also manifest this issue.
Comment 16 V Stuart Foote 2015-02-11 17:09:55 UTC
So, this issue has been present in builds of master through 20150208. But it seems to be resolved with TB62 20150210 builds of master onward. The 20150208 TB62 build was still bad.

So, http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=62969accf9c01b71b738424d4d643db8bfaed182..233da237ad4b593c945903c3b32185a540025516

Are these two commits responsible? Serendipity, or were they targeted at this?
 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c7e907f58f8d0791ee304b42de769f43102522e9

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

Could others confirm the fix? Especially on more complex documents with linked images that had been failing.
Comment 17 V Stuart Foote 2015-02-11 18:49:07 UTC
The "svtool/GraphicManager: properly decrease mnUsedSize on unregister ops" patch was already pushed down to 4.4 and is in TBs for 4.4.2 already.

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

And, things seem well behaved with documents with linked images on at this point with Version: 4.4.2.0.0+
Build ID: dd53735c5fe98fa4f8da4bf214a04b7883bf73c8
TinderBox: Win-x86@42, Branch:libreoffice-4-4, Time: 2015-02-11_15:55:36
Locale: en_US

But should the "sw: avoid temporary object creation to build GraphicPrimitive2D" be cherrypicked down to 4.4 as well?
Comment 18 Tamás Zolnai 2015-02-11 22:07:36 UTC
(In reply to V Stuart Foote from comment #17)
> The "svtool/GraphicManager: properly decrease mnUsedSize on unregister ops"
> patch was already pushed down to 4.4 and is in TBs for 4.4.2 already.

This patch fixes a performance regression related to image loading so it seemed a good idea to backport and it might fix this bug (so verification would be appreciated).


> But should the "sw: avoid temporary object creation to build
> GraphicPrimitive2D" be cherrypicked down to 4.4 as well?

This other change also improves the performance, but by default we backports
only bug fixes, so if this one has no visible effect, then I would not cherry
pick it.
Comment 19 V Stuart Foote 2015-02-12 01:32:18 UTC
Tested on Windows 7 sp1, 64-bit en-US--against comment 2's 40 page .ODT with multiple local linked files with Version: 4.5.0.0.alpha0+
Build ID: 40b1e8266e47792d354cd457c652bfb0f0a21e69
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-11_00:13:43
Locale: en_US

and also with Version: 4.4.2.0.0+
Build ID: dd53735c5fe98fa4f8da4bf214a04b7883bf73c8
TinderBox: Win-x86@42, Branch:libreoffice-4-4, Time: 2015-02-11_15:55:36
Locale: en_US

which does not have the "sw: avoid temporary object creation to build GraphicPrimitive2D"; it seems fully functional now with just the "svtool/GraphicManager: properly decrease mnUsedSize on unregister ops" patch.

Setting resolved, but if folks discover a specific case that continues to cause issue please reopen.
Comment 20 Nicolo 2015-02-12 05:11:48 UTC
Version: 4.4.2.0.0+
Build ID: dd53735c5fe98fa4f8da4bf214a04b7883bf73c8
Same environment: https://bugs.documentfoundation.org/show_bug.cgi?id=88935#c2

Tried around with the file i submitted in the 2nd comment. Now it behaves like version 4.3.6.x. Scrolling up and down the appearing image-frame shortly shows the 'Read error' before the image loads. One time it flickered again, but no freezing - could continue without closing the file.

So it's fixed, but the showing up 'Read error' isn't trustworthy. 

Thank's for the efforts.
Comment 21 V Stuart Foote 2015-02-12 05:51:19 UTC
(In reply to Nicolo from comment #20)
> Version: 4.4.2.0.0+
> Build ID: dd53735c5fe98fa4f8da4bf214a04b7883bf73c8
> Same environment:
> https://bugs.documentfoundation.org/show_bug.cgi?id=88935#c2
> 
> Tried around with the file i submitted in the 2nd comment. Now it behaves
> like version 4.3.6.x. Scrolling up and down the appearing image-frame
> shortly shows the 'Read error' before the image loads. One time it flickered
> again, but no freezing - could continue without closing the file.
> 

Great! Thank you for verifying.

> So it's fixed, but the showing up 'Read error' isn't trustworthy. 

Yes, I see it also, but I don't believe the "Read error" message has ever been more than a nuisance. Since the image is linked, believe it fails with "Read error" message once on screen paint, before processing the link to locate the image.
Comment 22 Commit Notification 2015-02-22 13:51:15 UTC
Zolnai Tamás committed a patch related to this issue.
It has been pushed to "master":

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

Test for tdf#88935

It will be available in 4.5.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 23 blargh 2015-03-24 09:28:06 UTC
(In reply to Commit Notification from comment #22)
> Zolnai Tamás committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=908c060ceef81a733cf1d1912b48f5d499afdad8
> 
> Test for tdf#88935
> 
> It will be available in 4.5.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.

Thank you Zolnai!
Will version 4.4 be patched?
Comment 24 Tamás Zolnai 2015-03-24 17:57:11 UTC
(In reply to blargh from comment #23)
> (In reply to Commit Notification from comment #22)
> > Zolnai Tamás committed a patch related to this issue.
> > It has been pushed to "master":
> > 
> > http://cgit.freedesktop.org/libreoffice/core/commit/
> > ?id=908c060ceef81a733cf1d1912b48f5d499afdad8
> > 
> > Test for tdf#88935
> > 
> > It will be available in 4.5.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.

This patch adds only a test case to avoid the same issue in the future.
The bugfix is already in 4.4.2.
Comment 25 blargh 2015-03-25 07:52:29 UTC
(In reply to Zolnai Tamás from comment #24)
> (In reply to blargh from comment #23)
> > (In reply to Commit Notification from comment #22)
> > > Zolnai Tamás committed a patch related to this issue.
> > > It has been pushed to "master":
> > > 
> > > http://cgit.freedesktop.org/libreoffice/core/commit/
> > > ?id=908c060ceef81a733cf1d1912b48f5d499afdad8
> > > 
> > > Test for tdf#88935
> > > 
> > > It will be available in 4.5.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.
> 
> This patch adds only a test case to avoid the same issue in the future.
> The bugfix is already in 4.4.2.

Perfect! Many thanks!
pedro
Comment 26 Nicolo 2015-07-02 04:11:38 UTC
As mentioned in comment #20 and confirmed by further comments the 'Read Error' message showing up shortly was 'always there'. But i experience reguarly that the 'Read Error' stays longer and the CPU gets more and more occupied. Some times Writer is blocked for some seconds, or longer, then the menu is available again. Yesterday it was for longer and the CPU was getting hot. Writer didn't freeze completely anymore since this bug was closed, but the basically the problem seems still to be there. It happens regularly with documents containing linked images.

My specs are described in comment #2 (with always the latest Development Versions of LibreOffice and now with 4.4.4.3) and there is also a link to sample document.

Kind regards
Comment 27 tommy27 2015-07-02 04:42:41 UTC
@Nicolo
please do not change version...
as written below the version field (even it seems nobody pays attention to it) it has to indicate EARLIEST AFFECTED not LATEST affected so I revert it to 4.4.0.3

as the whiteboard indicate the target is 4.5.0 (now called 5.0.0) so there's no surprise you still see the bug in the 4.4.4.3 release since the fix it's only in the 5.0.x branch

did you effectively test the 5.0.0.2 RC release?

if some kind of problems persist in that release I suggest to open a clean new report about that and put the current one under "see also"

it's always better to open a new one instead of reopening an old fixed issue with lot of comments, expecially when the bug evolved and is not exactly the same as in the original report

so reverting status to RESOLVED FIXED
Comment 28 tommy27 2015-07-02 04:47:11 UTC
(In reply to tommy27 from comment #27)
> ...
> 
> as the whiteboard indicate the target is 4.5.0 (now called 5.0.0) so there's
> no surprise you still see the bug in the 4.4.4.3 release since the fix it's
> only in the 5.0.x branch
> 
....

sorry, did not notice that the 4.5.0 target indicated a testcase and that the fix was already present in 4.4.2

anyway I still think you should open a new report about residual issues to avoid further confusion.
Comment 29 Robinson Tryon (qubit) 2015-12-15 22:24:16 UTC
Migrating Whiteboard tags to Keywords: (regression)
[NinjaEdit]