Bug 133201 - Linked Image: updating changed path does not make the image visible again; object lost after reopen
Summary: Linked Image: updating changed path does not make the image visible again; ob...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.6.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, dataLoss, regression
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2020-05-20 18:05 UTC by Robert Großkopf
Modified: 2023-12-22 10:10 UTC (History)
6 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 Robert Großkopf 2020-05-20 18:05:47 UTC
Open a new Writer file.
Insert a image with Insert → Image → Insert As Link.
A warning appears while inserting but it works.
Save the file.
Close the file.

Move the file to another location.
Open the file.
Mark the frame for the image, which can't show the image, because the path is wrong.
Open Properties → Image and set the link to the file again.
You could see it in the dialog, but the image doesn't appear in the document.

This bug appears in LO 6.4.4.2 on OpenSUSE 15.1 64bit rpm Linux.
This bug doesn't appear with LO 6.3.5.2, also doesn't appear with LO 6.4.2.2
It first appears here with LO 6.4.3.2
Comment 1 Dieter 2020-05-24 06:19:21 UTC
I confirm it with

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 0e5e935deb0527c64865cfcc53a0421e56b74b6f
CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

and it works with

Version: 6.3.5.2 (x64)
Build-ID: dd0751754f11728f69b42ee2af66670068624673
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 2 Buovjaga 2020-06-14 13:50:05 UTC
Bibisected with Linux 6.5 repo to https://git.libreoffice.org/core/+/30b23d77c894bdf6f7ae0d18d594ea267a80f662%5E!/
tdf#131185 Prevent unnecessary SwapIn calls.

Adding Cc: to Gülşah Köse
Comment 3 Gülşah Köse 2021-03-05 15:30:34 UTC
I can not reproduce this


(In reply to Robert Großkopf from comment #0)
> Open a new Writer file.
> Insert a image with Insert → Image → Insert As Link.
> A warning appears while inserting but it works.

Which button did you click here. "Embed graphic" or "Keep Link"

> Save the file.
In which format did you save?

> Close the file.
> 
> Move the file to another location.
Did you move x.odt or image somewhere else?
Comment 4 Aron Budea 2021-03-05 16:37:41 UTC
Reproducible for me in LO 7.2.0.0.alpha0+ (94283af977246c70dbed4452d197b003d8bb14b9) / Ubuntu.

(In reply to Gülşah Köse from comment #3)
> Which button did you click here. "Embed graphic" or "Keep Link"
I chose Keep Link.

> > Save the file.
> In which format did you save?
In ODT.

> > Move the file to another location.
> Did you move x.odt or image somewhere else?
Move the image.
Then when reopening the file, only its empty frame is shown, because the image can't be found at their original set location.
Comment 5 Aron Budea 2021-03-05 16:40:38 UTC
(In reply to Aron Budea from comment #4)
> > > Move the file to another location.
> > Did you move x.odt or image somewhere else?
> Move the image.
> Then when reopening the file, only its empty frame is shown, because the
> image can't be found at their original set location.
Note: this is just the immediate effect of moving the image somewhere else, and not indicative of the bug, which can be seen when continuing with the steps from the bug description.
Comment 6 Stéphane Guillou (stragu) 2023-12-22 10:10:16 UTC
Commit was also cherrypicked to 6.3.6.

Reproduced in recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 29b11fa3b5574dc3f42f55b0716f71054030c6c2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Upping the importance because it's a dataloss regression, see step 7 here:

1. Insert a image with Insert > Image > Insert As Link, confirm "Keep link" in next dialog
2. Save the file (ODT)
3. Move the linked image file to a different directory
4. Reload file: image frame empty, (as expected)
5. Right-click > Properties > Rotation tab > Link > Browse to the new location of the file > confirm: preview is correct in dialog (as expected)
6. Click OK on dialog: image is not visible in document (broken)
7. Save and reload: image completely gone, nothing in Navigator (broken)

I checked that before ddd7277b218204dca539b3f93d36098df0349b38 (which is build commit [ddd7277b218204dca539b3f93d36098df0349b38] in linux-64-6.3 bibisect repo), it works as expected with the same steps.

Gülşah, can you please have another look?