Bug report #11594

Crash when using inverse polygons and shapeburst (combined) symbology on invalid geometries

Added by Spencer Gardner about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Symbology
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:19853

Description

I have a specific map project that crashes if I zoom out. I'm not sure what could be causing the crash. The map worked fine until I added some complex symbology (reverse polygons, shapeburst, SVG markers, lots of labeling rules) so any one of those things could be the culprit. I have attached a crash dump. The crash appears to trigger when I zoom out past about 1:60,000. Seems like it could be a memory issue?

bad_layer.zip (873 KB) Spencer Gardner, 2014-11-10 07:22 AM

History

#1 Updated by Spencer Gardner about 10 years ago

Looks like my crash dump didn't attach (yet again). Here's a Dropbox link to a copy of the file:
https://www.dropbox.com/s/vk8dsbb9li8ri4c/qgis-20141107-101621-5032-5448-exported.dmp?dl=0

#2 Updated by Giovanni Manghi about 10 years ago

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

Was the project made on qgis 2.4? can you try qgis master and see if it still happens?

#3 Updated by Spencer Gardner about 10 years ago

I can't recall for certain, but I'm pretty sure this project was created in 2.6. In any case I'm running 2.6 now. Unfortunately, I can't test in master as I'm on a work computer without the ability to build master from source.

For what it's worth, the crashes also occur in Composer layout if I add the map and then zoom far enough out.

#4 Updated by Giovanni Manghi about 10 years ago

Spencer Gardner wrote:

I can't recall for certain, but I'm pretty sure this project was created in 2.6. In any case I'm running 2.6 now. Unfortunately, I can't test in master as I'm on a work computer without the ability to build master from source.

For what it's worth, the crashes also occur in Composer layout if I add the map and then zoom far enough out.

can you add a sample project (with data)?

#5 Updated by Spencer Gardner about 10 years ago

Progress! I was able to isolate the problem to the inverse polygon shapeburst style on one of my layers. I tested on a copy of the dataset where I removed all rows with invalid geometries and it appears to work just fine. It looks like the problem is the handling of invalid geometries.

The problem only occurs if I have the layer in question symbolized with inverse polygons and shapeburst combined. I'm not having a problem with inverse polygon by itself and no errors with a plain shapeburst.

#6 Updated by Spencer Gardner about 10 years ago

The data in question is stored in PostGIS so sharing would be difficult. I found that if I exported to shapefile for sharing purposes, the problem went away (presumably because the export cleared up any validity issues on the geometries). Let me know if you still need my data for testing and I'll see if there's something we can work out.

#7 Updated by Spencer Gardner about 10 years ago

By the way, it might make a difference to know that my data were multipolygons. And I just ran ST_Makevalid on my PostGIS table and the problem no longer occurs in the original map.

#8 Updated by Giovanni Manghi about 10 years ago

  • Subject changed from Crash when zooming out to Crash when using inverse polygons and shapeburst (combined) symbology on invalid geometries
  • Category set to Symbology

Spencer Gardner wrote:

By the way, it might make a difference to know that my data were multipolygons. And I just ran ST_Makevalid on my PostGIS table and the problem no longer occurs in the original map.

I have tried the same conditions, invalid multigeometry and same combination of symbology, but no crash. Please try qgis master and/or attach sample data and the style you are using. Thanks.

#9 Updated by Spencer Gardner about 10 years ago

I have attached a PostGIS sql backup of the layer and the .qml symbology that I'm using. Hopefully that gives you what you need to recreate the conditions. I just tested in a fresh map with only this dataset and symbology and I'm still having the problem once I zoom out far enough. The zoom level seems to vary - it generally happens between 1:60,000 and 1:100,000.

#10 Updated by Giovanni Manghi about 10 years ago

Spencer Gardner wrote:

I have attached a PostGIS sql backup of the layer and the .qml symbology that I'm using. Hopefully that gives you what you need to recreate the conditions. I just tested in a fresh map with only this dataset and symbology and I'm still having the problem once I zoom out far enough. The zoom level seems to vary - it generally happens between 1:60,000 and 1:100,000.

many messages in the log

2014-11-10T18:21:52 1 Exception: IllegalArgumentException: geometries must not contain null elements

but no crashes on QGIS master, Please give it a try and report back. Thanks!

#11 Updated by Spencer Gardner about 10 years ago

I'll build master on my Ubuntu machine at home and see if I can reproduce. Could be specific to Windows, though. In any case, I can't build master on my work machine so there's not much more I can investigate here at work.

#12 Updated by Giovanni Manghi about 10 years ago

Spencer Gardner wrote:

I'll build master on my Ubuntu machine at home and see if I can reproduce.

no need to compile, there is a repository. On Windows you can install qgis master with the psgeo4w installer, no need to compile too.

#13 Updated by Spencer Gardner about 10 years ago

I wasn't aware of the master build in osgeo4w. I'll give that a try sometime but it might be a few days. Will get back to you with results.

#14 Updated by Spencer Gardner about 10 years ago

Just tested on Ubuntu with 2.6. No crash, but I'm seeing the same error messages and the layer disappears from the canvas when I zoom out to 1:130,000 or so. Would there be a difference in the way Windows handles this error compared to Ubuntu? It certainly looks like that's what is triggering the crash.

Will test with master on Windows when I have a chance.

#15 Updated by Spencer Gardner about 10 years ago

Just installed master on Windows. Same result as my test on Ubuntu last night. Same error message and the layer disappears at certain scales. Interestingly, as I zoomed further out I noticed that the layer reappeared. It would disappear at about 1:110,000 and reappear at about 1:650,000.

Not sure if there's any further testing I can do. The problem appears to be somewhat isolated and doesn't crash in master.

#16 Updated by Giovanni Manghi about 10 years ago

Spencer Gardner wrote:

Just installed master on Windows. Same result as my test on Ubuntu last night. Same error message and the layer disappears at certain scales. Interestingly, as I zoomed further out I noticed that the layer reappeared. It would disappear at about 1:110,000 and reappear at about 1:650,000.

Not sure if there's any further testing I can do. The problem appears to be somewhat isolated and doesn't crash in master.

it still disappear if instead you use a clean vector?

#17 Updated by Spencer Gardner about 10 years ago

It still disappears if I use a copy of the layer with valid geometries and the same symbology. It does not disappear if I use a simple fill symbology (with either valid or invalid geometries).

#18 Updated by Giovanni Manghi about 10 years ago

Spencer Gardner wrote:

It still disappears if I use a copy of the layer with valid geometries and the same symbology. It does not disappear if I use a simple fill symbology (with either valid or invalid geometries).

at this point this ticket should be closed as fixed (because in master is fixed) then you should open another one against qgis/symbology about the inverted polygons and disappearing features, attaching again the sample data.

#19 Updated by Spencer Gardner about 10 years ago

  • Status changed from Feedback to Closed

Crash no longer occurs in master

Also available in: Atom PDF