Bug report #19350

MS SQL Layers causing crashes

Added by Steven Graham over 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Data Provider/MSSQL
Affected QGIS version:3.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:Yes Copied to github as #:27178

Description

User Feedback
Opening SQL view with spatial data type. Renders but then crashes when panning/zooming.

Report Details

Crash ID: 4211178810f5280c24beb301590f6993a51f55cb

Stack Trace

RtlTryEnterCriticalSection :
SQLSetEnvAttr :
SQLDisconnect :
QSqlDatabase::open :
sourceSelectProviders :
sourceSelectProviders :
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator :
QgsVectorLayerFeatureSource::getFeatures :
QgsVectorLayerLabelProvider::registerFeature :
QgsMapRendererParallelJob::renderLayerStatic :
QgsArchive::zip :
QgsImageOperation::overlayColor :
QgsImageOperation::flipImage :
QtConcurrent::ThreadEngineBase::run :
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.0-Bonn
QGIS code revision: bc43194061
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback
  • Priority changed from Normal to High

Did the same data worked ok on previous QGIS releases?

#2 Updated by Steven Graham over 6 years ago

I just tried in 2.18 and it crashed immediately. I have used 3.2 with another spatial view in MS SQL without any issue. The ones that are crashing I have added a row number to give it something to use as a primary key (the primary key in the data is a composite key of two text fields).

#3 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Feedback to Open

#4 Updated by Steven Graham about 6 years ago

I realised that using a row number could be problematic as QGIS only selects the data within the spatial extents of the map so the number associated with each record would change with each query. I changed the column to be a unique number but it hasn't resolved the issue.

#5 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Feedback

Should be fixed in 3.3 master - please test

#6 Updated by Giovanni Manghi about 6 years ago

Please try on QGIS 3.4.1, if the issue is still valid change the affected version, thanks.

#7 Updated by Nyall Dawson almost 6 years ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Also available in: Atom PDF