[poppler] GfxGouraudTriangleShading::getTriangle assert failure

Harry Roberts harry at midnight-labs.org
Sat Dec 8 09:27:51 PST 2012


Hi,

I have a PDF which raises assertion error in `
GfxGouraudTriangleShading::getTriangle`.

This assertion doesn't make sense, isParameterized() check if `nFuncs > 0`,
but the code handles both cases.

When disabling the assertion the PDF appears to render correctly.

GfxState.cc line 4481
---------------------------------------------------------------------

  assert(!isParameterized());

  v = triangles[i][0];
  *x0 = vertices[v].x;
  *y0 = vertices[v].y;
  if (nFuncs > 0) {
    in = colToDbl(vertices[v].color.c[0]);
    for (j = 0; j < nFuncs; ++j) {
      funcs[j]->transform(&in, &out[j]);
    }
    for (j = 0; j < gfxColorMaxComps; ++j) {
      color0->c[j] = dblToCol(out[j]);
    }
  } else {
    *color0 = vertices[v].color;
  }


---------------------------------------------------------------------


Cheers,

 - Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20121208/189a2f00/attachment-0001.html>


More information about the poppler mailing list