Crash saving as pdf (when clip has filter applied to clipping region)
Summarises comments up to #203 (comment 160558228) and new information from inbox#2095 (closed)
Steps to reproduce:
Creating a minimal file (test.svg)
- Open inkscape
- Create two objects (e.g. rectangles)
- Set a filter effect on the top object (e.g. Filter > Colour > Black Light, which shouldn't effect clipping)
- Select both objects and clip them.
- Try to save as pdf (default settings are sufficient)
- Crash.
Alternatively, originally occurred with Custom_Burger_Tokens_2.svg
What happened?
For the original file, Inkscape stalls for a minute or more, then produces a dialog reading "Inkscape encountered an internal error and will close now." Inkscape then crashes. A PDF file with the desired filename is created, but it's 0 bytes in size, and when I try to open it, my PDF reader reports it is "not a PDF or corrupted".
Backtrace from duplicate issue inbox#2095 (closed)
Alvin Penner has also attached a longer backtrace for inbox#2095 (comment 311058771) that differs slightly from the attached backtrace
Transforms seem to affect the crash
This file crashes: inkscape-dat-crash.svg
This file doesn't: inkscape-dat-crash-no.svg
They are similar files, both have a bitmap clipped by a rectangle with a blur. Here is the diff
--- a/inkscape-dat-crash.svg
+++ b/inkscape-dat-crash-no.svg
@@ -43,8 +43,8 @@
id="rect900"
width="145.5"
height="418.39398"
- x="-506"
- y="402.86218"
+ x="326.80765"
+ y="358.17108"
transform="rotate(-90)" />
</clipPath>
</defs>
@@ -81,13 +81,13 @@
</rdf:RDF>
</metadata>
<image
- y="305.21045"
- x="297.81067"
+ y="-550.18457"
+ x="317.00665"
id="image5008"
xlink:href="truncated"
height="310"
width="551.11115"
- transform="rotate(90,314.69031,314.69031)"
+ transform="rotate(90)"
What should have happened?
Inkscape saves the PDF successfully.
Workaround
Taken from #481 (closed)
Uncheck "rasterize filter effects" from the save options, or remove filters from the clip
Inkscape Version and Operating System:
- Inkscape Version: 0.92.4
- Operating System: Windows 10 Home 64-bit
- Operating System version: Windows 10.0.17134 Build 17134
- Installed RAM: 8.0 GB
- Processor: 2.50 GHz, x64-based
Present in Inkscape 0.92.4 5da689c313, 2019-01-14 and 1.0alpha (9dee831c, 2019-01-15) on Linux Mint 19.1
What I've Tried (Unsuccessfully):
- Restarting Inkscape
- Closing all other programs before exporting PDF
- Deleting an invisible "ghost" path that I thought might be screwing up export
- Uninstalling and reinstalling Inkscape