[Qgis-developer] [Fwd: Re: [Quantum GIS] #1080: crash when loading GRASS vectors and rasters]

Paolo Cavallini cavallini at faunalia.it
Thu May 22 02:10:06 EDT 2008


Thanks a lot jef!
Could this be backported to 0.10 branch, so that we can release a
bugfixed 0.10.1?
All the best.
pc

-------- Messaggio Originale  --------
Oggetto: Re: [Quantum GIS] #1080: crash when loading GRASS vectors and
rasters


 This diagnosis isn't quite right.  The GRASS libraries QGIS uses are not
 locale
 aware.  GRASS uses standard C library functions to parse numbers in
 strings,
 although these functions expect to see commas for certain locales (like
 it_IT
 and de_DE).

 But the GRASS files contain dots (e.g. for the default window) and
 therefore
 the parsing fails.  This lead to a fatal GRASS error which was not catched
 by
 the setjmp/longjmp trick and therefore caused the "crash" (the GRASS
 routines
 terminated the process).

 I addressed this in r8476 by setting the locale to "C" before calling the
 GRASS
 function to retrieve the SRS.  This should fix this bug, but there are
 probably
 much more places where GRASS functions should be called with locale "C"
 because
 the outerwise break. Maybe we need to wrap each and every GRASS call that
 way.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1080#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS,
and GRASS formats
-- 
Paolo Cavallini, see: * http://www.faunalia.it/pc *


More information about the Qgis-developer mailing list