Bug 134042 - [EDITING] When paste image on another image, they break and vanish. Calc eventually crashes
Summary: [EDITING] When paste image on another image, they break and vanish. Calc even...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2020-06-16 13:47 UTC by zzz
Modified: 2022-10-25 17:34 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
sample image file LibreOfficeLogo.png (2.32 KB, image/png)
2020-06-16 13:47 UTC, zzz
Details
test file 20200616ImageOnImageTest1a.ods (12.08 KB, application/octet-stream)
2020-06-16 13:48 UTC, zzz
Details
example broken result 20200616ImageOnImageTest2a.ods (12.38 KB, application/octet-stream)
2020-06-16 13:48 UTC, zzz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zzz 2020-06-16 13:47:26 UTC
Created attachment 162055 [details]
sample image file LibreOfficeLogo.png

When you paste image on another image, they are replaced by a strange translucent box. The source images can never be recovered except Undo.Seems identical or same cause with Bug 105066, but not sure so created as a separate report, with some different reproduction scenarios.
 While experimenting around, Calc sometimes crashes.

Reproduction:
(1) Open attached image LibreOfficeLogoCaptured2.png with any paint app, and copy it to clipboard.
  Any app will do. I tested with IrfanView 4.24(32) and Microsoft Windows10 Paint (version unobtainable!).
(2) Paste it to cell B5 on a Calc worksheet.
  Any worksheet will do. I attached 
  20200616ImageOnImageTest1a.ads
  for your comparison.
(3) Immediately paste it on B5 again. Ctrl+V, right-click, either will work

Result:
Images are replaced by a strange translucent box of the same outline of the first image,
with red text inside saying "Image 2 ...".
Example  20200616ImageOnImageTest2a.ads
Reproduction 100%

Should be:
The image should appear as-is, overlapping.

Other observasions:
(a) As long as it is in the same session, no matter what you do between step (2) and (3),
  it is reproducible 100%.
(b) Once you save the file and re-open, the existing images will not cause this problem.
  But still if you paste a new image on that sheet, it is susceptible to the same symptom.
(c) Can also reproduce by dragging on an image file onto the existing image on worksheet.
(d) Reproducing variants:
  Before pasting the second image, click cell C5, which only partially shares image 1.
  Paste image 2 onto the worksheet. Same syptom. Reproduction 100%.

Bug 105066 has a message from "QA Administrators" asking reporter to reproduce with later version of LibreOffice. Appalling logic. These bugs will never vanish unless the programmer consciously read the bug report and very consciously address, repair and test. Then of course the programmer can update the bug report status. If it is not marked "tackling", the bug surely is still there. Hoping (or thinking that) bugs to automagically dissapear is overoptimistic.
Comment 1 zzz 2020-06-16 13:48:18 UTC
Created attachment 162056 [details]
test file 20200616ImageOnImageTest1a.ods
Comment 2 zzz 2020-06-16 13:48:55 UTC
Created attachment 162057 [details]
example broken result 20200616ImageOnImageTest2a.ods
Comment 3 Telesto 2020-06-16 17:51:49 UTC
Bug 107529 maybe
Comment 4 Fiable.biz 2020-07-16 04:28:13 UTC
I can reproduce it with LO 6.4.4.2 on Fedora 32 workstation, 64 bits. It's not the expected behaviour. It's a duplicate of bug #105066, which has been marked "Worksform" with no explanation.
Comment 5 Fiable.biz 2020-07-16 04:31:20 UTC

*** This bug has been marked as a duplicate of bug 105066 ***
Comment 6 zzz 2022-07-24 05:15:39 UTC
Reopened as a problem distinctive from Bug 105066. All symptoms are same, but reproduction procedures are different.
Bug 134042:
  Source: Most apps EXCEPT LibreCalc and LirbeDraw.
  Occuring conditions: Worse (more cases) than Bug 105066.
  This implies that it has an additional issue in intersoftware clipboard handling.
Bug 105066:
  Source: Only about LibreCalc.
  Occuring conditions: Happens only when "Paste special".
Bug 107529:
  Source: direct Main Menu|Insert-Image into LibreCalc.
  Occuring conditions: Describes only about Main Menu|Insert-Image.

Retest environment:
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

I found that the behaviour depends on the source application software of the second paste ("image2", hereafter). Here, "source" means the source of the image in clipboard.
As a source, LibreCalc is a special case where the problem happens only under limited conditions. For all other apps, the condition is broader.

First, a definition of paste procedure codes used later:
(a1) Ctrl+V method:
  1. Copy image1 from the source software.
  2. Switch to LibreCalc.
  3. Click a cell you want to paste the image to, say, A1.
  4. Paste image1 by Ctrl+V.
  5. Immediately paste it again by Ctrl+V.
(b1) Mouse Context menu Paste method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Right-click on the pasted image1, to open the context menu.
     * Note that BOTH the cell-cursor and the mouse-cursor-at-click must be on image1.
  7. Paste image2 by Context menu|"Paste".
     * No "Paste Special" appears in the context menu for this case.
(b2) Keyboard Context menu Paste method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Press the context menu key, to open the context menu.
  7. Paste image2 by Context menu|"Paste".
(c1) Keyboard Context menu Paste Special method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Press the context menu key, to open the context menu.
  7. Paste image2 by Context menu|Paste Special...|Bitmap Image (BMP)
(c2) Menubar Paste Special method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell navigation mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Click the Menubar.
  7. Paste image2 by Menubar Edit|Paste Special|Paste Special...|Bitmap Image (BMP)

Experiment results:

- Source LibreCalc 7.3.2.2:
  (a1) Pastes correctly (two image objects overlayed)
  (b1) Pastes correctly (two image objects overlayed)
  (b2) Pastes correctly (two image objects overlayed)
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source IrfanView 4.58 32 bit:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Microsoft Paint bundled with Windows 10 21H2:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces
  * In Microsoft Paint, don't forget to "select all" before copying.

- Source GIMP 2.10.28:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces
  * Sidenote: the size of image1 pasted from GIMP is slightly larger than the original image1 in Bug_Test.ods

- Source LibreDraw 7.3.2.2:
  (a1) Pastes correctly (two image objects overlayed)
  (b1) Pastes correctly (two image objects overlayed)
  (b2) Pastes correctly (two image objects overlayed)
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Google Chrome 103.0.5060.134 (Official Build) (64 bit)
  https://www.libreoffice.org/themes/libreofficenew/img/logo.png in https://www.libreoffice.org/
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Firefox 98.0.2 (64-bit):
  https://www.libreoffice.org/themes/libreofficenew/img/logo.png in https://www.libreoffice.org/
  * fail to paste from Firefox due to Bug 134031 - "[EDITING]Images copied from Firefox won't paste" (which is marked RESOLVED but actually is an alive and remaining problem)