[GRASS-dev] [GRASS GIS] #3833: pygrass.gis.region.Region + WIND_OVERRIDE + non-existing path kills the process

GRASS GIS trac at osgeo.org
Tue Apr 30 10:45:03 PDT 2019


#3833: pygrass.gis.region.Region + WIND_OVERRIDE + non-existing path kills the
process
--------------------------+-------------------------
  Reporter:  pmav99       |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:
 Component:  PyGRASS      |    Version:  unspecified
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by pmav99):

 OK, the problem seems to be that the generated gis.py (i.e.
 {{{lib/python/ctypes/OBJ.x86_64-pc-linux-gnu/gis.py]}}}), doesn't define
 {{{errcheck}}} for some of the functions, including {{{G_get_window}}} and
 {{{G_get_element_window}}}. Can anyone provide a hint, why these functions
 don't have {{{errcheck}}} defined while others do?

 Some relevant links:

 - [https://stackoverflow.com/questions/24349806/catch-exception-in-ctypes-
 based-on-c-exit-code SO question]
 - The same problem was solved
 [https://github.com/DECODEproject/zenroom/issues/47#issuecomment-446173032
 here] using
 [https://docs.python.org/3/library/ctypes.html#ctypes._FuncPtr.errcheck
 ctypes.errcheck]
 - [https://stackoverflow.com/questions/50669907/how-to-use-ctypes-errcheck
 SO example using errcheck]

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3833#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list