Skip to content

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459. Abort trap: 6 #912

Open
@matty22

Description

@matty22

Issue

I seem to be hitting a bug when using ctx.fillText. In the code sample below, I can do ctx.fillRect fine and do get a rectangle output with the correct color and dimensions, but the text string errs. If I comment out the ctx.fillText("Hello World", 100, 100); line, the canvas builds the image as expected. Obviously, I'd like to stick some text on top of the canvas before the image file is generated, but .fillText gives the following error:

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459. Abort trap: 6

Steps to Reproduce

// Paint bg
  ctx.fillStyle = bgcolor;
  ctx.fillRect(0, 0, width, height);
  
  // Paint text
  ctx.font = '30px Arial';
  ctx.textAlign = 'center';
  ctx.textBaseline = 'middle';
  ctx.fillStyle = color;
  // If I comment this fillText line, no error appears in console
  ctx.fillText("Hello World", 100, 100);

Your Environment

  • Version of node-canvas: 1.6.5
  • Environment: node v7.8.0 on Mac OSX Sierra 10.12.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions