Bug 108368 - FILEOPEN: DOC - Hang/unstable while opening specific document with EMF images
Summary: FILEOPEN: DOC - Hang/unstable while opening specific document with EMF images
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, perf, regression, wantBacktrace
: 108384 (view as bug list)
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2017-06-06 15:47 UTC by Marina Latini (CIB)
Modified: 2017-10-02 17:28 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
minimal document (144.50 KB, application/msword)
2017-06-06 16:44 UTC, Xisco Faulí
Details
Further reduced sample (34.04 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-06-07 14:22 UTC, Aron Budea
Details
Image extrated from document which is causing crash in LibreOffice (29.12 KB, image/x-emf)
2017-06-13 15:01 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marina Latini (CIB) 2017-06-06 15:47:11 UTC
While opening the .doc document provided by an Italian Ministry (Ministero dello Sviluppo Economico - MiSE), LibreOffice hangs, crash or became unstable.

Steps:
1) Download the file from: http://www.fondidigaranzia.mcc.it/allegati/fondo_di_garanzia/allegato4.doc
2) Open with LibreOffice

Expected Behaviour:
The document can be edited or read

Current Behaviour:
* Hang and crash with:
** LibreOffice 3.6.7.2 (Build ID: e183d5b) on Windows 7 home 32 bit

** Versione: 5.4.0.0.beta1
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Windows 6.1; UI render: predefinito; 
Versione locale: it-IT (it_IT); Calc: group

* Hang with LibreOffice:
** Versione: 5.3.3.2
Build ID: 30m0(Build:2)
Thread CPU: 4; Versione SO: Linux 4.11; Resa interfaccia: predefinito; VCL: gtk3; Motore layout: nuovo; 
Versione locale: it-IT (it_IT.UTF-8); Calc: group 

* Fatal error message "Could not create system bitmap!" then crash:
** Versione: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
Thread CPU: 4; Versione SO: Windows 6.1; Resa interfaccia: predefinito; 
Versione locale: it-IT (it_IT); Calc: group
Comment 1 Xisco Faulí 2017-06-06 16:21:41 UTC
Libreoffice hangs while scrolling in

Version: 5.5.0.0.alpha0+
Build ID: f2d40b8ba172d90be9a43c30cd5cbd62c0e8e548
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 Michael Meeks 2017-06-06 16:36:55 UTC
Aron - can we get some stack traces and/or a drmemory trace (ideally valgrind if it is not windows specific). Thanks ! =)
Comment 3 Xisco Faulí 2017-06-06 16:44:13 UTC
Created attachment 133878 [details]
minimal document

It seems the hang is caused by the table containing the boxes for the letters.
Comment 4 Aron Budea 2017-06-07 14:22:57 UTC
Created attachment 133897 [details]
Further reduced sample

Attaching a further reduced sample docx with a single cell.

Interestingly, with default rendering LO hits the 10k limit for GDI objects in Windows, but not with GL rendering.
Comment 5 Aron Budea 2017-06-07 16:34:27 UTC
Looks like an infinite drawing cycle of the embedded EMF.
Comment 6 Michael Meeks 2017-06-07 17:05:20 UTC
GL rendering doesn't use GDI handles with anything like the frequency as the GDI rendering ;-) (as you might expect). Can you get a stack trace of it struggling to render and/or crashing with out of handles on windows ?

Thanks ! =)
Comment 7 Yousuf Philips (jay) (retired) 2017-06-07 18:35:50 UTC
For completeness sake, this is a regression as it doesnt happen in 3.3 or 3.5.
Comment 8 Michael Meeks 2017-06-09 13:51:19 UTC
Reproduced; breakpoint in the relevant exception thrown from virdev.cxx gives you this trace:

