Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault (core dumped) on Cairo::Surface::PDF.show_page() #37

Open
wayland opened this issue Jun 10, 2024 · 2 comments
Open

Comments

@wayland
Copy link

wayland commented Jun 10, 2024

Hi! I get a Segfault as follows:

$ raku -e 'use Cairo; my $surface = Cairo::Surface::PDF.new(filename => "file.pdf", :width(1683e0), :height(2383e0)); $surface.show_page()'
Segmentation fault (core dumped)

Versions:

$ raku --version
Welcome to Rakudo™ v2022.04.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.04.

$ rpm -qa | grep -i cairo | sort | ack -v i686
cairo-1.17.6-1.fc36.x86_64
cairo-devel-1.17.6-1.fc36.x86_64
cairo-gobject-1.17.6-1.fc36.x86_64
cairo-gobject-devel-1.17.6-1.fc36.x86_64
cairomm-1.14.2-22.fc36.x86_64

HTH,

@dwarring
Copy link
Collaborator

Have fixed. Your example should work, without seg-faulting with Cairo v0.3.5. Although it still needs some content to be added to produce a valid PDF.

I've also changed Cairo::Surface::SVG and Cairo::Image, which had similar issues with the new method. These now work the same way.

For example:

   my $image1 = Cairo::Image.new(:width(256), :height(256));  # creates a new blank image
   my $image2 = Cairo::Image.new(:filename<doc/examples/camelia.png> ); # load existing image

Thanks, for the report.

@wayland
Copy link
Author

wayland commented Jun 11, 2024

Great! Yes, I know it needs content to be useful; I just went for the minimum to produce a segfault :) .

Good to hear that you picked up the other problems as well. I'll try it and see what I get.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants