Bug 47035 - Cannot insert jpeg
Summary: Cannot insert jpeg
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: PowerPC Mac OS X (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:3.6.0 target:3.5.4
Keywords: regression
: 50213 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-06 23:46 UTC by Rick
Modified: 2012-05-24 07:31 UTC (History)
4 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 Rick 2012-03-06 23:46:05 UTC
Attempts to insert a jpeg into a cell fail (Insert picture from file...). I can insert a gif image.

I downgraded to 3.4.5 and jpeg insertion worked again.
Comment 1 Christian Lohmaier 2012-05-08 15:13:31 UTC
confirming - works in 3.4.6, fails in 3.5.x and master.
Comment 2 Caolán McNamara 2012-05-09 02:18:42 UTC
svtools jpeg importing tests do actually work under Linux ppc64 FWIW. I had earlier thought they failed, but nope, they pass.
Comment 3 Caolán McNamara 2012-05-09 02:22:11 UTC
I'd guess fe40da4cb640819d869d1c925869bc87ede9bbfe is the culprit
Comment 4 Caolán McNamara 2012-05-09 15:00:10 UTC
crap, Linux ppc32 also succeeds without problem, which means I can't reproduce it locally, so I'm out.

What's needed is someone to stick some breakpoints into JPEGReader::CreateBitmap as seen in http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe40da4cb640819d869d1c925869bc87ede9bbfe and see if a) it even gets there, and b) where it bails out
Comment 5 Christian Lohmaier 2012-05-18 17:07:38 UTC
So - the abovementioned change is unrelated, as it doesn't even get to that point, it already fails in jpegc.c on the

 jpeg_create_decompress( &cinfo ); 

line. i.e. the jpeg_create_decompress call exits hard, decompression of the jpeg doesn't even start.

Disabling the custom error handler and using libjpeg's default one gives some more info:

file:///Users/buildslave/compile.noindex/libreoffice/svtools/qa/cppunit/data/jpg/pass/CVE-2004-0200-2.jpg,JPEG parameter struct mismatch: library thinks size is 488, caller expects 484

so for some reason there is a size mismatch.

However It is unclear to me where/how this mismatch is introduced
Comment 6 Not Assigned 2012-05-18 19:08:06 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

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

fdo#47035: Fix loading of jpeg files on Mac/PPC
Comment 7 Not Assigned 2012-05-19 05:15:41 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

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

fdo#47035: Fix saving of jpeg files on Mac/PPC
Comment 8 Not Assigned 2012-05-21 07:09:12 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=efdd08cf8985c0b322ef94f62877caa5c4b3694d&g=libreoffice-3-5

fdo#47035: Fix loading of jpeg files on Mac/PPC


It will be available in LibreOffice 3.5.5.
Comment 9 Not Assigned 2012-05-21 07:09:39 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a220ec769d6489df7f3dd01cf25ea59dfd793276&g=libreoffice-3-5

fdo#47035: Fix saving of jpeg files on Mac/PPC


It will be available in LibreOffice 3.5.5.
Comment 10 Not Assigned 2012-05-21 07:34:18 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=20987a1d0ec675f3a23a4be58eb7309f60fc62de&g=libreoffice-3-5-4

fdo#47035: Fix loading of jpeg files on Mac/PPC


It will be available already in LibreOffice 3.5.4.
Comment 11 Not Assigned 2012-05-21 07:34:45 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4f45305ecdb38d3c2b5f91ec4f29cb89e29f770&g=libreoffice-3-5-4

fdo#47035: Fix saving of jpeg files on Mac/PPC


It will be available already in LibreOffice 3.5.4.
Comment 12 Roman Eisele 2012-05-23 02:19:16 UTC
*** Bug 50213 has been marked as a duplicate of this bug. ***
Comment 13 Caolán McNamara 2012-05-24 07:31:17 UTC
fixed