Skip to content

Commit 32dd2b6

Browse files
committedJun 26, 2017
"[GDAL provider] Set VRT_SHARED_SOURCE=NO configuration option by default (#16507)
This will avoid crashes with VRT datasets in multi-threaded use.
1 parent 80bc6d2 commit 32dd2b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ QgsGdalProvider::QgsGdalProvider( const QString &uri, bool update )
150150
CPLSetConfigOption( "AAIGRID_DATATYPE", "Float64" );
151151
}
152152

153+
if ( !CPLGetConfigOption( "VRT_SHARED_SOURCE", nullptr ) )
154+
{
155+
// GDAL version up to this date have issues will use of VRT in multi-threaded
156+
// scenarios. See https://issues.qgis.org/issues/16507 /
157+
// https://trac.osgeo.org/gdal/ticket/6939
158+
CPLSetConfigOption( "VRT_SHARED_SOURCE", "NO" );
159+
}
160+
153161
// To get buildSupportedRasterFileFilter the provider is called with empty uri
154162
if ( uri.isEmpty() )
155163
{

0 commit comments

Comments
 (0)
Please sign in to comment.