mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
Merge branch 'master' into mapnik-geometry
This commit is contained in:
commit
ab151a095e
@ -80,7 +80,21 @@ PluginInfo::~PluginInfo()
|
||||
if (module_)
|
||||
{
|
||||
#ifdef MAPNIK_SUPPORTS_DLOPEN
|
||||
if (module_->dl) dlclose(module_->dl),module_->dl=0;
|
||||
/*
|
||||
We do not call dlclose for plugins that link libgdal.
|
||||
This is a terrible hack, but necessary to prevent crashes
|
||||
at exit when gdal attempts to shutdown. The problem arises
|
||||
when Mapnik is used with another library that uses thread-local
|
||||
storage (like libuv). In this case GDAL also tries to cleanup thread
|
||||
local storage and leaves things in a state that causes libuv to crash.
|
||||
This is partially fixed by http://trac.osgeo.org/gdal/ticket/5509 but only
|
||||
in the case that gdal is linked as a shared library. This workaround therefore
|
||||
prevents crashes with gdal 1.11.x and gdal 2.x when using a static libgdal.
|
||||
*/
|
||||
if (module_->dl && name_ != "gdal" && name_ != "ogr")
|
||||
{
|
||||
dlclose(module_->dl),module_->dl=0;
|
||||
}
|
||||
#endif
|
||||
delete module_;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user