Bug report #17286

Instant 3d renderer crash with dataset

Added by Nyall Dawson 8 months ago. Updated 7 months ago.

Status:Closed
Priority:High
Assignee:Martin Dobias
Category:3D
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

Description

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, 10/16/2017 01:06 AM

Associated revisions

Revision 7bce7ea9
Added by Martin Dobias 7 months 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.

History

#1 Updated by Martin Dobias 8 months 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 8 months 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 7 months ago

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

#4 Updated by Giovanni Manghi 7 months ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF