Skip to content
Permalink
Browse files

"[GDAL provider] Set VRT_SHARED_SOURCE=NO configuration option by def…

…ault (#16507)

This will avoid crashes with VRT datasets in multi-threaded use.
  • Loading branch information
rouault committed Jun 26, 2017
1 parent a603bdf commit d6e7ec670a250c45639536f791ab23727ffb4fbf
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/providers/gdal/qgsgdalprovider.cpp
@@ -146,6 +146,14 @@ QgsGdalProvider::QgsGdalProvider( const QString &uri, bool update )
CPLSetConfigOption( "AAIGRID_DATATYPE", "Float64" );
}

if ( !CPLGetConfigOption( "VRT_SHARED_SOURCE", nullptr ) )
{
// GDAL version up to this date have issues will use of VRT in multi-threaded
// scenarios. See https://issues.qgis.org/issues/16507 /
// https://trac.osgeo.org/gdal/ticket/6939
CPLSetConfigOption( "VRT_SHARED_SOURCE", "NO" );
}

// To get buildSupportedRasterFileFilter the provider is called with empty uri
if ( uri.isEmpty() )
{

0 comments on commit d6e7ec6

Please sign in to comment.
You can’t perform that action at this time.