Created attachment 128875 [details] EMF heraldic shield from slide in PowerPoint slide attachment 101574 [details] With OpenGL rendering enabled the attached EMF file extracted from attachment 101574 [details] (12.5. Kariérní model - příklady.ppt from bug 80389) crashes LibreOffice on opening with both 5.2.3.3 build and the new HarfBuzz based layout engine of current master. The EMF renders well with other viewers and can be opened and exported with LibreOffice default GDI rendering on both 5.2.3.3 and new HarfBuzz based layout in master. On Windows 10 Pro 64-bit (1607) en-US with display/GPU Name NVIDIA GeForce GTX 750 Ti PNP Device ID PCI\VEN_10DE&DEV_1380&SUBSYS_37553842&REV_A2\4&1D0A902F&0&0018 Adapter Type GeForce GTX 750 Ti, NVIDIA compatible Adapter Description NVIDIA GeForce GTX 750 Ti Adapter RAM (2,147,483,648) bytes Installed Drivers C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvd3dumx,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2umx,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2umx,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2umx,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvd3dum,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2um,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2um,C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d3851cb7c8216f9e\nvwgf2um Driver Version 21.21.13.7270 On Version: 5.2.3.3 (x64) Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Locale: en-US (en_US); Calc: group This bug was filed from the crash reporting server and is br-782501d7-c185-40b1-a387-1d95f6ad670a. ========================================= http://crashreport.libreoffice.org/stats/crash_details/42a46c99-5cab-46b2-91c4-0f7629ef59ed http://crashreport.libreoffice.org/stats/crash_details/8320590a-14b5-452e-98b2-5400a343349f http://crashreport.libreoffice.org/stats/crash_details/be42910a-a439-487c-ad2e-40345c6c37e2 and also for 5.3.0alpha1+ Version: 5.3.0.0.alpha1+ (x64) Build ID: 9745d29227e471ce40e9992fefd92e10a48696fb CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2016-11-18_21:55:13 Locale: en-US (en_US); Calc: CL http://crashreport.libreoffice.org/stats/crash_details/88d26ade-c341-4f68-9dab-53c03e31f8fc
Interestingly, my crash in 5.2.3.3 (x86) / Windows 7 is somewhat different. It also gave a SEH Exception dialog when it crashed. http://crashreport.libreoffice.org/stats/crash_details/868e51d8-a3c8-48a6-9a8d-f50a4812744d No crash in 5.2.0.4 or 5.1.0.3 => regression. (Writer becomes sluggish after inserting the image, though)
(In reply to Aron Budea from comment #1) > Interestingly, my crash in 5.2.3.3 (x86) / Windows 7 is somewhat different. > It also gave a SEH Exception dialog when it crashed. > > http://crashreport.libreoffice.org/stats/crash_details/868e51d8-a3c8-48a6- > 9a8d-f50a4812744d Looks like you are on an AMD Radeon GPU, and on Windows 7--so not too surprising to have slight differences. Hope one of our OpenGL smart devs can sort this out. Quite a number of crash reports piling up at the same spot. > > No crash in 5.2.0.4 or 5.1.0.3 => regression. (Writer becomes sluggish after > inserting the image, though) I didn't check the earlier builds.
(Off-topic, sorry: That is one sad misuse of a vector format... It apparently encodes pixel rendering artefacts as vectors? Or is the image actually a pixel-based one anyway inside the EMF?)
*** Bug 104462 has been marked as a duplicate of this bug. ***
Opening test EMF document (attachment 128875 [details]) with OpenGL rendering, the 5.3.0beta1 build aborts at another spot in basegfx -- with default rendering, the EMF renders cleanly as vector. http://crashreport.libreoffice.org/stats/signature/RenderList::addDrawPolyPolygon(basegfx::B2DPolyPolygon%20const%20&,double,unsigned%20long,unsigned%20long,bool) http://crashreport.libreoffice.org/stats/crash_details/35f24f81-bdb8-424f-9b45-31c93d418ce6 http://crashreport.libreoffice.org/stats/crash_details/651d197b-6430-4190-9994-fa5c738130f1 =-=-= On Windows 10 Pro 64-bit (1607) en-US with nVidia GTX-750ti (372.70) Version: 5.3.0.0.beta1 (x64) Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536 CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; Locale: en-US (en_US); Calc: CL
Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Thu Jul 28 15:49:22 2016 -0700 source aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a source aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a # bad: [9eaeeb4c4a8c422b8572397d643097991a6faa85] source 90646b4966c73637ddf592acd05b3091fb3fa41f # good: [defb73f1c6e2a66dbd21ba89e684f57427e8bc4b] source 5b168b3fa568e48e795234dc5fa454bf24c9805e git bisect start '9eaeeb4c4a8c422b8572397d643097991a6faa85' 'oldest' # bad: [a0bcc19a284531b79a745ff1f8248400efbebd5c] source 1b8c61d5ca8e2a7ae7a0bcd189b7a87defecea03 git bisect bad a0bcc19a284531b79a745ff1f8248400efbebd5c # good: [6465930d0e46ac930613fcf056da070f0eb5d116] source 0ce1ecab48fc9fd9713359728dd1a10746600541 git bisect good 6465930d0e46ac930613fcf056da070f0eb5d116 # bad: [69abdca93560c484136e15b4ee8fa7771086eef9] source 4ff14e446d8659bdf64a9bd6166959be38de24e0 git bisect bad 69abdca93560c484136e15b4ee8fa7771086eef9 # good: [168a146b229c17b883f4abcb1d93ece7e98894ee] source eb2518f8e925fc266b5cd909c276a05de8fd81c6 git bisect good 168a146b229c17b883f4abcb1d93ece7e98894ee # good: [c4a532b8e597531dbc3def044dc6465d9fdcfcdf] source fa1b59710863b797d32273c58f6ab116d3ab5ad6 git bisect good c4a532b8e597531dbc3def044dc6465d9fdcfcdf # bad: [86f8a741ce01685b0d8bbd346aad17f260a76941] source d00fc303bca7765762a602531b7d3b40ce8f1740 git bisect bad 86f8a741ce01685b0d8bbd346aad17f260a76941 # bad: [03863bd4cfee3f9f239e5dba8414665a27f8bd00] source aea52b1cd35773fc0007e4b0617cd80da9f43e73 git bisect bad 03863bd4cfee3f9f239e5dba8414665a27f8bd00 # bad: [4f2b35ec972754190c99e357aef6d9119e28f5cc] source 7a887df4db129ac5222fd4068173b5a06d107a59 git bisect bad 4f2b35ec972754190c99e357aef6d9119e28f5cc # good: [c92a5e8ff49eaccc705b9d6d79ca4abe5a34e04e] source b073ef93313f9e07f9f8b7bf65dc74721b15da6c git bisect good c92a5e8ff49eaccc705b9d6d79ca4abe5a34e04e # good: [373f7c0c2a0078ed1debf01bcb0a65b5d98d722d] source df9414084b46c1712dc7151f50023438c62301e2 git bisect good 373f7c0c2a0078ed1debf01bcb0a65b5d98d722d # bad: [5a3ec9ad63cca2a77bd34818c0ecd2fe38b69c84] source aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a git bisect bad 5a3ec9ad63cca2a77bd34818c0ecd2fe38b69c84 # good: [c32ff18dacca9e3b7efc316aa5f5f1f7381c6a52] source 7150d4840f090a38ac4390ac503ac10552ed1ae4 git bisect good c32ff18dacca9e3b7efc316aa5f5f1f7381c6a52 # first bad commit: [5a3ec9ad63cca2a77bd34818c0ecd2fe38b69c84] source aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a
Adding Cc: to Tomaž Vajngerl, please take a look. https://cgit.freedesktop.org/libreoffice/core/commit/?id=aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2016-07-27 19:06:04 (GMT) committer Tomaž Vajngerl <quikee@gmail.com> 2016-07-28 13:05:06 (GMT) "tdf#100915 draw antialiased line just for polygon outline To get the anti-aliased polygon we draw a anti-aliased line around every trapezoid. This works fine until we draw a transparent polygon where the lines become visible because of blending. A much better and faster way is to just draw the polygon outline with anti-aliased lines. This is done with this commit."
(In reply to Aron Budea from comment #7) > > https://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a That may be it, because if I uncheck the Tools -> Options -> View: Use anti-alaising value but keep OpenGL opening the sample EMF does not crash. But the graphic rendering with OpenGL is not at all smooth and looks rasterized.
Aron's crash report is beautiful: 0 mergedlo.dll basegfx::B2DPolygon::getB2DPoint(unsigned long) basegfx/source/polygon/b2dpolygon.cxx:1157 1 mergedlo.dll OpenGLSalGraphicsImpl::DrawPolyLine(basegfx::B2DPolygon const &,float,basegfx::B2DLineJoin,com::sun::star::drawing::LineCap,float) vcl/opengl/gdiimpl.cxx:818 And line 818 is: glm::vec2 p1(rPolygon.getB2DPoint(nPoints - 1).getX(), rPolygon.getB2DPoint(nPoints - 1).getY()); I guess that we somehow have a single point line that has entered this code-path (?) =) and that nPoints-1 -> a very large unsigned number & bang ... Aron - can you confirm that in the debugger ? I wonder what we should/could do in this case =)
We just have to guard against such nonsense, I guess it is naive to expect that the EMF input filter takes care of this..
Also, it is interesting that some of crashreports have "UseOpenGL = false". It seems that we can't rely on that being correct, but I don't know how it is possible.
(In reply to Tomaz Vajngerl from comment #11) > Also, it is interesting that some of crashreports have "UseOpenGL = false". > It seems that we can't rely on that being correct, but I don't know how it > is possible. Just tested this again, with the same result. OpenGL was definitely on at first (there's no crash if it's off), I got: a crash, a "SEH Exception: ACCESS VIOLATION" dialog, then during the next start a crash report and a recovery dialog, and indeed by that time OpenGL rendering had been turned off automatically (and that state goes in the crash report). A fresh crash report (it's the same as my previous one): http://crashreport.libreoffice.org/stats/crash_details/45481103-70c8-4421-986c-d35d57621cbf
(In reply to Michael Meeks from comment #9) > Aron - can you confirm that in the debugger ? I wonder what we should/could > do in this case =) Yes, I debugged in master in the place where Stuart's crash report pointed to in comment 5 (the code changed in 5.3), and indeed nPoints is 0 (it's the divisor of a modulo operation there).
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cee552d2071601b6f4131eda9e9a0a17768ea272 tdf#104034 skip polygons with less than 2 points It will be available in 5.4.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.
Drawing now with OpenGL enabled anti-alaised, on Windows 10 Pro 64-bit (1607) en-US with Version: 5.4.0.0.alpha0+ Build ID: cb598029835477326b190bc99abd31a487cc5a91 CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; TinderBox: Win-x86@39, Branch:master, Time: 2016-12-09_00:51:51 Locale: en-US (en_US); Calc: CL
Backport to libreoffice-5-3: https://gerrit.libreoffice.org/#/c/31789/ For libreoffice-5-2 the solution is different: https://gerrit.libreoffice.org/#/c/31790/
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=210d0999a2b997566f3aeb183f50b2aa2788dbf3&h=libreoffice-5-2 tdf#104034 skip polygons with less than 2 points (LO 5-2) It will be available in 5.2.5. 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.
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6cf3040fe180ae684a60655685a493843c2b162a&h=libreoffice-5-3 tdf#104034 skip polygons with less than 2 points It will be available in 5.3.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.