Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS crashes rendering temporary layers with spatial index #25602

Closed
qgib opened this issue Dec 16, 2017 · 2 comments
Closed

QGIS crashes rendering temporary layers with spatial index #25602

qgib opened this issue Dec 16, 2017 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Map and Legend Related to map or legend rendering Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Dec 16, 2017

Author Name: Geo Dev (Geo Dev)
Original Redmine Issue: 17705
Affected QGIS version: master
Redmine category:map_canvas


The issue occurs zooming in/out temporary layers with spatial index containing many features that require a few moments to be completely rendered.

Steps to replicate the issue:

  • create a temporary layer with a lot of features. For example, generate 100 000 points in the canvas extent using the tool "Random points in extent"
  • starting from the zoom to extent, zoom out quickly with the mouse wheel (more zoom out steps at the same time): the canvas works as expected
  • add the spatial index (Layer Properties -> General Tab -> Create spatial index) and repeat the previous step: QGIS crashes

Depending on the hardware performance, it may be necessary to increase the number of features since the issue occurs only if the rendering is not instantaneous.
The issue occurs both by enabling and disabling the parallel rendering and two different Stack Traces are reported.
It also occurs with QGIS 2.18.15 but it doesn't occur with QGIS 2.14.21 (regression) and it doesn't occur with any release of QGIS on Linux.

Stack Trace 1 - parallel rendering enabled

SpatialIndex::MVRTree::Data::storeToByteArray :
SpatialIndex::MVRTree::Data::storeToByteArray :
SpatialIndex::RTree::loadRTree :
SpatialIndex::RTree::loadRTree :
SpatialIndex::RTree::Data::getShape :
QgsSpatialIndex::intersects qgsspatialindex.cpp:354
QgsMemoryFeatureIterator::QgsMemoryFeatureIterator qgsmemoryfeatureiterator.cpp:64
QgsMemoryFeatureSource::getFeatures qgsmemoryfeatureiterator.cpp:245
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator qgsvectorlayerfeatureiterator.cpp:258
QgsVectorLayerFeatureSource::getFeatures qgsvectorlayerfeatureiterator.cpp:97
QgsVectorLayerRenderer::render qgsvectorlayerrenderer.cpp:237
QgsMapRendererParallelJob::renderLayerStatic qgsmaprendererparalleljob.cpp:256
QtConcurrent::FunctionWrapper1<void,LayerRenderJob & __ptr64>::operator() qtconcurrentfunctionwrappers.h:84
QtConcurrent::MapKernel<QList<LayerRenderJob>::iterator,QtConcurrent::FunctionWrapper1<void,LayerRenderJob & __ptr64> >::runIteration qtconcurrentmapkernel.h:70
QtConcurrent::MapKernel<QList<LayerRenderJob>::iterator,QtConcurrent::FunctionWrapper1<void,LayerRenderJob & __ptr64> >::runIterations qtconcurrentmapkernel.h:79
QtConcurrent::IterateKernel<QList<LayerRenderJob>::iterator,void>::forThreadFunction qtconcurrentiteratekernel.h:256
QtConcurrent::IterateKernel<QList<LayerRenderJob>::iterator,void>::threadFunction qtconcurrentiteratekernel.h:218
QtConcurrent::ThreadEngineBase::run :
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

Stack Trace 2 - parallel rendering disabled

SpatialIndex::MVRTree::Data::storeToByteArray :
SpatialIndex::MVRTree::Data::storeToByteArray :
SpatialIndex::RTree::loadRTree :
SpatialIndex::RTree::loadRTree :
SpatialIndex::RTree::Data::getShape :
QgsSpatialIndex::intersects qgsspatialindex.cpp:354
QgsMemoryFeatureIterator::QgsMemoryFeatureIterator qgsmemoryfeatureiterator.cpp:64
QgsMemoryFeatureSource::getFeatures qgsmemoryfeatureiterator.cpp:245
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator qgsvectorlayerfeatureiterator.cpp:258
QgsVectorLayerFeatureSource::getFeatures qgsvectorlayerfeatureiterator.cpp:97
QgsVectorLayerRenderer::render qgsvectorlayerrenderer.cpp:237
QgsMapRendererCustomPainterJob::doRender qgsmaprenderercustompainterjob.cpp:267
QgsMapRendererCustomPainterJob::staticRender qgsmaprenderercustompainterjob.cpp:216
QtConcurrent::StoredFunctorCall1<void,void (__cdecl*)(QgsMapRendererCustomPainterJob * __ptr64),QgsMapRendererCustomPainterJob * __ptr64>::runFunctor qtconcurrentstoredfunctioncall.h:432
QtConcurrent::RunFunctionTask<void>::run qtconcurrentrunbase.h:136
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 2.99.0-Master
QGIS code revision: bbf0027
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.3
Running against GDAL: 2.2.3

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2018

Author Name: Nyall Dawson (@nyalldawson)


Applied in changeset 2e5d538.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Feb 9, 2018
@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2018

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Map and Legend Related to map or legend rendering Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Map and Legend Related to map or legend rendering Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant