[GRASS-dev] [GRASS GIS] #943: wxpython gui hangs after switching to cairo display driver

GRASS GIS trac at osgeo.org
Sat May 18 00:49:19 PDT 2013


#943: wxpython gui hangs after switching to cairo display driver
------------------------------------------+---------------------------------
 Reporter:  epatton                       |       Owner:  grass-dev@…              
     Type:  defect                        |      Status:  new                      
 Priority:  critical                      |   Milestone:  6.4.3                    
Component:  wxGUI                         |     Version:  svn-develbranch6         
 Keywords:  cairo, driver, gui, wxpython  |    Platform:  Linux                    
      Cpu:  All                           |  
------------------------------------------+---------------------------------

Comment(by hamish):

 the following patch against devbr6 changes the error message from "File
 <...> not found" to "ERROR: Rendering failed. Details: Error reading PPM
 file" (the file exists but is empty).

 {{{
 Index: gui/wxpython/core/render.py
 ===================================================================
 --- gui/wxpython/core/render.py (revision 56191)
 +++ gui/wxpython/core/render.py (working copy)
 @@ -87,13 +87,14 @@
                          self.opacity, self.hidden))

          # generated file for each layer
 -        self.gtemp = tempfile.mkstemp()[1]
 -        self.maskfile = self.gtemp + ".pgm"
          if self.type == 'overlay':
 -            self.mapfile  = self.gtemp + ".png"
 +            tempfile_sfx =".png"
          else:
 -            self.mapfile  = self.gtemp + ".ppm"
 -
 +            tempfile_sfx =".ppm"
 +        self.mapfile = tempfile.mkstemp(suffix = tempfile_sfx)[1]
 +        # do we need to `touch` the maskfile so it exists?
 +        self.maskfile = self.mapfile.rsplit(".",1)[0] + ".pgm"
 +
      def __del__(self):
          Debug.msg (3, "Layer.__del__(): layer=%s, cmd='%s'" %
                     (self.name, self.GetCmd(string = True)))
 }}}

 shooting in the dark:
 I guess the error means that g.pnmcomp is trying to read from the existing
 GRASS_CAIROFILE before adding to it as GRASS_CAIRO_READ is set(?), or
 maybe the GRASS_RENDER_IMMEDIATE=TRUE is causing the PNG driver to be used
 instead?

 (I notice GRASS_PNG_READ is referenced in a few places, but
 GRASS_CAIRO_READ is not at all)


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/943#comment:10>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list