Bug 56463

Summary: Assertion `!isParameterized()' failed in function GfxGouraudTriangleShading::getTriangle
Product: poppler Reporter: Grégoire Payen de La Garanderie <gregoire>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Backtrace
Fall back for parameterized gouraud shadings
Fall back for parameterized gouraud shadings
support Gouraud shading in cairo

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.