Bug report #19441
Layers with 80+ rule-based symbology do not render
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Alessandro Pasotti | ||
Category: | Symbology | ||
Affected QGIS version: | 3.3(master) | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27269 |
Description
When a layer has less than 81 rule-based symbology, it renders without issues.
When a layer has reached more than 80 rule-based symbology, the layer is not rendered in the canvas.
This is tested in both master (fedora 28) and 3.2.0 (windows).
Associated revisions
[bugfix] Create a b-tree expr when rule based renderer has more than 50 rules
Fixes #19441 Layers with 80+ rule-based symbology do not render
History
#1 Updated by Giovanni Manghi over 6 years ago
- Category changed from GUI to Symbology
#2 Updated by Giovanni Manghi over 6 years ago
- Status changed from Open to Feedback
Did it works as expected on 2.18?
#3 Updated by Basil Eric Rabi over 6 years ago
- Status changed from Feedback to Open
In 2.18, layer is not rendered when the rules are 82 and above.
#4 Updated by Igor Evdokimov about 6 years ago
I have layer with +4000 rule-based symbology. (Need this to make selection with line hatch).
QGis 3.2 terminates without any message and any dump starting at 800-900 rules. Windows7 x64.
When layer has less rules - all works fine.
#5 Updated by Alessandro Pasotti about 6 years ago
- Assignee set to Alessandro Pasotti
#6 Updated by Alessandro Pasotti about 6 years ago
Doing some progresses here, (with some help from Even) we've identified the source of the issue which is in sqlite library limits.
See https://github.com/oniony/TMSU/wiki/Troubleshooting for the error "parser stack overflow" (bison related)
There is another error when the tree depth is too high: "Expression tree is too large (maximum depth 1000)" according to https://www.sqlite.org/limits.html, "The maximum number of bytes in the text of an SQL statement is limited to SQLITE_MAX_SQL_LENGTH which defaults to 1000000"
Unfortunately the solution doesn't seem to be trivial.
#7 Updated by Alessandro Pasotti about 6 years ago
- Status changed from Open to In Progress
- Pull Request or Patch supplied changed from No to Yes
#8 Updated by Basil Eric Rabi about 6 years ago
Just tested the patch. It works great! Thank you.
#9 Updated by Anonymous about 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|3ea67af6e2a0590c64eac79d446465b8605cee54.
#10 Updated by Giovanni Manghi about 6 years ago
- Resolution set to fixed/implemented
#11 Updated by Igor Evdokimov about 6 years ago
Tested the patch also. It works now, but not great for my task. Very slow.
I have >4000 categories. With category-based symbology all works fine.
But we need to make hatched selection of polygons. Even standard hatches/line pattern
(diagonal, cross, etc.) will be enough, but not simple "color fill", as it is now in QGis.
So I had to implement this with rule-based symbology using <is_selected()> function
on map features. With this workaround on ~60 rules all works fine also, but on 4000 - very slow.
So I think I have to write feature request to make full-featured instrument
of "selection pattern" tuning (as it is in style editor, for example).