Skip Menu |

This queue is for tickets about the Pango CPAN distribution.

Report information
The Basics
Id: 53652
Status: stalled
Priority: 0/
Queue: Pango

People
Owner: Nobody in particular
Requestors: cornelius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: bus error (pango-devel) on snowleopard.
on snow leopard , with pango-devel (1.25.6) and Pango module from git. I ran a pango + cairo script , then it crashed. here is the crash report and script.
Subject: perl5.10.1_2010-01-13-230105_Cornelius.crash

Message body not shown because it is not plain text.

Subject: scale33.pl
#!/usr/bin/env perl use utf8; use warnings; use strict; use lib 'lib'; use Cairo; use Pango; use AIINK::Pango; use constant { text_offset => 80, width => 900, height => 2000 , }; sub draw_note; sub draw_extents; # GistID: my $surface = Cairo::ImageSurface->create ('argb32', width , height ); my $cr = Cairo::Context->create ($surface); my $dpi = 600; # $cr->scale( 1 / 25.4 * $dpi, 1 / 25.4 * $dpi ); $cr->scale( 3, 3 ); $cr->translate( 1 , 1 ); $cr->set_line_width(0.5); $cr->set_font_size(5); my @fonts = ( 'Folio Md BT', 'Souvenir Lt BT', 'News701 BT', 'News701 BT', 'Apple LiGothic', 'AR Roman1 Medium', 'AR Roman1 Heavy', 'AR RGothic1 Bold', ); for my $fontname ( @fonts ) { my $layout = Pango::Cairo::create_layout ($cr); $layout->set_text("orz123"); my $desc = Pango::FontDescription->from_string("$fontname Normal 12"); $desc->set_absolute_size( 48 * Pango->scale() ); my $lang = Pango::Language->from_string( 'en_US' ); $layout->set_font_description ($desc); Pango::Cairo::show_layout($cr, $layout); # AIINK::Pango->draw_extents($cr, $layout, $desc, 'en_US'); AIINK::Pango->draw_extents( $cr, $layout, $desc, $lang ); $cr->translate( 0 , text_offset ); } $cr->show_page(); $surface->write_to_png ('pango-extents-en.png'); system('open','pango-extents-en.png');
On Wed Jan 13 10:08:52 2010, CORNELIUS wrote: Show quoted text
> on snow leopard , with pango-devel (1.25.6) and Pango module from
git. Show quoted text
> > I ran a pango + cairo script , then it crashed. > > here is the crash report and script.
beside this is the variants i use: pango-devel @1.25.6_0+macosx+no_x11+quartz (active) cairo @1.8.8_0+macosx+no_x11+quartz (active) gtk2 @2.18.6_0+no_x11+quartz (active)
pango crashed in this function: sub draw_extents { my ( $class, $cr, $layout, $desc, $lang ) = @_; my $layoutline = $layout->get_line(0); my ( $ink, $logical ) = $layoutline->get_pixel_extents(); my $fontmap = Pango::Cairo::FontMap->new_for_font_type('ft'); my $context = $fontmap->create_context(); my $font = $context->load_font($desc); my $metrics = $font->get_metrics($lang); my $ascent = $metrics->get_ascent() / Pango->scale; my $descent = $metrics->get_descent()/ Pango->scale; my $baseline_y = $layout->get_baseline() / Pango->scale; # logical rectangle $cr->save; $cr->set_source_rgba( 0, 0, 1 , 1 ); $cr->rectangle( $logical->{x} , $baseline_y - ascent($logical) , $logical->{width}, $logical->{height} ); $cr->stroke; $class->draw_note( $cr, 'logical', 100 , 0 ); $cr->restore; # ink rectangle $cr->save; $cr->set_source_rgba( 0, 0, 0, 0.4 ); $cr->rectangle( $ink->{x} , $baseline_y - ascent($ink) , $ink- Show quoted text
>{width}, $ink->{height} );
$cr->stroke; $class->draw_note( $cr, 'ink', $ink->{x}, $baseline_y - ascent($ink) ); $cr->restore; # draw baseline $cr->save; $cr->set_source_rgba( 1 , 0, 0 , 1 ); $cr->move_to( 0 , $baseline_y ); $cr->line_to( $logical->{width} + 20 , $baseline_y ); $cr->stroke; $class->draw_note($cr, 'baseline' , $logical->{width} + 2 , $baseline_y ); $cr->restore; # draw descent line $cr->save; $cr->set_source_rgba( 1 , 0, 0 , 0.5 ); $cr->move_to( 0 , $baseline_y + $descent ); $cr->line_to( $logical->{width} , $baseline_y + $descent ); $cr->stroke; $class->draw_note($cr, 'descent line' , 0 , $baseline_y + $descent ); $cr->restore; # draw ascent line $cr->save; $cr->set_source_rgba( 1 , 0, 0 , 0.5 ); $cr->move_to( 0 , $baseline_y - $ascent ); $cr->line_to( $logical->{width} , $baseline_y - $ascent ); $cr->stroke; $class->draw_note($cr, 'ascent line' , 0 , $baseline_y - $ascent ); $cr->restore; } On Wed Jan 13 10:09:51 2010, CORNELIUS wrote: Show quoted text
> On Wed Jan 13 10:08:52 2010, CORNELIUS wrote:
> > on snow leopard , with pango-devel (1.25.6) and Pango module
from Show quoted text
> git.
> > > > I ran a pango + cairo script , then it crashed. > > > > here is the crash report and script.
> > beside this is the variants i use: > > pango-devel @1.25.6_0+macosx+no_x11+quartz (active) > cairo @1.8.8_0+macosx+no_x11+quartz (active) > gtk2 @2.18.6_0+no_x11+quartz (active)
and if I change to use "pango" port. 1.24.5 version: I got that: ============= -~work (canvas-content) % pll scale33-test.pl Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:35 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFont: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetFontSize: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetTextMatrix: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextClearRect: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextSetRGBFillColor: invalid context 0x0 Wed Jan 13 23:35:36 Cornelius.local perl[89927] <Error>: CGContextShowGlyphsAtPoint: invalid context 0x0
Subject: perl5.10.1_2010-01-13-232932_Cornelius.crash

Message body not shown because it is not plain text.

On Wed Jan 13 10:08:52 2010, CORNELIUS wrote: Show quoted text
> on snow leopard , with pango-devel (1.25.6) and Pango module from git. > > I ran a pango + cairo script , then it crashed. > > here is the crash report and script.
The crash appears to happen deep within libpango, so I think this is not related to the Perl bindings. But can you post a small self-contained example program that exhibits the crash? In particular, please don't use AIINK::Pango in the example.