Bug report #17730

3d map canvas crashes (when docked) while generating terrain from DEM

Added by Mathieu Pellerin - nIRV about 7 years ago. Updated over 6 years 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:
Crashes QGIS or corrupts data:Yes Copied to github as #:25626

Description

I don't remember seeing this when I first tested the 3D map canvas. A crasher occurs when the 3D map canvas is docked and a DEM is assigned.

GDB's where output:

(gdb) where
#0  0x00007ffff37d90bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff37daf5d in __GI_abort () at abort.c:90
#2  0x0000555555560a92 in qgisCrash(int) (signal=-1) at /home/webmaster/dev/cpp/QGIS/src/app/main.cpp:337
#3  0x0000555555560d3a in myMessageOutput(QtMsgType, char const*) (type=QtFatalMsg, msg=0x7ffee020ce68 "ASSERT: \"heights.count() == res * res * ( int )sizeof( float )\" in file /home/webmaster/dev/cpp/QGIS/src/3d/terrain/qgsdemterraintilegeometry_p.cpp, line 30") at /home/webmaster/dev/cpp/QGIS/src/app/main.cpp:390
#4  0x00007ffff41b461a in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff41b60ee in QMessageLogger::fatal(char const*, ...) const () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff41b1357 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff0c8ce00 in createPlaneVertexData(int, float, QByteArray const&) (res=16, skirtHeight=10, heights=...)
    at /home/webmaster/dev/cpp/QGIS/src/3d/terrain/qgsdemterraintilegeometry_p.cpp:30
#8  0x00007ffff0c8de6f in PlaneVertexBufferFunctor::operator()() (this=0x55555e8b6dc0) at /home/webmaster/dev/cpp/QGIS/src/3d/terrain/qgsdemterraintilegeometry_p.cpp:146
#9  0x00007fffebee0fe1 in  () at /usr/lib/x86_64-linux-gnu/libQt53DRender.so.5
#10 0x00007fffebf556c8 in  () at /usr/lib/x86_64-linux-gnu/libQt53DRender.so.5
#11 0x00007fffebbe2a93 in  () at /usr/lib/x86_64-linux-gnu/libQt53DCore.so.5
#12 0x00007ffff41c7581 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff41cb29d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fffea2257fc in start_thread (arg=0x7ffefbfff700) at pthread_create.c:465
#15 0x00007ffff38b6b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Associated revisions

Revision d1e4c5e0
Added by Martin Dobias over 6 years ago

Fix a crash with terrain generation from DEM (fixes #17730)

A typical off by one error - reading data outside of heightmap array

History

#1 Updated by Martin Dobias over 6 years ago

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

Also available in: Atom PDF