On Oct 25, 2008, at 4:56 PM, Hezekiah M. Carty wrote:
> While testing trying to patch the recently discussed multiple output
> streams with the same driver bug I found something that is possibly
> useful for diagnosing this Cairo segmentation fault issue, and
> certainly useful as a workaround otherwise.  If plend is only called
> after all plotting is complete and calls to plend1 are used between
> plots then no segfaults seem to occur.
>
> Example:
>
> plsdev "xcairo"
> plinit ()
> plenv 0.0 1.0 0.0 1.0 1 0
> plend1 ()
> plsdev "xcairo"
> plinit ()
> plenv 0.0 1.0 0.0 1.0 1 0
> plend1 ()
> ...
> plend ()
>
> In this case, no segfault occurs on my system (Ubuntu Hardy, 64bit,
> latest PLplot SVN).  The segfault still occurs if I replace the
> "plend1" calls with "plend".
>
> Hope this helps, either as an indicator of where the problem
> originates or simply as a relatively simple workaround.

Thanks for the observation! I'm not sure if I am any closer to  
actually figuring it out but I believe the problem might be a shared  
libraries (or libltdl) issue. One difference between plend and plend1  
is the call to lt_dlexit() in plend(). If this is commented out then  
the segfault goes away. Also, if you set  ENABLE_DYNDRIVERS=OFF and  
rebuild then the test program will not segfault. Perhaps there is  
some issue with the same executable loading and unloading dynamic  
modules multiple times on some machines, or with some versions of  
libltdl? Or perhaps it is specific to the Cairo library?

-Hazen


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to