Skip to content

Instantly share code, notes, and snippets.

@moritz
Created November 29, 2011 13:58
Show Gist options
  • Save moritz/1404870 to your computer and use it in GitHub Desktop.
Save moritz/1404870 to your computer and use it in GitHub Desktop.
Segfault from SVG::Plot
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff37acfb4 in Rakudo_cont_is_rw_scalar ()
from /home/moritz/p6/rakudo/install/lib/parrot/3.10.0-devel/dynext/perl6_ops.so
(gdb) bt
#0 0x00007ffff37acfb4 in Rakudo_cont_is_rw_scalar ()
from /home/moritz/p6/rakudo/install/lib/parrot/3.10.0-devel/dynext/perl6_ops.so
#1 0x00007ffff379ad56 in Parrot_perl6_decontainerize_return_value_p_p ()
from /home/moritz/p6/rakudo/install/lib/parrot/3.10.0-devel/dynext/perl6_ops.so
#2 0x00007ffff7a6d7f6 in runops_fast_core ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#3 0x00007ffff7a6d66a in runops_int ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#4 0x00007ffff7a5591e in runops ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#5 0x00007ffff7a511b6 in Parrot_pcc_invoke_from_sig_object ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#6 0x00007ffff7a4541d in Parrot_ext_call ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#7 0x00007ffff7b23688 in Parrot_Task_invoke ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#8 0x00007ffff7a51162 in Parrot_pcc_invoke_from_sig_object ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#9 0x00007ffff7a4541d in Parrot_ext_call ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#10 0x00007ffff7a719dd in Parrot_cx_outer_runloop ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#11 0x00007ffff7a71a6d in Parrot_cx_begin_execution ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#12 0x00007ffff7a7884d in Parrot_pf_execute_bytecode_program ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#13 0x00007ffff7a40d5a in Parrot_api_run_bytecode ()
from /home/moritz/p6/rakudo/install/lib/libparrot.so.3.10.0
#14 0x0000000000401550 in main ()
use SVG;
use SVG::Plot;
my @d1 = (0..100).map: { sin($_ / 10.0) };
my @d2 = (0..100).map: { cos($_ / 10.0) };
my $svg = SVG::Plot.new(
width => 400,
height => 250,
values => (@d1.item, @d2.item),
title => 'sin(x/10), cos(x/10)',
).plot(:lines);
say SVG.serialize($svg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment