Bug report #17286

Instant 3d renderer crash with dataset

Added by Nyall Dawson about 5 years ago. Updated about 5 years ago.

Assignee:Martin Dobias
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25184


Enabling a 3d renderer with the attached dataset results in an instant crash when a 3d map view is open.

I've attached the original version of the dataset. Note that it contains lots of invalid geometries, but fixing/removing these features still results in a crash with 3d renderer.

DP_QLD_BUILDING_AREAS.zip (4.89 MB) Nyall Dawson, 2017-10-16 01:06 AM

Associated revisions

Revision 7bce7ea9
Added by Martin Dobias about 5 years ago

[3d] Fix crash in tessellator with near coords (fixes #17286, fixes #17515)

As the readme of poly2tri library says: "Poly2Tri does not support repeat points within epsilon."

When the coordinates are very near to each other, we get crashes in triangulation code.
To prevent that, we try to simplify geometries to hopefully fix the problem automatically,
if that fails we just skip the polygon as the last resort.

Usually this happens if user tries to use 3D renderer on unprojected lat/lon coordinates.


#1 Updated by Martin Dobias about 5 years ago

I can reproduce the crash... a temporary solution would be to switch to a projected CRS (e.g. meters as map units) - EPSG:3857 worked for me.

Also, the dataset covers quite a large area that leads to some numerical errors when zoomed in a lot, resulting in some rendering artifacts and glitches when panning.

#2 Updated by Giovanni Manghi about 5 years ago

  • Crashes QGIS or corrupts data changed from No to Yes
  • Priority changed from Normal to High
  • Category set to 3D

#3 Updated by Martin Dobias about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#4 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF