Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Roger Bivand
On Fri, 18 Feb 2011, Bob and Deb wrote: Roger, I have only 2 QGIS plugins that uses R. They are Carson Farmer's manageR and Volkan Osman Kepoglu's SDA4P (see http://ggit.metu.edu.tr/~volkan/index.html). Looking at the source code I see they both use rgdal. I was not using these plugins when

Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Roger Bivand
On Fri, 18 Feb 2011, Even Rouault wrote: Le vendredi 18 février 2011 01:02:30, Even Rouault a écrit : So my suggestion would be not to use a global error handler set when RGDAL is initialized, but rather for each binding of the GDAL API, install a local error handler with CPLPushErrorHandler(_

Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Jürgen E . Fischer
Hi Even, On Fri, 18. Feb 2011 at 01:02:30 +0100, Even Rouault wrote: > This is going to be quite painfull since you have to do this for each GDAL > method you bind, and be careful to correctly pair CPLPushErrorHandler() / > CPLPopErrorHandler() (the later being the easiest to forget in unsuual c

Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-17 Thread Even Rouault
Le vendredi 18 février 2011 01:02:30, Even Rouault a écrit : > > So my suggestion would be not to use a global error handler set when RGDAL > is initialized, but rather for each binding of the GDAL API, install a > local error handler with CPLPushErrorHandler(__errorHandler) and uninstall > it bef

[gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-17 Thread Even Rouault
Hi Roger, not sure if you are the appropriate recipient for this email, but as your name appeared on http://cran.r-project.org/web/packages/rgdal/index.html I try my chance ;-). (CC'ing gdal-dev too since other users of GDAL might be interested by the issue related with CPLSetErrorHandler() in