Bug#772123: libsdl-perl: SDLx::Text->write_to segfaults

Wilfried Klaebe w+reportbug at chaos.in-kiel.de
Fri Dec 5 10:12:59 UTC 2014


Package: libsdl-perl
Version: 2.542-1+b1
Severity: normal

Dear Maintainer,

I am getting segfaults using SDLx::Text->write_to().

I have a minimal testcase which reproduces the problem in 100% of cases:

---8<---

#!/usr/bin/perl
use strict;
use SDL;
use SDL::Surface;
use SDLx::App;
use SDLx::Text;

my $dt = 1/60;
my $min_t = 1/60;

my $W = 1680/2;
my $H = 1050/2;

my $wt = 0xFFFFFFFF;
my $bk = 0x000000FF;

my $app = SDLx::App->new(w=>$W, h=>$H, dt=>$dt, min_t=>$min_t);
my $fgs = SDL::Surface->new_from($app, $app->w, $app->h, $app->format->BitsPerPixel, 0, 0, 0, 0);
my $fgt = SDLx::Text->new(h_align => 'center', size => 18, color => $bk, x => $W/2, y => 18);

$app->add_show_handler(sub{
	my($delta,$app)=@_;
	print "boom?\n";
	$fgt->write_to($fgs,"segfault");
	print "no...\n";
});

$app->run();

exit(0);

__END__

--->8---

Output when run:

boom?
Segmentation fault

I'll be happy to help debugging. I'm not a perl or SDL guru though.

Best regards,
Wilfried

-- System Information:
Debian Release: jessie/sid
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'testing'), (990, 'stable'), (900, 'testing-updates'), (90, 'unstable'), (9, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.18.0-rc7 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libsdl-perl depends on:
ii  fonts-sil-gentium-basic     1.1-7
ii  libalien-sdl-perl           1.444-1
ii  libc6                       2.19-13
ii  libsdl-gfx1.2-5             2.0.25-4
ii  libsdl-image1.2             1.2.12-5+b5
ii  libsdl-mixer1.2             1.2.12-11+b1
ii  libsdl-pango1               0.1.2-6
ii  libsdl-ttf2.0-0             2.0.11-3
ii  libsdl1.2debian             1.2.15-10
ii  libtie-simple-perl          1.03-1
ii  multiarch-support           2.19-13
ii  perl                        5.20.1-3
ii  perl-base [perlapi-5.20.0]  5.20.1-3

libsdl-perl recommends no packages.

Versions of packages libsdl-perl suggests:
ii  fonts-freefont-ttf  20120503-4

-- no debconf information



More information about the pkg-perl-maintainers mailing list