Bug 117335 - GIF images fail to display in Impress
Summary: GIF images fail to display in Impress
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: EMFPlus-Rework-Regressions
  Show dependency treegraph
 
Reported: 2018-04-29 15:52 UTC by Andrew Watson
Modified: 2018-07-10 07:54 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Impress file whose GIF images fail to display (3.85 MB, application/vnd.oasis.opendocument.presentation)
2018-04-29 15:55 UTC, Andrew Watson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Watson 2018-04-29 15:52:38 UTC
Description:
In LO 6.1.0.0.alpha1 GIF images in the attached Impress test file fail to display.

This is a regression - the images display OK in the following LO versions:

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)

Version: 5.4.3.2
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 4; OS: Mac OS X 10.11.6; UI render: default; 
Locale: en-GB (en.UTF-8); Calc: group

Version: 6.0.4.0.0+
Build ID: 0d78d17249a58d95b4aa2e8fe09f08e22f20c407
CPU threads: 4; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-04-11_09:33:49
Locale: en-US (en.UTF-8); Calc: group

 ... but fail to display in:

Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Mac OS X 10.11.6; UI render: default; 
Locale: en-US (en.UTF-8); Calc: group



Steps to Reproduce:
Load test file "SixOneImageTest.odp" (attached to later comment) into LO 6.1.0.0.alpha1.


Actual Results:  
On both slides (taken from a longer real-world presentation), the rectangles superimposed on the background image are solid black. These rectangles are GIF images that do not display.


Expected Results:
The rectangles should contain height graphs in yellow and graph labels in white. Observe this by loading SixOneImageTest.odp into LO 6.0.4.0.0+ or earlier.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
OpenGL info:


Renderer: Intel(R) HD Graphics 6000
Vendor: Intel Inc.
Memory: 1536 MB
Version: 4.1 INTEL-10.14.74
Device: MacBookAir7,2
Shading language version: 4.10


Max texture size: 16384 x 16384
Max vertex texture image units: 16
Max texture image units: 16
Max geometry texture units: 16
Max anisotropic filtering value: 16
Max viewport size: 16384 x 16384
Max Clip Distances: 8
Max samples: 8


Extensions: 45


GL_ARB_tessellation_shader
GL_APPLE_texture_range
GL_EXT_framebuffer_multisample_blit_scaled
GL_ARB_viewport_array
GL_ARB_gpu_shader_fp64
GL_ARB_explicit_attrib_location
GL_NV_texture_barrier
GL_ARB_separate_shader_objects
GL_ARB_texture_storage
GL_ARB_gpu_shader5
GL_ARB_texture_swizzle
GL_EXT_texture_compression_s3tc
GL_ARB_texture_cube_map_array
GL_ARB_blend_func_extended
GL_ARB_vertex_attrib_64bit
GL_EXT_texture_sRGB_decode
GL_ARB_texture_gather
GL_EXT_texture_filter_anisotropic
GL_APPLE_row_bytes
GL_ARB_transform_feedback2
GL_ARB_transform_feedback3
GL_ARB_draw_indirect
GL_ARB_texture_query_lod
GL_ARB_draw_buffers_blend
GL_ARB_sample_shading
GL_ARB_internalformat_query
GL_ARB_timer_query
GL_ARB_shader_subroutine
GL_ATI_texture_mirror_once
GL_EXT_debug_marker
GL_APPLE_rgb_422
GL_ARB_vertex_type_2_10_10_10_rev
GL_EXT_debug_label
GL_ARB_texture_buffer_object_rgb32
GL_ARB_instanced_arrays
GL_APPLE_container_object_shareable
GL_ARB_ES2_compatibility
GL_APPLE_client_storage
GL_ARB_sampler_objects
GL_ARB_occlusion_query2
GL_ARB_shading_language_include
GL_ARB_texture_rgb10_a2ui
GL_APPLE_object_purgeable
GL_ARB_shader_bit_encoding
GL_APPLE_flush_render

Core features

v3.0 (100 % - 23/23)
v3.1 (100 % - 8/8)
v3.2 (100 % - 10/10)
v3.3 (100 % - 10/10)
v4.0 (100 % - 14/14)
v4.1 (100 % - 7/7)
v4.2 (15 % - 2/13)
v4.3 (0 % - 0/23)
v4.4 (0 % - 0/10)
v4.5 (0 % - 0/11)
v4.6 (0 % - 0/11)
vARB 2015 (0 % - 0/12)

OpenGL driver version check (Current: 4.1 INTEL-10.14.74, Latest known: ):
Latest version of display drivers found
According the database, you are running the latest display drivers for your video card.

Extension verification: 



User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Andrew Watson 2018-04-29 15:55:06 UTC
Created attachment 141760 [details]
Test Impress file whose GIF images fail to display
Comment 2 raal 2018-04-29 18:12:30 UTC
I see image in Version: 6.1.0.0.alpha1+
Build ID: 4dbce627d3643babaf90a93c70b365ff08abfca6
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Mac only?
Comment 3 Andrew Watson 2018-04-29 20:28:55 UTC
Yes, it looks as if this may be a Mac-only bug.

I tried a different Mac running an older version of Mac OS (10.9.5). The GIFs also do NOT display with LO 6.1.0.0.alpha1 on:

Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Mac OS X 10.9.5; UI render: default; 
Locale: en-US (en.UTF-8); Calc: group

But DO display on the same Mac with an older LO version:

Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 4; OS Version: Mac OS X 10.9.5; UI Render: default; Layout Engine: new; 
Locale: en-GB (en.UTF-8); Calc: group

I also tried Linux Mint 18 (Sarah), and found that the GIFs DO display with LO  6.1.0.0.alpha1 under:

Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group
Comment 4 Xisco Faulí 2018-05-01 20:56:03 UTC
Reproduced in

Version: 6.1.0.0.alpha1+
Build ID: 13a1bc409d9b2f0d14f4d316b7977b1fc2eb3c8a
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_ES.UTF-8); Calc: group
Comment 5 Xisco Faulí 2018-05-01 21:08:34 UTC
Regression introduced by:

author	Armin Le Grand <Armin.Le.Grand@cib.de>	2017-10-30 16:29:09 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-04-17 02:05:57 +0200
commit	7f9b0f47979dcb7abfed37bb7cd38ab51eac6011 (patch)
tree	639b6289605dc4b108b70d2da56dd214e62a5be1
parent	0f93692fda4226323422cf82ce34ae4bd5e22fab (diff)
tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if needed
Added code to quartz vcl implementation that takes care
when BitmapPalette.count != (depth^^2)-1 - which may
be the case anytime. If then a bitmap value exists that
goes beyond that count, a invalid access was executed

Bisected with: bibisect-mac64-6.1

Adding Cc: to Armin Le Grand
Comment 6 Julien Nabet 2018-05-05 09:42:19 UTC
GetEntryCount returns maBitmapColor
197      sal_uInt16 GetEntryCount() const
198      {
199          return maBitmapColor.size();
200      }

see https://opengrok.libreoffice.org/xref/core/include/vcl/salbtype.hxx#197

but I noticed that maBitmapColor is initialized with a sal_uInt16 number, see https://opengrok.libreoffice.org/xref/core/include/vcl/salbtype.hxx#maBitmapColor#177

Shouldn't we use sal_uInt16 for mnPaletteCount?
Comment 7 Andrew Watson 2018-05-29 20:26:55 UTC
Reproduced in:

Version: 6.1.0.0.beta1
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 4; OS: Mac OS X 10.11.6; UI render: default; 
Locale: en-US (en.UTF-8); Calc: group
Comment 8 Armin Le Grand (CIB) 2018-06-26 14:54:37 UTC
No idea what to do when it's only on the Mac- I do not have one. The code changed as follows:

-            const BitmapColor& rColor = mrPalette[ (pData[mnX >> 3 ] >> ( 7 - ( mnX & 7 ) )) & 1];
+            // Caution(!) rPalette.GetEntryCount() may be != (depth^^2)-1 (!)
+            const sal_uInt8 nIndex( (pData[mnX >> 3 ] >> ( 7 - ( mnX & 7 ) )) & 1);

Checking the index acces *is* needed (there are palettes with less than 0xff colors - I thought about fixing this first). Maybe a Mac-Dev could tr to use sal_uInt16 instead of sal_uInt8 - something strange with the Mac-Compiler seems to be happening here (due to working on all other systems...).
Sprry, I have (still) no Mac.
Comment 9 Bartosz 2018-06-28 08:05:14 UTC
Review with the fix:
https://gerrit.libreoffice.org/#/c/56578/
Comment 10 Commit Notification 2018-06-29 08:28:45 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117335 Fix displaying GIF images

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-07-02 10:44:40 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3786926c8a56c9eecb6547eb70c1dba98373788&h=libreoffice-6-1

tdf#117335 Fix displaying GIF images

It will be available in 6.1.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2018-07-04 11:57:32 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 5fce97a58b8f764e35bf98128591c9a89537da05
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_ES.UTF-8); Calc: group threaded

@Bartosz, Thanks for fixing this!!
Comment 13 Commit Notification 2018-07-09 09:21:06 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=34bba6eaa404f5a081dcc28f9cca7fd55a10fe0c&h=libreoffice-6-0

tdf#117335 Fix displaying GIF images

It will be available in 6.0.6.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Andrew Watson 2018-07-10 07:54:56 UTC
Verified fixed in:

Version: 6.1.0.1.0+
Build ID: 9837faeaab59e030e500ed21da92dd6bed2806fe
CPU threads: 4; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-1, Time: 2018-07-10_00:21:46
Locale: en-US (en.UTF-8); Calc: group threaded

Thanks!