Bug 84640 - Display a warning message "corrupt images detected" instead of just showing placeholders for images
Summary: Display a warning message "corrupt images detected" instead of just showing p...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Images
  Show dependency treegraph
 
Reported: 2014-10-03 17:45 UTC by pj
Modified: 2021-02-04 15:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A spreadsheet with embedded pics. (511.88 KB, application/vnd.ms-excel)
2014-10-03 17:45 UTC, pj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pj 2014-10-03 17:45:28 UTC
Created attachment 107279 [details]
A spreadsheet with embedded pics.

Problem description: Attached spreadsheet does not show in 4.x version including current version 4.3.2.2-2.

Steps to reproduce:
1. .... Open included .xls
2. .... Change to Sheet2
3. .... look for images (only see place holders)

Current behavior: No pictures are shown, just place holders

Expected behavior: Display of embedded pictures
Comment 1 raal 2014-10-04 08:43:01 UTC
This file crashes LO 4.2.6,Linux and 
Version: 4.4.0.0.alpha0+
Build ID: 65277f994ae25d930c15aebba0ed19f8de0abba1
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-09-29_19:47:20

Version: 4.3.3.0.0+
Build ID: 14907346d792f2f93a00083bbab5086cf56ddb24
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-3, Time: 2014-09-26_03:56:08

error message when opening file:  std::bad_alloc
Comment 2 tommy27 2014-10-05 12:01:34 UTC
@pj
please post a comment and define exactly which O/S and LibO version did you see the bug.

tested under Win7x64 
test file correctly loaded in MS Excel Viewer and images in sheet 2 are correctly shown.

LibO 4.2.6 loads file but shows placeholder instead of images.
same issue with older LibO releases (tested up to 3.3.3) and OOo 3.3.0 and AOO 4.1.0.

so the "image placeholder" issue in inherited from OOo.


LibO 4.3.2.2 can't open file and shows "LibreOffice 4.3 - Fatal Error. bad allocation". Same error with recent LibO 4.4.0.0 master.
which looks similar to the issue reported by raal.

so basically the same files shows two different bugs in different LibO releases.
I'll open a new bug report about the bad allocation issue.
Comment 3 tommy27 2014-10-05 12:13:31 UTC
let's focus the discussion here to the "image placeholder" bug.

the "bad allocation" issue will be discusse at Bug 84686
Comment 4 pj 2014-10-06 12:06:27 UTC
Initially tried with stock CentOS 6.5 Linux and (RHEL) default LibreOffice version of 4.0.4.2-9.el6.x86_64
Then completely removed the 4.0.4.x version and went to stock http://libreoffice.org/ download of 4.3.2.2-2.x86_64
Comment 5 Andras Timar 2014-11-27 22:28:45 UTC
This document is invalid, it does not conform the specification of Excel binary file format.

It has invalid length (rh.recLen) in header of blipStore's OfficeArtFBSE record, it does not match the size of the embedded image. It starts with the second image (1st JPEG on Sheet 2), size of the record is 7523 (wrong!), while the size of the image is 73023.

It would be too much work to rewrite import filter of LibreOffice to accept invalid input -- while of course it would be possible, because Excel can open the file. :) 

I resaved the file with Excel 2010, and it became valid, and LibreOffice opened it well.
Comment 6 pj 2014-12-01 14:25:13 UTC
Thank you very much for figuring out there is an issue with the creation process. This file was given to us from an outside company and we have no control over the creation of the file.

Please *strongly* consider displaying a warning message of "corrupt images detected" or similar instead of just not displaying pictures. Since MSOffice will display and LO will not, the only assumption is that LO is not working.

Thank you for your effort!

Reopened in hopes of getting the error message :)

PJ
Comment 7 Robinson Tryon (qubit) 2015-03-05 15:24:13 UTC
REOPENED isn't the correct status for this bug, as there wasn't ever a developer assigned or fix released.

(In reply to pj from comment #6)
> Please *strongly* consider displaying a warning message of "corrupt images
> detected" or similar instead of just not displaying pictures. Since MSOffice
> will display and LO will not, the only assumption is that LO is not working.

Okay, changing Severity -> enhancement

I'm not sure how hard it would be for LibreOffice to indicate that the file is invalid, but I'll toss this in NEW for now.