On 2008-03-11 00:01-0400 Hezekiah M. Carty wrote:

> I think I have found a consistent segmentation fault while using the
> xcairo and pngcairo plotting devices under PLplot 5.9.0 (Debian
> packages) and svn head on Debian Sid, x86-32.  I have not tested the
> other *cairo devices, but given the error messages I think it would
> affect others as well.
> The following sequence of commands give the segfault:
> plinit (selecting xcairo as the plotting device)
> plenv 0.0 1.0 0.0 1.0 1 0 (I don't think the numbers matter)
> plend
> plinit (select xcairo again)
> plenv 0.0 1.0 0.0 1.0 1 0 (Again, the numbers don't seem to matter)
> ^^ This causes a segmentation fault

Hi Hez:

Thanks for spotting this issue which I have just confirmed with the pscairo
device using a freshly compiled svn version of PLplot on Debian testing.  I
used the following test C code:

#include "plcdemos.h"
main(int argc, const char *argv[])

     plenv(0.0, 1.0, 0.0, 1.0, 1, 0);
     plenv(0.0, 1.0, 0.0, 1.0, 1, 0);

I built this test code identically to how the installed C examples are

The first file has the expected labelled box, the second file is empty.

Hazen, do you confirm the pscairo segfault with the above code
on Mac OS X as well?

If I specify the ps device both times instead of pscairo, I get no segfault
and two identical plots with the expected labelled box.  I get similar good
results for -dev png and -dev psttf as well.  So I think the problem is
specific to the cairo device driver.

If the cairo device drivers does not properly shut down libcairo at plend
you could get memory management problems with symptoms like what we are
seeing.  I suggest you look carefully at what the working psttf.c device
driver does in this regard since it involves a large stack of external
libraries (many of them common with the stack of libraries that cairo.c
depends on including libpangocairo and libcairo).

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project

Linux-powered Science

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Plplot-devel mailing list

Reply via email to