The method initializes the gmFunctions static member, without any mutex protection.
This turned out to cause random crashes in the tests of the WFS provider since the downloader
thread may evaluate an expression, in parallel of the main thread, which does the same.
This was mainly seen on Mac Travis (2 crashes + 1 failures, over 50 iterations), when
parallelizing tests so as to get particular scheduling :
https://travis-ci.org/rouault/Quantum-GIS/builds/121720556.
But I could finally reproduce it systematically on my Linux box when inserting the following sleep.
diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp
index adc7042..e9e4577 100644
--- a/src/providers/wfs/qgswfsshareddata.cpp
+++ b/src/providers/wfs/qgswfsshareddata.cpp
@@ -426,6 +426,7 @@ int QgsWFSSharedData::registerToCache( QgsWFSFeatureIterator* iterator, QgsRecta
connect( mDownloader, SIGNAL( ready() ), &loop, SLOT( quit() ) );
mDownloader->start();
loop.exec( QEventLoop::ExcludeUserInputEvents );
+ usleep( 100 * 1000 );
}
if ( mDownloadFinished )
return -1;
After applying this commit, the Mac builder is fine:
https://travis-ci.org/rouault/Quantum-GIS/builds/121756158
In some WFS GetFeature request, with Filter or FeatureId, all the fields are not well loaded in the feature.
To fix it, we just verifying that the attribute index is lesser than the feature fields count.
Fixes#14619
Using this renderer no symbol will be drawn for features, but labeling,
diagrams and other non-symbol parts will still be shown.
Selections can still be made on the layer in the canvas and selected
features will be rendered with a default symbol. Features being edited
will also be shown.
This is intended as a handy shortcut for layers which you only want
to show labels or diagrams for, and avoids the need to render
symbols with totally transparent fill/border to achieve this.
(fix#12131)
- Modernize QgsVector, improve docs, add some methods missing from
Python bindings
- Add method to QgsPoint to project a point by a specified distance
and bearing
- Add distance methods to complement existing sqrDist squared distance
methods
- Rename QgsVector::normal to normalized (avoid confusion with normal
vectors)
- Add more QgsPoint operators
- Add some more QgsPoint and QgsVector tests