Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when rendering a polygon layer with style and labels #23469

Closed
qgib opened this issue Sep 8, 2016 · 10 comments
Closed

Crash when rendering a polygon layer with style and labels #23469

qgib opened this issue Sep 8, 2016 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Map and Legend Related to map or legend rendering

Comments

@qgib
Copy link
Contributor

qgib commented Sep 8, 2016

Author Name: Stefan Schweigel (@StefanLSA)
Original Redmine Issue: 15546
Affected QGIS version: 2.18.13
Redmine category:map_canvas


We currently migrating our environment from QGis 2.8.1 to QGis 2.14.6. Under QGis 2.8.1 everything works fine, even if I reopen the 2.14-project under version 2.8!

Under QGis 2.14.6 we had unexplainable "randomly" crashes when zooming and panning in the main window. The Crash also occurs "randomly" when we try to generate maps with the Atlas-Tool

After a while I could narrow down the problem to a polygon layer. I don’t know exactly why it crashes, but I guess it has something to do with the “new” styling and labeling features. By adding the shape file (Layer B, see below) to the project without styling the problem does not occur.

Steps to reproduce the crash:

  • open the attached sample project (contains sample data of the region where the problem occurs)
  • you see a red point. Try to zoom in! (under scale 1:100,000)

Alternative:

  • open the Map-Composer “GIS-Bild” and try to enable the preview of the Atlas

Or:

  • disable the “Set Layer Scale Visibility” for Layer B

Now it becomes strange:
If you set “Toggle Editing” = On for Layer B zoom, pan and Atlas-Tool are working fine (all my > 4000 images are created without problems). But this can’t be the solution, because you cannot open a project with editing toggled ON for “Layer B”. QGis will immediately crash when opening a project saved with deep zoom.

Some remarks to “Layer B”

  • originally it is an MSSQL layer, the problem is the same with shp file and MSSQL table
  • in Sql-Server all geometry are “Valid”, “Simple” and type “Polygon”

I also added two core dumps from the crashes


@qgib
Copy link
Contributor Author

qgib commented Feb 4, 2017

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Mar 7, 2017

Author Name: Giovanni Manghi (@gioman)


cannot replicate in any of the scenarios (with the provided data and project) on qgis 2.18.4

Please reopen if necessary.


  • status_id was changed from Open to Closed
  • resolution was changed from to not reproducable

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2017

Author Name: Stefan Schweigel (@StefanLSA)


The Problem is still the same in QGIS 2.18.13

Steps to reproduce the crash:

  • open the attached sample project
  • you see a red point. Try to zoom in! (under scale 1:100,000)

  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2017

Author Name: Giovanni Manghi (@gioman)


Stefan Schweigel wrote:

The Problem is still the same in QGIS 2.18.13

Steps to reproduce the crash:

  • open the attached sample project
  • you see a red point. Try to zoom in! (under scale 1:100,000)

I just tried on a clean 2.18.13 installation (try with no 3rd party plugins, or remove the .qgis2 folder) and there is no crash after opening the project (there is a missing WMS layer, can be a factor?) and zooming in/out even very quickly.

On the other hand If I open the included composer there is a crash when enbaling the atlas preview... but if I change the CRS of the project to something like 4326 then there is no crash. The project comes defined with a custom CRS.

The layer "B" has no scale dependent visibility enabled upon opening the project.

Please leave more feedback if possible.


  • version was changed from 2.14.5 to 2.18.13
  • description was changed from We currently migrating our environment from QGis 2.8.1 to QGis 2.14.6. Under QGis 2.8.1 everything works fine, even if I reopen the 2.14-project under version 2.8!

Under QGis 2.14.6 we had unexplainable "randomly" crashes when zooming and panning in the main window. The Crash also occurs "randomly" when we try to generate maps with the Atlas-Tool

After a while I could narrow down the problem to a polygon layer. I don’t know exactly why it crashes, but I guess it has something to do with the “new” styling and labeling features. By adding the shape file (Layer B, see below) to the project without styling the problem does not occur.

Steps to reproduce the crash:

  • open the attached sample project (contains sample data of the region where the problem occurs)
  • you see a red point. Try to zoom in! (under scale 1:100,000)

Alternative:

  • open the Map-Composer “GIS-Bild” and try to enable the preview of the Atlas

Or:

  • disable the “Set Layer Scale Visibility” for Layer B

Now it becomes strange:
If you set “Toggle Editing” = On for Layer B zoom, pan and Atlas-Tool are working fine (all my > 4000 images are created without problems). But this can’t be the solution, because you cannot open a project with editing toggled ON for “Layer B”. QGis will immediately crash when opening a project saved with deep zoom.

Some remarks to “Layer B”

  • originally it is an MSSQL layer, the problem is the same with shp file and MSSQL table
  • in Sql-Server all geometry are “Valid”, “Simple” and type “Polygon”

I also added two core dumps from the crashes
to We currently migrating our environment from QGis 2.8.1 to QGis 2.14.6. Under QGis 2.8.1 everything works fine, even if I reopen the 2.14-project under version 2.8!

Under QGis 2.14.6 we had unexplainable "randomly" crashes when zooming and panning in the main window. The Crash also occurs "randomly" when we try to generate maps with the Atlas-Tool

After a while I could narrow down the problem to a polygon layer. I don’t know exactly why it crashes, but I guess it has something to do with the “new” styling and labeling features. By adding the shape file (Layer B, see below) to the project without styling the problem does not occur.

Steps to reproduce the crash:

  • open the attached sample project (contains sample data of the region where the problem occurs)
  • you see a red point. Try to zoom in! (under scale 1:100,000)

Alternative:

  • open the Map-Composer “GIS-Bild” and try to enable the preview of the Atlas

Or:

  • disable the “Set Layer Scale Visibility” for Layer B

Now it becomes strange:
If you set “Toggle Editing” = On for Layer B zoom, pan and Atlas-Tool are working fine (all my > 4000 images are created without problems). But this can’t be the solution, because you cannot open a project with editing toggled ON for “Layer B”. QGis will immediately crash when opening a project saved with deep zoom.

Some remarks to “Layer B”

  • originally it is an MSSQL layer, the problem is the same with shp file and MSSQL table
  • in Sql-Server all geometry are “Valid”, “Simple” and type “Polygon”

I also added two core dumps from the crashes

  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2017

Author Name: Stefan Schweigel (@StefanLSA)


It seems to be a very strange problem. I tried your suggestions: removed the .qgis2 folder and disabled all plugins. It works after the first start. I can zoom in without any problems. I closed QGIS and opened the project again --> Crash. I reopened the project again and changed the CRS to WGS84 (4326) ... it works ... changed the CRS to UTM32N (25832) --> Crash. I enabled and disabled some plugins, but I cannot figure out if one the plugins maybe the reason for the crash. Activated are:
db_manager
georefplugin.dll
processing

I think it is not a clean 2.18.13 installation. Our IT department has installed the program. I have no influence over them

I don’t think that the missing WMS layer is the reason for the crash. Because I saved the project after loading under another name (see attachment "sample crash V2.18.13.zip"), then closed QGIS and opened this resaved project --> zoom in = crash.

