|
From: | Morten Sjøgren |
Subject: | [Swftools-common] Re: Segmentation fault in polyops_startclip |
Date: | Mon, 22 Feb 2010 15:06:47 +0100 |
Hi,
I've checkout the swftools from git and with pdf2swf I get a segmentation fault in "polyops_startclip" on some pages from a PDF created withAdobe InDesign CS4
---------------------------------------------------------------------------------------------------------
VERBOSE clearSoftMask statepos=3
VERBOSE Casting gfxline of 0 segments to a stroke-polygon
VERBOSE Casting gfxline of 5 segments (5 line segments) to a gfxpoly
VERBOSE Comparing polygon renderings of size 852x233 and 852x233
VERBOSE Bad SVP rewinding result- polygons don't match
VERBOSE Error in polygon processing
Segmentation fault
---------------------------------------------------------------------------------------------------------
It segmentation fault because "i->out" is null in "polyops_startclip" and it's null because of a check that fails in:
"ArtSVP* run_intersector(ArtSVP*svp, ArtWindRule rule)"
When the check "if(!compare_bitmaps(&bbox, data1, data2)) {" fails it causes the function to "return 0;", which is bad since the return apparently is used later on.
I'm attaching a temporary patch that fixes the problem for me, but I'm sure there must be a better solution, like figuring out why the two bitmaps are different.
Yours
- Morten Sjøgren
[Prev in Thread] | Current Thread | [Next in Thread] |