Bug report #15404

Hang when compiling complex expressions for mssql provider

Added by Joachim Heilmann about 8 years ago. Updated about 6 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Data Provider/MSSQL
Affected QGIS version:3.2.2 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:23334

Description

A QGIS-Project, that runs smooth with QGIS 2.8.X (32 or 64bit) makes QGIS 2.14.5 and 2.16.1 Crash immediately, when a certain rule based Symbol layer is rendered. No difference between 32 and 64bit this time.
Our Project uses SQL Server 2012 spatial as datasource.
To reproduce from attached files:
  • restore QGISTest.bak to SQL Server 2012 or higher
  • unpack 214crash.qgs + SvgSymbols-Folder
  • edit 214crash.qgs in line 56 to adapt datasource to your Server
  • open 214crash.qgs with QGIS 2.8.X, it will display a couple of symbols
  • open 214crash.qgs with QGIS 2.14 or higher. It tries to load the one layer of the project (wait indicator is running infinitely, or at least 10 min, I haven't waited longer...)

As QGIS just hangs wihtout a stack trace or anything, only crash Information available seems to be Windows Error Report (WER), which is created after Shooting off QGIS. See Folder ErrorLog in attachment.

The Bug might have some relation with #15369. Much less classes though. Also, the layer works fine, if I use Database->Offline editing to export data to sqlite. So SQL Server connection seems to play a role.

QGIS15404.zip - sample data for reporduction (645 KB) Joachim Heilmann, 2016-08-08 04:04 AM

Associated revisions

Revision f630c938
Added by Nyall Dawson about 6 years ago

[mssql] Fix inefficiencies in expression compiler, resulting in
apparent hangs when compiling complex expressions

Fixes #15404

History

#1 Updated by Joachim Heilmann about 8 years ago

#2 Updated by Giovanni Manghi almost 8 years ago

  • Priority changed from Normal to High

#3 Updated by Giovanni Manghi over 7 years ago

  • Category changed from Symbology to Data Provider/MSSQL
  • Target version deleted (Version 2.14)

#4 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#5 Updated by Nyall Dawson about 6 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

Still an issue with 3.2?

#6 Updated by Joachim Heilmann about 6 years ago

  • Status changed from Feedback to Open

I just checked the described reproduction steps on 3.2.1-Bonn, and, yes, QGIS rendering still hangs on that layer. The general behaviour has changed, though. QGIS 3.2 does not hang completely, I can still add layers, even edit the properties of the broken layer, but the busy indicator left from the coordinate display is infinitely running and the map stays blank. The CPU load of qgis-bin.exe is between 80% and 100%, until the process is killed.
So I'm afraid that, yes, it is still an issue with 3.2.

#7 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Feedback

Just a hunch - can you verify that if you load each layer in turn into QGIS, that the correct crs for the layer is assigned?

#8 Updated by Giovanni Manghi about 6 years ago

  • Affected QGIS version changed from 2.14.5 to 3.2.2

#9 Updated by Nyall Dawson about 6 years ago

  • Subject changed from QGIS 2.14 hangs when rendering symbol layer to Hang when compiling complex expressions for mssql provider
  • Status changed from Feedback to Open

Hmm - I can reproduce on master too

#10 Updated by Nyall Dawson about 6 years ago

  • Assignee set to Nyall Dawson
  • Status changed from Open to In Progress

#11 Updated by Nyall Dawson about 6 years ago

  • Pull Request or Patch supplied changed from No to Yes

#12 Updated by Nyall Dawson about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF