Bug report #20074

Blank canvas after applying filter/query builder

Added by David Pierce about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:27896

Description

I imported a lines vector layer from OSM. I then used query builder to apply a filter, e.g. "highway" = 'primary'. After pressing 'Test', the Query Result said it found 227 rows. Going back to the layer, all features had disappeared - nothing showing at all for that layer, other layers were unchanged. I tried this same approach using different filed and filters and it had the same result. I tried this same approach on the OSM polygon vector layer and it also did the same thing - everything in that layer disappears when the filter is turned on, even though the query result is saying that it found x rows.

Untitled.png (9.36 KB) Ivan Ivanov, 2018-10-14 01:29 AM

applying filter and blank canvas.gif (2.74 MB) Saber Razmjooei, 2018-10-14 11:47 AM

History

#1 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Feedback

Try with 3.3 - there's been some related fixes.

#2 Updated by Ivan Ivanov about 6 years ago

I can confirm it happens on the current latest Debian and Windows version with .osm files, 3.2.3. I found a workaround if you import it into geopackage, it works fine. I haven't tested if you use shapefile etc.

#3 Updated by Nyall Dawson about 6 years ago

You need to test on 3.3, not 3.2

#4 Updated by Ivan Ivanov about 6 years ago

I just confirmed the problem exists on 3.2.3 with the previous note.
I installed the weekly x64 build (9ccb1b579b) and can confirm the issue still exists. Steps to reproduce:
1) get any .osm file and import a layer from it
2) apply any filter e.g. 1 = 1
3) press Test button, it shows an alert box with features count. However, the features from the .osm layer disappear from the map. The same happens if you press OK.

I think there is a related issue, if you clear the filter expression and press the Test button, you see a message with an untouched placeholder:

The where clause returned %n row(s).

Both issues are on .osm layers only. Check the attachment for more info of the latter issue.

#5 Updated by Saber Razmjooei about 6 years ago

  • Status changed from Feedback to Closed

Hmmm...it appears to be working in 3.3 but as soon as I move the map, all features disappear.

#6 Updated by Saber Razmjooei about 6 years ago

  • Status changed from Closed to Open

#7 Updated by Saber Razmjooei about 6 years ago

  • Affected QGIS version changed from 3.2.3 to 3.3(master)
  • Operating System deleted (Windows 10)
  • Subject changed from All features on a layer disappear after applying filter/query builder to Blank canvas after applying filter/query builder
  • File applying filter and blank canvas.gif added

The problem is even worse. The whole canvas goes blank for me.

#8 Updated by Saber Razmjooei about 6 years ago

  • Priority changed from Normal to High

#9 Updated by Giovanni Manghi about 6 years ago

Saber Razmjooei wrote:

The problem is even worse. The whole canvas goes blank for me.

here is not even necessary to apply a filter, just zoom in enough... and all goes blank. Zoom out and features will not be back.

#10 Updated by Martin Dobias about 6 years ago

Can you check again with the most recent master? The fix from Even for OSM file two days ago may have fixed it (#20098)

#11 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

#12 Updated by Ivan Ivanov about 6 years ago

I can confirm the problem is fixed in QGIS 3.4.1 on Ubuntu 18.10.

#13 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

Also available in: Atom PDF