The custom CRS is EPSG 2398 (http://spatialreference.org/ref/epsg/2398/). The older QGIS versions shipped with wrong parameters for EPSG 2398, which resulted in an offset of ~ 3 meters. In QGIS 2.18 the shipped EPSG 2398 is better, but not the same described at spatialreference.org. The offset now is < 25 cm.
I changed the OTF projection to 4326 and saved the project again (see attachment "sample works.zip"). After closing QGIS I opened this project and it works. Even if I change the OTF projection back to the custom CRS and reopen this project. I don’t know if this is a solution for this issue.

The description above was a little bit wrong. Layer "F" is the reason for the problem. You may replace "B" with "F" in the description above. B contains only one point to mark the location of the problem

The only safe workaround for the problem is to set “Toggle Editing” = On for Layer F


  • 11570 was configured as sample crash V2.18.13.zip
  • 11571 was configured as sample works.zip

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2017

Author Name: Giovanni Manghi (@gioman)


Stefan Schweigel wrote:

It seems to be a very strange problem. I tried your suggestions: removed the .qgis2 folder and disabled all plugins. It works after the first start. I can zoom in without any problems. I closed QGIS and opened the project again --> Crash. I reopened the project again and changed the CRS to WGS84 (4326) ... it works ... changed the CRS to UTM32N (25832) --> Crash. I enabled and disabled some plugins, but I cannot figure out if one the plugins maybe the reason for the crash. Activated are:
db_manager
georefplugin.dll
processing

I think it is not a clean 2.18.13 installation. Our IT department has installed the program. I have no influence over them

I don’t think that the missing WMS layer is the reason for the crash. Because I saved the project after loading under another name (see attachment "sample crash V2.18.13.zip"), then closed QGIS and opened this resaved project --> zoom in = crash.

The custom CRS is EPSG 2398 (http://spatialreference.org/ref/epsg/2398/). The older QGIS versions shipped with wrong parameters for EPSG 2398, which resulted in an offset of ~ 3 meters. In QGIS 2.18 the shipped EPSG 2398 is better, but not the same described at spatialreference.org. The offset now is < 25 cm.
I changed the OTF projection to 4326 and saved the project again (see attachment "sample works.zip"). After closing QGIS I opened this project and it works. Even if I change the OTF projection back to the custom CRS and reopen this project. I don’t know if this is a solution for this issue.

The description above was a little bit wrong. Layer "F" is the reason for the problem. You may replace "B" with "F" in the description above. B contains only one point to mark the location of the problem

The only safe workaround for the problem is to set “Toggle Editing” = On for Layer F

I'm not able to replicate the crash while doing zoom in/out, the style/visibility of layers is not a factor here on a clean testing environment. I ask kindly to try on another machine/environment.

On the other hand I see the crash when previewing the atlas with the included composer with some CRS (the custom CRS used by default by the project or by manually setting it to 2398 but not with 4326) BUT... if I try a new composer then there is no crash at all... suggesting some weird issue in the layout that comes with the project.

Please try confirm/dismiss the above. thanks!


  • resolution was changed from not reproducable to
  • subject was changed from QGis 2.14.6 crashes with dump when rendering a polygon layer with style and labels to Crash when rendering a polygon layer with style and labels

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2017

Author Name: Stefan Schweigel (@StefanLSA)


The solution for this issue seems to be:

  • change the OTF projection to 4326
  • save the project as a different name
  • close QGIS and reopen the saved project
  • change the OTF projection back to the recently used projection (optional)

Zoom to "erroneous" geometry and atlas tool are still working.

I compared the two qgs project files ("crash" vs "works"). There are some differences while nothing else than the projection in the project was changed:

  • cleaned the section <layer_coordinate_transform_info> from missing or old layers
  • added the tag false

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2017

Author Name: Giovanni Manghi (@gioman)


Can we close this as "won't fix" as probably caused by an unclean (and hard to replicate) project?

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2017

Author Name: Stefan Schweigel (@StefanLSA)


Yes close this issue

I believe it is because of the long use of a project file across different versions. Also, the save command does not seem to properly clean the project file of missing layers. But this is an other issue.

@qgib
Copy link
Contributor Author

qgib commented Oct 23, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to wontfix
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Oct 23, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Map and Legend Related to map or legend rendering Crash/Data Corruption labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Map and Legend Related to map or legend rendering
Projects
None yet
Development

No branches or pull requests

1 participant