[GRASS-dev] [GRASS GIS] #1123: Cairo driver dies unexpectedly after d.font

#1123: Cairo driver dies unexpectedly after d.font
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.5.0
Component: Display | Version: svn-develbranch6
Keywords: cairo | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Hi,

working in 6.5svn, the Cairo driver dies unexpectedly a command after I
call d.font.

{{{
G65> d.mon start=cairo
cairo: collecting to file: map.png,
GRASS_WIDTH=1026, GRASS_HEIGHT=903
Graphics driver [cairo] started

G65> d.font Vera

G65> d.barscale at=7.992203,5.862832 bcol=none
ERROR: Cairo_draw_bitmap: Failed to create source
}}}

sometimes it also gives this error message:
{{{
ERROR eof from graphics driver.
}}}

and the driver is then closed. without d.font it all works fine.

libcairo2 1.6.4, in debian/stable amd64
haven't tested on other branches yet.

?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1123&gt;
GRASS GIS <http://grass.osgeo.org>

#1123: Cairo driver dies unexpectedly after d.font
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.5.0
Component: Display | Version: svn-develbranch6
Keywords: cairo | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by glynn):

Replying to [ticket:1123 hamish]:
> working in 6.5svn, the Cairo driver dies unexpectedly a command after I
call d.font.

{{{
ERROR: Cairo_draw_bitmap: Failed to create source
}}}

lib/cairodriver/Draw_bitmap.c needs sync'ing with 7.0. It can't be merged
due to other changes to the driver architecture, but it shouldn't be too
hard to take the 7.0 version then tweak it for 6.x.

Cairo typically requires surfaces to be word-aligned. Older versions would
create unaligned surfaces which produced garbage when used as a source.
Newer versions simply refuse to create them.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1123#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1123: Cairo driver dies unexpectedly after d.font
------------------------+---------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.5.0
Component: Display | Version: svn-develbranch6
Resolution: duplicate | Keywords: cairo
  Platform: All | Cpu: All
------------------------+---------------------------------------------------
Changes (by glynn):

  * status: new => closed
  * platform: Linux => All
  * resolution: => duplicate
  * cpu: x86-64 => All

Comment:

Replying to [ticket:1123 hamish]:

> working in 6.5svn, the Cairo driver dies unexpectedly a command after I
call d.font.
>
{{{
ERROR: Cairo_draw_bitmap: Failed to create source
}}}

Duplicate of #1152. This one came first, but most of the useful discussion
is on #1152.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1123#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>