Bug report #6654

QgsTINInterpolator.interpolatePoints() called from Python console crashes QGIS

Added by Radek Pasiok over 11 years ago. Updated about 10 years ago.

Status:Closed
Priority:High
Assignee:-
Category:C++ Plugins
Affected QGIS version:master Regression?:No
Operating System:Ubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:Yes Copied to github as #:15831

Description

Using QgsTINInterpolator.interpolatePoints() from Python console with more than a few points in a dataLayer causes QGIS to crash:

from qgis.analysis import *

vlayer = qgis.utils.iface.activeLayer()

ldata = QgsInterpolator.LayerData()
ldata.interpolationAttribute = 1
ldata.vectorLayer = vlayer
ldata.mInputType = 0
ldata.zCoordInterpolation = True

tini = QgsTINInterpolator([ldata])
tini.interpolatePoint(217517.076,361386.658)

*BUM*

I get this on Windows and Ubuntu Master.
The interpolator works great when dataLayer has just a few points.

Here is the Ubuntu backtrace:

rpasiok@k72:~$ gdb /usr/bin/qgis core
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/qgis...(no debugging symbols found)...done.
[New LWP 4704]
[New LWP 4709]
[New LWP 4708]
[New LWP 4717]
[New LWP 4706]
[New LWP 4705]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `qgis'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fcd06613500 in DualEdgeTriangulation::swapPossible(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
(gdb) bt
#0  0x00007fcd06613500 in DualEdgeTriangulation::swapPossible(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#1  0x00007fcd06613fdc in DualEdgeTriangulation::checkSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#2  0x00007fcd06613f7c in DualEdgeTriangulation::doSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#3  0x00007fcd06614162 in DualEdgeTriangulation::checkSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#4  0x00007fcd06613f7c in DualEdgeTriangulation::doSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#5  0x00007fcd06614162 in DualEdgeTriangulation::checkSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0
#6  0x00007fcd06613f7c in DualEdgeTriangulation::doSwap(unsigned int) () from /usr/lib/libqgis_analysis.so.1.9.0

and so on many many lines....


Related issues

Related to QGIS Application - Bug report #5239: TIN interpolation causes crash Closed 2012-03-26

History

#1 Updated by Salvatore Larosa over 11 years ago

  • Category changed from Vectors to C++ Plugins

I can confirm it !
Related to #5239

#2 Updated by Giovanni Manghi over 11 years ago

  • Priority changed from Normal to High

#3 Updated by Martin Dobias about 10 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Duplicate of #5239

Also available in: Atom PDF