Skip to content

3D Map View crashes QGIS when project uses UTM projection #41171

Description

@kannes

Describe the bug
QGIS crashes when I try to display the included "world" geodata in 3D using a UTM projection.

How to Reproduce

  1. Enter "world" in the coordinate display to load the example data
  2. Set the project CRS to EPSG:25832 (ETRS89/UTM 32N, also reproduced with EPSG:32635 (WGS84/UTM 35N) and EPSG:32178 (WGS84/UTM 18S)
  3. Set the layer to render in 3D (Single Symbol)
  4. Open a 3D Map View
  5. QGIS crashes

Backtrace

Thread 15 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffba7fc640 (LWP 79190)]
0x00007ffff48babe3 in p2t::Sweep::NewFrontTriangle (this=0x7fffa44527e0, tcx=..., point=..., node=...) at /usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc:181
181	/usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc: No such file or directory.
(gdb) bt
#0  0x00007ffff48babe3 in p2t::Sweep::NewFrontTriangle(p2t::SweepContext&, p2t::Point&, p2t::Node&) (this=0x7fffa44527e0, tcx=..., point=..., node=...)
    at /usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc:181
#1  0x00007ffff48bad11 in p2t::Sweep::PointEvent(p2t::SweepContext&, p2t::Point&) (this=this@entry=0x7fffa44527e0, tcx=..., point=...)
    at /usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc:79
#2  0x00007ffff48badb5 in p2t::Sweep::SweepPoints(p2t::SweepContext&) (this=this@entry=0x7fffa44527e0, tcx=...)
    at /usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc:56
#3  0x00007ffff48bae5a in p2t::Sweep::Triangulate(p2t::SweepContext&) (this=0x7fffa44527e0, tcx=...) at /usr/src/debug/qgis/external/poly2tri/sweep/sweep.cc:47
#4  0x00007ffff48b7310 in p2t::CDT::Triangulate() (this=this@entry=0x55555af8da90) at /usr/src/debug/qgis/external/poly2tri/sweep/cdt.cc:52
#5  0x00007ffff43fdddb in QgsTessellator::addPolygon(QgsPolygon const&, float) (this=0x55555f1353c0, polygon=..., extrusionHeight=extrusionHeight@entry=100)
    at /usr/src/debug/qgis/src/core/qgstessellator.cpp:722
#6  0x00007ffff2d77722 in QgsPolygon3DSymbolHandler::processPolygon(QgsPolygon*, long long, float, float, Qgs3DRenderContext const&, QgsPolygon3DSymbolHandler::PolygonData&) (this=0x55555f2d2bd0, polyClone=0x7fffa4452ee0, fid=36, height=0, extrusionHeight=100, context=..., out=...) at /usr/include/c++/10.2.0/bits/unique_ptr.h:173
#7  0x00007ffff2d7879f in QgsPolygon3DSymbolHandler::processFeature(QgsFeature const&, Qgs3DRenderContext const&) (this=0x55555f2d2bd0, f=..., context=...)
    at /usr/src/debug/qgis/src/3d/symbols/qgspolygon3dsymbol_p.cpp:194
#8  0x00007ffff2d4df56 in operator()() const (__closure=0x55555b077950) at /usr/src/debug/qgis/src/3d/qgsvectorlayerchunkloader_p.cpp:98
#9  0x00007ffff2d4bc45 in non-virtual thunk to QtConcurrent::RunFunctionTask<void>::run() () at /usr/include/qt/QtConcurrent/qtconcurrentrunbase.h:140
#10 0x00007ffff531d302 in  () at /usr/lib/libQt5Core.so.5
#11 0x00007ffff5319f0f in  () at /usr/lib/libQt5Core.so.5
#12 0x00007ffff52333e9 in start_thread () at /usr/lib/libpthread.so.0
#13 0x00007ffff342f293 in clone () at /usr/lib/libc.so.6

QGIS and OS versions

QGIS version 3.17.0-Master QGIS code revision 375764d
Compiled against Qt 5.15.2 Running against Qt 5.15.2
Compiled against GDAL/OGR 3.3.0dev-62626e4f7a-dirty Running against GDAL/OGR 3.3.0dev-62626e4f7a-dirty
Compiled against GEOS 3.8.1-CAPI-1.13.3 Running against GEOS 3.8.1-CAPI-1.13.3
Compiled against SQLite 3.34.1 Running against SQLite 3.34.1
PostgreSQL Client Version 13.1 SpatiaLite Version 4.3.0a
QWT Version 6.1.6 QScintilla2 Version 2.11.6
Compiled against PROJ 6.3.2 Running against PROJ Rel. 6.3.2, May 1st, 2020
OS Version Arch Linux This copy of QGIS writes debugging output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3DRelates to QGIS' 3D engine or renderingBugEither a bug report, or a bug fix. Let's hope for the latter!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions