Bug Hunting Session
Bug 98052 - FILEOPEN: bad rendering of .WMF image in .ODT when OpenGL enabled
Summary: FILEOPEN: bad rendering of .WMF image in .ODT when OpenGL enabled
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.2 target:5.0.6
Keywords: regression
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2016-02-21 09:55 UTC by tommy27
Modified: 2016-10-25 19:07 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (34.18 KB, application/vnd.oasis.opendocument.text)
2016-02-21 09:55 UTC, tommy27
Details
screenshot (183.73 KB, image/jpeg)
2016-02-21 09:56 UTC, tommy27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tommy27 2016-02-21 09:55:24 UTC
Created attachment 122842 [details]
testcase

attached .ODT with .WMF inside is correctly opened in LibO 5.1.0.3 under Win8.1 x64 but incorrectly shown in LibO 5.2.0.0.alpha0+
Build ID: 05618e74c77658da76f467a1ab328cb310a19e84
CPU Threads: 4; OS Version: Windows 6.29; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-02-20_23:42:27
Locale: it-IT (it_IT)

specifically the light blue background is not shown and some table borders in the right upper corner are missing

see following screenshot
Comment 1 tommy27 2016-02-21 09:56:01 UTC
Created attachment 122843 [details]
screenshot
Comment 2 raal 2016-02-21 17:11:39 UTC
I can not confirm with Version: 5.2.0.0.alpha0+
Build ID: ef02de2698d90fd874bddf3146165cbe85487bc5
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-19_23:40:50
Comment 3 Buovjaga 2016-02-27 16:09:57 UTC
Looks blue here and table borders are present. I don't (can't) use OGL, though..

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 85fcf15ff41ceb95f46dee586ff7187551be4955
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-27_09:23:38
Locale: fi-FI (fi_FI)
Comment 4 Buovjaga 2016-02-27 16:16:23 UTC
Hey, wait a minute: now my horrible "crash on any app launch" bug is gone and I can force OGL!

Now I see tommy's problem. I actually don't see any borders in the top table.

Version: 5.2.0.0.alpha0+
Build ID: 85fcf15ff41ceb95f46dee586ff7187551be4955
CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-27_09:23:38
Locale: fi-FI (fi_FI)
Comment 5 Michael Meeks 2016-02-29 09:57:27 UTC
Interesting; I get an assertion from the bitmap rendering logic; apparently there is some issue with the canvas re-rendering bitmaps:

1  0x00007ffff7459458 in __GI_abort () at abort.c:78
#2  0x00007ffff7451126 in __assert_fail_base (fmt=0x7ffff75867d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffefe93930 "!OpenGLHelper::isVCLOpenGLEnabled()", file=file@entry=0x7fffefe93840 "/data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx", line=line@entry=691, function=function@entry=0x7fffefe946c0 <OutputDevice::DrawDeviceAlphaBitmap(Bitmap const&, AlphaMask const&, Point const&, Size const&, Point const&, Size const&)::__PRETTY_FUNCTION__> "void OutputDevice::DrawDeviceAlphaBitmap(const Bitmap&, const AlphaMask&, const Point&, const Size&, const Point&, const Size&)") at assert.c:92
#3  0x00007ffff74511d2 in __GI___assert_fail (assertion=0x7fffefe93930 "!OpenGLHelper::isVCLOpenGLEnabled()", file=0x7fffefe93840 "/data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx", line=691, function=0x7fffefe946c0 <OutputDevice::DrawDeviceAlphaBitmap(Bitmap const&, AlphaMask const&, Point const&, Size const&, Point const&, Size const&)::__PRETTY_FUNCTION__> "void OutputDevice::DrawDeviceAlphaBitmap(const Bitmap&, const AlphaMask&, const Point&, const Size&, const Point&, const Size&)") at assert.c:101
#4  0x00007fffef8bc96e in OutputDevice::DrawDeviceAlphaBitmap(Bitmap const&, AlphaMask const&, Point const&, Size const&, Point const&, Size const&) (this=0x264c300, rBmp=..., rAlpha=..., rDestPt=Point = {...}, rDestSize=Size = {...}, rSrcPtPixel=Point = {...}, rSrcSizePixel=Size = {...}) at /data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx:691
#5  0x00007fffef8bbc03 in OutputDevice::DrawDeviceBitmap(Point const&, Size const&, Point const&, Size const&, BitmapEx&) (this=0x264c300, rDestPt=Point = {...}, rDestSize=Size = {...}, rSrcPtPixel=Point = {...}, rSrcSizePixel=Size = {...}, rBitmapEx=...) at /data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx:501
#6  0x00007fffef8bb0d2 in OutputDevice::DrawBitmapEx(Point const&, Size const&, Point const&, Size const&, BitmapEx const&, MetaActionType) (this=0x264c300, rDestPt=Point = {...}, rDestSize=Size = {...}, rSrcPtPixel=Point = {...}, rSrcSizePixel=Size = {...}, rBitmapEx=..., nAction=MetaActionType::BMPEX) at /data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx:377
#7  0x00007fffef8ba83f in OutputDevice::DrawBitmapEx(Point const&, BitmapEx const&) (this=0x264c300, rDestPt=Point = {...}, rBitmapEx=...) at /data/opt/libreoffice/master/vcl/source/outdev/bitmap.cxx:253
#8  0x00007fffa0d2414b in vclcanvas::BitmapBackBuffer::updateVDev() const (this=0x264ab70) at /data/opt/libreoffice/master/canvas/source/vcl/bitmapbackbuffer.cxx:147
#9  0x00007fffa0d23b7a in vclcanvas::BitmapBackBuffer::getOutDev() (this=0x264ab70) at /data/opt/libreoffice/master/canvas/source/vcl/bitmapbackbuffer.cxx:54
#10 0x00007fffa0d4b517 in vclcanvas::CanvasHelper::setupOutDevState(com::sun::star::rendering::ViewState const&, com::sun::star::rendering::RenderState const&, vclcanvas::CanvasHelper::ColorType) const (this=0x7fffa0cd4328, viewState=..., renderState=..., eColorType=vclcanvas::CanvasHelper::FILL_COLOR) at /data/opt/libreoffice/master/canvas/source/vcl/canvashelper.cxx:1203
#11 0x00007fffa0d474c8 in vclcanvas::CanvasHelper::fillPolyPolygon(com::sun::star::rendering::XCanvas const*, com::sun::star::uno::Reference<com::sun::star::rendering::XPolyPolygon2D> const&, com::sun::star::rendering::ViewState const&, com::sun::star::rendering::RenderState const&) (this=0x7fffa0cd4328, xPolyPolygon=uno::Reference to (basegfx::unotools::UnoPolyPolygon *) 0x7fffa16a4eb8, viewState=..., renderState=...) at /data/opt/libreoffice/master/canvas/source/vcl/canvashelper.cxx:500
#12 0x00007fffa0d36f87 in canvas::CanvasBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvas::tools::LocalGuard, cppu::OWeakObject>::fillPolyPolygon(com::sun::star::uno::Reference<com::sun::star::rendering::XPolyPolygon2D> const&, com::sun::star::rendering::ViewState const&, com::sun::star::rendering::RenderState const&) (this=0x7fffa0cd42b0, xPolyPolygon=uno::Reference to (basegfx::unotools::UnoPolyPolygon *) 0x7fffa16a4eb8, viewState=..., renderState=...) at /data/opt/libreoffice/master/include/canvas/base/canvasbase.hxx:300
#13 0x00007fffe3e472f3 in cppcanvas::internal::(anonymous namespace)::PolyPolyAction::renderPrimitive(com::sun::star::uno::Reference<com::sun::star::rendering::XCachedPrimitive>&, basegfx::B2DHomMatrix const&) const (this=0x27cc250, rCachedPrimitive=empty uno::Reference, rTransformation=...) at /data/opt/libreoffice/master/cppcanvas/source/mtfrenderer/polypolyaction.cxx:166
#14 0x00007fffe3e12564 in cppcanvas::internal::CachedPrimitiveBase::render(basegfx::B2DHomMatrix const&) const (this=0x27cc250, rTransformation=...) at /data/opt/libreoffice/master/cppcanvas/source/mtfrenderer/cachedprimitivebase.cxx:78
Comment 6 Michael Meeks 2016-02-29 10:07:09 UTC
Interesting; copying to draw - the WMF still fails to render; but 'break'ing it into its constituent pieces seems to replace those lines with other lines (that then render properly). Strange.
Comment 7 Michael Meeks 2016-02-29 15:57:41 UTC
Can you take a look - Marco ? =)
Comment 8 Marco Cecchetti 2016-03-04 10:51:20 UTC
A candidate fix is available here: 
https://gerrit.libreoffice.org/#/c/22892/1
Comment 9 Michael Meeks 2016-03-04 13:26:50 UTC
Thanks Marco ! =)
Comment 10 Commit Notification 2016-03-04 13:27:47 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98052 - polypolygons were not drawn on the alpha device

It will be available in 5.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 2016-03-04 13:30:13 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#98052 - polypolygons were not drawn on the alpha device

It will be available in 5.1.2.

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 Commit Notification 2016-03-04 21:17:38 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=da2f91b5ceef6d7c6a7b833b25a48f12f58643f5&h=libreoffice-5-0

tdf#98052 - polypolygons were not drawn on the alpha device

It will be available in 5.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 13 Commit Notification 2016-03-08 17:05:01 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=55ec8dd8af96756b00d5a617dc5a58abe73118d6&h=libreoffice-5-1

tdf#98052 - even polygons were not drawn on the alpha device

It will be available in 5.1.2.

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 Commit Notification 2016-03-08 20:25:06 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98052 - even polygons were not drawn on the alpha device

It will be available in 5.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 15 Commit Notification 2016-03-17 08:03:14 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=778d0154755b4c2b35041a1a7ab58a48c9e0de13&h=libreoffice-5-0

tdf#98052 - even polygons were not drawn on the alpha device

It will be available in 5.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.