Bug 56463 - Assertion `!isParameterized()' failed in function GfxGouraudTriangleShading::getTriangle
Summary: Assertion `!isParameterized()' failed in function GfxGouraudTriangleShading::...
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-27 15:05 UTC by Grégoire Payen de La Garanderie
Modified: 2012-11-02 12:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace (3.40 KB, text/plain)
2012-10-27 15:05 UTC, Grégoire Payen de La Garanderie
Details
Fall back for parameterized gouraud shadings (437 bytes, patch)
2012-10-29 11:29 UTC, Thomas Freitag
Details | Splinter Review
Fall back for parameterized gouraud shadings (438 bytes, patch)
2012-10-29 12:22 UTC, Thomas Freitag
Details | Splinter Review
support Gouraud shading in cairo (1.45 KB, patch)
2012-10-30 11:00 UTC, Adrian Johnson
Details | Splinter Review

Description Grégoire Payen de La Garanderie 2012-10-27 15:05:29 UTC
Created attachment 69153 [details]
Backtrace

Hello,

I am using Poppler 0.20.5 and Evince 3.4.0 on Arch Linux.

When I go to some pages (like most pages between 102 and 129) of the PGFPLOTS Manual ( http://pgfplots.sourceforge.net/pgfplots.pdf ), Evince crash with :

evince: GfxState.cc:4179: void GfxGouraudTriangleShading::getTriangle(int, double*, double*, GfxColor*, double*, double*, GfxColor*, double*, double*, GfxColor*): Assertion `!isParameterized()' failed.

Attached is the backtrace produced by GDB. By the way, I tried to recompile poppler with debug symbols without success; what’s the proper way to get them ?
Comment 1 Thomas Freitag 2012-10-29 11:29:20 UTC
Created attachment 69220 [details] [review]
Fall back for parameterized gouraud shadings

The problem is that cairo says since 1.12.0 that it implements also the gouraud shading, but in real it implements only the non parameterized ones (for parametrized ones the second version of getTriangle with double pointers for colors must be used).
This is just a cowardly patch, which falls back to the Gfx implementation for parameterized shadings. A better way would be to implement this kind of shading in the cairo output device, too.
Comment 2 Thomas Freitag 2012-10-29 12:22:16 UTC
Created attachment 69223 [details] [review]
Fall back for parameterized gouraud shadings

Sorry, of course we need to return false so that Gfx does the painting...
Comment 3 Adrian Johnson 2012-10-30 11:00:35 UTC
Created attachment 69298 [details] [review]
support Gouraud shading in cairo

I was going to say that patch looks good for now until I get time to implement parameterized Gouraud shading in CairoOutputDev. But when I looked at the code I found the implementation is so simple that I went ahead and fixed it with this patch.
Comment 4 Carlos Garcia Campos 2012-11-01 13:10:52 UTC
Comment on attachment 69298 [details] [review]
support Gouraud shading in cairo

Review of attachment 69298 [details] [review]:
-----------------------------------------------------------------

Looks good, please push it. Thanks!
Comment 5 Adrian Johnson 2012-11-02 12:30:39 UTC
pushed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.