Bug 146132 - Image is not shown in the attached ODT file
Summary: Image is not shown in the attached ODT file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-12-08 16:19 UTC by Kevin Suo
Modified: 2021-12-24 07:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test odt file (820.75 KB, application/vnd.oasis.opendocument.text)
2021-12-08 16:19 UTC, Kevin Suo
Details
screenshot (247.55 KB, image/png)
2021-12-08 16:26 UTC, Kevin Suo
Details
test odt file 2 (25.92 KB, application/vnd.oasis.opendocument.text)
2021-12-10 07:46 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2021-12-08 16:19:23 UTC
Created attachment 176810 [details]
test odt file

Steps to Reproduce:
1. Open the attached ODT file.
2. Go to the image on page 5 (i.e., the one above the text "In the above example the pop-up is used to search for the available recalculate options").

Current Result:
Blank.

Expected Result:
There is an image in the caption box.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 16072fc3eaf222d59e7bf156174f49d829b79e86
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.4-CN
Calc: threaded
Comment 1 Kevin Suo 2021-12-08 16:23:56 UTC Comment hidden (obsolete)
Comment 2 Kevin Suo 2021-12-08 16:26:01 UTC
Created attachment 176811 [details]
screenshot
Comment 3 Kevin Suo 2021-12-08 16:27:07 UTC
Bibisected and bisected to:

commit fe6a140a537eda1b6703c44ff5ee49d2ba875b81
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Tue Dec 7 14:55:13 2021 +0200

    used cache value in ViewObjectContact::getPrimitive2DSequence

Adding Noel Grandin to cc: would you please take a look?

I was editing this document with the current master, then I found I can not paste my screenshot to that caption box, the image is shown blank. Then I opened the document with older versions and it looks fine, the image is there.
Comment 4 Commit Notification 2021-12-09 17:01:05 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/681e10eecf67a1a01bdec2cc9b834e0345e25206

tdf#146137 tdf#146132 image redrawing

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Kevin Suo 2021-12-10 07:46:55 UTC
Created attachment 176841 [details]
test odt file 2

There is still a problem:
1. Open the attached test odt file 2;
2. Hit ENTER to insert many blank paragraphs before the image, to force the image to appear on the 2nd page.

-> Image becomes invisible.
Comment 6 Kevin Suo 2021-12-10 07:48:59 UTC
(In reply to Kevin Suo from comment #5)

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 8409df4a29857acefb6e7d7d6f33e1011a65b070
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.4-CN
Calc: threaded
Comment 7 Kevin Suo 2021-12-10 07:54:08 UTC
Also, upon fileopen the image is only showing half part. Hit ENTER will bring it back to full, 

but now if you resize the window, or switch to another window and then come back to the Writer window again, the image will again show only part of itself.
Comment 8 Noel Grandin 2021-12-17 08:59:00 UTC
further issues fixed by
  https://gerrit.libreoffice.org/c/core/+/126995
Comment 9 Kevin Suo 2021-12-17 09:28:48 UTC
(In reply to Noel Grandin from comment #8)

> but now if you resize the window, the image will again show only part of itself.

Thank you. But I still reproduce *this* one with your patch. (I am in Fedora 34, gtk3, Wayland)
Comment 10 Telesto 2021-12-17 10:09:27 UTC
(In reply to Kevin Suo from comment #9)
> (In reply to Noel Grandin from comment #8)
> 
> > but now if you resize the window, the image will again show only part of itself.
> 
> Thank you. But I still reproduce *this* one with your patch. (I am in Fedora
> 34, gtk3, Wayland)

Not sure if this being the cause: bug 146272
Comment 11 Commit Notification 2021-12-17 10:22:13 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b33a4d3c4acc37b9284c611caaaa661d2fe34db8

fix for crash converting ooo31011-1.sxw and tdf#146132

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Kevin Suo 2021-12-19 00:16:37 UTC
> Not sure if this being the cause: bug 146272

No, the one I described in comment 9 started from the following commit and only appears on master branch:

commit fe6a140a537eda1b6703c44ff5ee49d2ba875b81
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Tue Dec 7 14:55:13 2021 +0200

    used cache value in ViewObjectContact::getPrimitive2DSequence

where as the one in 146272 started much earlier as per your bisect.
Comment 13 Michael Stahl (allotropia) 2021-12-23 18:52:05 UTC
try this document https://bugs.documentfoundation.org/attachment.cgi?id=165730

zoom in & out, scroll up & down and watch images being painted with an offset from where they should be, or truncated in some cases
Comment 14 Noel Grandin 2021-12-23 19:48:27 UTC
fix here
   https://gerrit.libreoffice.org/c/core/+/127389
Comment 15 Commit Notification 2021-12-24 07:22:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5e6d6be86bf29896e030af5c0f770f2b389d7e8a

tdf#146132 tdf#146327 tdf#146330

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.