>	vcllo.dll!VirtualDevice::ImplInitVirDev(const OutputDevice * pOutDev, long nDX, long nDY, DeviceFormat eFormat, const SystemGraphicsData * pData) Line 152	C++
 	vcllo.dll!VirtualDevice::VirtualDevice(DeviceFormat eFormat) Line 218	C++
 	cppcanvaslo.dll!ScopedVclPtrInstance<VirtualDevice>::ScopedVclPtrInstance<VirtualDevice><>() Line 388	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2905	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, unsigned int nPos) Line 352	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 505	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	vcllo.dll!ImpGraphic::ImplDraw(OutputDevice * pOutDev, const Point & rDestPt, const Size & rDestSize) Line 858	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmap(const GraphicConversionParameters & rParameters) Line 494	C++
 	vcllo.dll!ImpGraphic::ImplGetBitmapEx(const GraphicConversionParameters & rParameters) Line 538	C++
 	vcllo.dll!Graphic::GetBitmapEx(const GraphicConversionParameters & rParameters) Line 346	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::processEMFPlus(MetaCommentAction * pAct, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, cppcanvas::internal::OutDevState & rState, const std::shared_ptr<cppcanvas::Canvas> & rCanvas) Line 2168	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::createActions(GDIMetaFile & rMtf, const cppcanvas::internal::ActionFactoryParameters & rFactoryParms, bool bSubsettableActions) Line 1784	C++
 	cppcanvaslo.dll!cppcanvas::internal::ImplRenderer::ImplRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParams) Line 2999	C++
 	cppcanvaslo.dll!cppcanvas::VCLFactory::createRenderer(const std::shared_ptr<cppcanvas::Canvas> & rCanvas, const GDIMetaFile & rMtf, const cppcanvas::Renderer::Parameters & rParms) Line 95	C++
 	mtfrendererlo.dll!MtfRenderer::draw(double fScaleX, double fScaleY) Line 27	C++
 	vcllo.dll!GDIMetaFile::ImplPlayWithRenderer(OutputDevice * pOut, const Point & rPos, Size rLogicDestSize) Line 417	C++
 	vcllo.dll!GDIMetaFile::Play(OutputDevice * pOut, const Point & rPos, const Size & rSize) Line 456	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::VclProcessor2D::RenderMetafilePrimitive2D(const drawinglayer::primitive2d::MetafilePrimitive2D & rMetaCandidate) Line 793	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 849	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::Primitive2DContainer & rSource) Line 72	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 49	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 1261	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::Primitive2DContainer & rSource) Line 72	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 49	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 1261	C++
 	drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::Primitive2DContainer & rSource) Line 72	C++
 	svxcorelo.dll!sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo & rDisplayInfo) Line 312	C++
 	svxcorelo.dll!sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo & rDisplayInfo) Line 131	C++
 	svxcorelo.dll!SdrPageWindow::RedrawLayer(const unsigned char * pId, sdr::contact::ViewObjectContactRedirector * pRedirector) Line 400	C++
 	svxcorelo.dll!SdrPageView::DrawLayer(unsigned char nID, OutputDevice * pGivenTarget, sdr::contact::ViewObjectContactRedirector * pRedirector, const Rectangle & rRect) Line 357	C++
 	swlo.dll!SwViewShellImp::PaintLayer(const unsigned char _nLayerID, const SwPrintData * const pPrintData, const SwRect & aPaintRect, const Color * _pPageBackgrdColor, const bool _bIsPageRightToLeft, sdr::contact::ViewObjectContactRedirector * pRedirector) Line 141	C++
 	swlo.dll!SwRootFrame::Paint(OutputDevice & rRenderContext, const SwRect & rRect, const SwPrintData * const pPrintData) Line 3424	C++
 	swlo.dll!SwViewShell::ImplEndAction(const bool bIdleEnd) Line 405	C++
 	swlo.dll!SwViewShell::EndAction(const bool bIdleEnd) Line 604	C++
 	swlo.dll!SwCursorShell::EndAction(const bool bIdleEnd, const bool DoSetPosX) Line 261	C++
 	swlo.dll!SwEditShell::ApplyViewOptions(const SwViewOption & rOpt) Line 1014	C++
 	swlo.dll!SwWrtShell::ApplyViewOptions(const SwViewOption & rOpt) Line 1753	C++
 	swlo.dll!SwXViewSettings::_setSingleValue(const comphelper::PropertyInfo & rInfo, const com::sun::star::uno::Any & rValue) Line 710	C++
 	comphelper.dll!comphelper::ChainablePropertySet::setPropertyValue(const rtl::OUString & rPropertyName, const com::sun::star::uno::Any & rValue) Line 69	C++
 	swlo.dll!comphelper::ChainableHelperNoState::setPropertyValue(const rtl::OUString & aPropertyName, const com::sun::star::uno::Any & aValue) Line 60	C++
 	swlo.dll!SwView::ReadUserDataSequence(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rSequence) Line 1344	C++
 	sfxlo.dll!SfxBaseController::ConnectSfxFrame_Impl(const SfxBaseController::ConnectSfxFrame i_eConnect) Line 1414	C++
 	sfxlo.dll!SfxBaseController::attachFrame(const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & xFrame) Line 584	C++
 	sfxlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::impl_createDocumentView(const com::sun::star::uno::Reference<com::sun::star::frame::XModel2> & i_rModel, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & i_rFrame, const comphelper::NamedValueCollection & i_rViewFactoryArgs, const rtl::OUString & i_rViewName) Line 603	C++
 	sfxlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::load(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rArgs, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & _rTargetFrame) Line 721	C++
 	fwklo.dll!framework::LoadEnv::impl_loadContent() Line 1108	C++
 	fwklo.dll!framework::LoadEnv::startLoading() Line 379	C++
 	fwklo.dll!framework::LoadDispatcher::impl_dispatch(const com::sun::star::util::URL & rURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> & xListener) Line 116	C++
 	fwklo.dll!framework::LoadDispatcher::dispatchWithReturnValue(const com::sun::star::util::URL & rURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments) Line 62	C++
 	comphelper.dll!comphelper::SynchronousDispatch::dispatch(const com::sun::star::uno::Reference<com::sun::star::uno::XInterface> & xStartPoint, const rtl::OUString & sURL, const rtl::OUString & sTarget, const long nFlags, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments) Line 64	C++
 	sfxlo.dll!SfxApplication::OpenDocExec_Impl(SfxRequest & rReq) Line 1066	C++
 	sfxlo.dll!SfxStubSfxApplicationOpenDocExec_Impl(SfxShell * pShell, SfxRequest & rReq) Line 1246	C++
 	sfxlo.dll!SfxShell::CallExec(void (SfxShell *, SfxRequest &) * pFunc, SfxRequest & rReq) Line 214	C++
 	sfxlo.dll!SfxDispatcher::Call_Impl(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, bool bRecord) Line 379	C++
 	sfxlo.dll!SfxDispatcher::Execute_(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, SfxCallMode eCallMode) Line 945	C++
 	sfxlo.dll!SfxDispatcher::Execute(unsigned short nSlot, SfxCallMode eCall, const SfxItemSet & rArgs) Line 1102	C++
 	sfxlo.dll!SfxApplication::OpenDocExec_Impl(SfxRequest & rReq) Line 717	C++
 	sfxlo.dll!SfxStubSfxApplicationOpenDocExec_Impl(SfxShell * pShell, SfxRequest & rReq) Line 1246	C++
 	sfxlo.dll!SfxShell::CallExec(void (SfxShell *, SfxRequest &) * pFunc, SfxRequest & rReq) Line 214	C++
 	sfxlo.dll!SfxDispatcher::Call_Impl(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, bool bRecord) Line 379	C++
 	sfxlo.dll!SfxDispatcher::PostMsgHandler(SfxRequest * pReq) Line 1184	C++
 	sfxlo.dll!SfxDispatcher::LinkStubPostMsgHandler(void * instance, SfxRequest * data) Line 1161	C++
 	sfxlo.dll!Link<SfxRequest *,void>::Call(SfxRequest * data) Line 84	C++
 	sfxlo.dll!SfxHintPoster::DoEvent_Impl(void * pPostedHint) Line 45	C++
 	sfxlo.dll!SfxHintPoster::LinkStubDoEvent_Impl(void * instance, void * data) Line 42	C++
 	vcllo.dll!Link<void *,void>::Call(void * data) Line 84	C++
 	vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 1960	C++
 	vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2507	C++
 	vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 276	C++
 	vcllo.dll!ImplHandleUserEvent(HWND__ * hWnd, long lParam) Line 4115	C++
 	vcllo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam, int & rDef) Line 5777	C++
 	vcllo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Line 5911	C++
 	user32.dll!_InternalCallWinProc@20()	Unknown
 	user32.dll!_UserCallWinProcCheckWow@32()	Unknown
 	user32.dll!_DispatchMessageWorker@8()	Unknown
 	user32.dll!_DispatchMessageW@4()	Unknown
 	vcllo.dll!ImplSalDispatchMessage(tagMSG * pMsg) Line 576	C++
 	vcllo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 593	C++
 	vcllo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, unsigned long nReleased) Line 658	C++
 	vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents, const unsigned long nReleased) Line 507	C++
 	vcllo.dll!Application::Yield() Line 561	C++
 	vcllo.dll!Application::Execute() Line 469	C++
 	sofficeapp.dll!desktop::Desktop::DoExecute() Line 1368	C++
 	sofficeapp.dll!desktop::Desktop::Main() Line 1689	C++
 	vcllo.dll!ImplSVMain() Line 185	C++
 	vcllo.dll!SVMain() Line 224	C++
 	sofficeapp.dll!soffice_main() Line 166	C++
 	soffice.bin!sal_main() Line 48	C
 	soffice.bin!main(int argc, char * * argv) Line 47	C
 	soffice.bin!WinMain(void * _hinst, void * _dummy, char * _cmdline, int _nshow) Line 47	C
 	soffice.bin!__tmainCRTStartup() Line 618	C
 	soffice.bin!WinMainCRTStartup() Line 466	C
 	kernel32.dll!@BaseThreadInitThunk@12()	Unknown
 	ntdll.dll!___RtlUserThreadStart@8()	Unknown
 	ntdll.dll!__RtlUserThreadStart@8()	Unknown
Comment 9 Michael Meeks 2017-06-09 14:34:28 UTC
NirSoft GDI view sayeth ... 

Pen: 6
Brush 31
Bitmap 54
Palette 1
Region 9
DC 9856
Comment 10 Michael Meeks 2017-06-09 20:48:35 UTC
Would be great to extract the two EMF+s from the zip, and see what we can do about them - which one causes the grief (or both) in a new file standalone. Another data-point is fiddling with EMF_PLUS_LIMIT=50 or so lets the file load, and seemingly the Graphic::GetBitmapEx recursion only goes 8-9 deep at maximum, but still - having 8 layers of EMFs embedded inside each other seems a little crazy ... ;-)
Comment 11 Bartosz 2017-06-13 15:01:16 UTC
Created attachment 133998 [details]
Image extrated from document which is causing crash in LibreOffice

To reproduce crash with emf image:
1. Open LibreOffice Writer
2. Choose "Insert -> Image..."
3. Select emf file
4. Wait for crash 

Reproduced Windows 7, LibreOffice 5.3.2
Comment 12 Timur 2017-07-26 09:13:33 UTC
*** Bug 108384 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2017-10-02 17:28:14 UTC
WFM in 6.0+.