Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIN creation crash #30549

Closed
IVsese opened this issue Jul 4, 2019 · 24 comments · Fixed by #39218
Closed

TIN creation crash #30549

IVsese opened this issue Jul 4, 2019 · 24 comments · Fixed by #39218
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Feedback Waiting on the submitter for answers Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@IVsese
Copy link

IVsese commented Jul 4, 2019

Crash ID: 185de4a9a11eb29f05672d8b176e731c0d36ee2f

Stack Trace


MathUtils::lineIntersection :
DualEdgeTriangulation::insertForcedSegment :
DualEdgeTriangulation::addLine :
QgsTinInterpolator::insertData :
QgsTinInterpolator::initialize :
QgsTinInterpolator::interpolatePoint :
PyInit__analysis :
QgsGridFileWriter::writeFile :
PyInit__analysis :
PyMethodDef_RawFastCallKeywords :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyMethodDef_RawFastCallDict :
PyObject_Call :
PyInit_sip :
CPLStringList::empty :
PyInit__core :
QgsProcessingAlgorithm::runPrepared :
QgsProcessingAlgRunnerTask::run :
PyInit__core :
QgsTask::start :
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.8.0-Zanzibar
QGIS code revision: 11aff65
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.1
Running against GDAL: 2.4.1

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17763

@IVsese IVsese added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jul 4, 2019
@gioman
Copy link
Contributor

gioman commented Jul 4, 2019

Please attach sample data and parameter used.

@gioman gioman added the Feedback Waiting on the submitter for answers label Jul 4, 2019
@IVsese
Copy link
Author

IVsese commented Jul 4, 2019

cv05orogcurvas.ZIP

@gioman
Copy link
Contributor

gioman commented Jul 4, 2019

@IVsese zip only contains a single file (.shx). You must attach the complete shapefile and please also specify the parameters used in the TIN tool interface.

@IVsese
Copy link
Author

IVsese commented Jul 4, 2019

oro.ZIP
parameters

Thanks, I was trying to create the TIN lots of times, changings parameters but it doesn´t work

@gioman gioman added Crash/Data Corruption Processing Relating to QGIS Processing framework or individual Processing algorithms and removed Feedback Waiting on the submitter for answers labels Jul 4, 2019
@gioman
Copy link
Contributor

gioman commented Jul 4, 2019

Confirmed crash on Linux/master too, even when using a much more human "1m" as output resolution (instead of the reporter 10cm).

@IVsese
Copy link
Author

IVsese commented Jul 4, 2019

yes, i ve changed the size of the pixel but still failing, What can I do? Is the problem in the shape?

@gioman
Copy link
Contributor

gioman commented Jul 4, 2019

QGIS must not crash. Wait a for a fix.

@IVsese
Copy link
Author

IVsese commented Jul 4, 2019

Lots of thanks, i´ve tried witht zanzibar version, i wish it gets fixed soon.

@jescott2
Copy link

jescott2 commented Nov 5, 2019

Could this be related to a limit on the number of Triangles for the QGIS TIN? I have a 57,000 point Vector Point Layer from a 3D seismic horizon map that works with GDAL Grid (Linear) but not with QGIS TIN. QGIS TIN will get to 50% then stay there for more than 12 hours. The QGIS IDW does work. Also, the Extent from the Canvas option does not seem to reduce the data read by TIN. Selecting the Extent based on another Layer seems to work well. I select, copy, and paste the sub-area that I want to use in TIN and it works.

O/S Win 10
QGIS 3.10
Memory 32 GB

@gioman
Copy link
Contributor

gioman commented Nov 5, 2019

Could this be related to a limit on the number of Triangles for the QGIS TIN? I have a 57,000 point

can you attach/link this dataset?

@jescott2
Copy link

jescott2 commented Nov 5, 2019

Here you go.
TIN.zip

@gioman
Copy link
Contributor

gioman commented Nov 7, 2019

Here you go.

I confirm I also cannot obtain an output from this dataset (tried create a 10m/20m resolution output). I'm on 3.4 on Linux.

@jescott2
Copy link

What now? Should this be reported as a bug?

@gioman
Copy link
Contributor

gioman commented Nov 11, 2019

Should this be reported as a bug?

the bug is already reported, right here in this ticket.

What now?

wait for a fix or consider supporting the work necessary to make the fix.

@jescott2
Copy link

Thank you. I donated to the project this year. I am happy to test the fix. If I ever make any money, I would be happy to support the work...

@obrix
Copy link

obrix commented Feb 5, 2020

I can reproduce this bug with the example provided by @jescott2 in 3.11-master.

The TIN interpolation process seem to hang at 50% for me too. After some debugging I found that the code is stuck in an infinite loop in DualEdgeTriangulation::addPoint:269

while ( true ) { toswap = index; index = mHalfEdge[mHalfEdge[mHalfEdge[index]->getNext()]->getDual()]->getNext(); checkSwap( toswap, 0 ); if ( toswap == cwedge ) { break; } }

I haven't gone any further at the moment, I just put that here if this can help someone debug the triangulation algorithm more quickly.

@Meibes
Copy link

Meibes commented Aug 21, 2020

#34358 User Feedback

tried to do a tin creation on a temporary layer with 10 lines, based on z-coordinates as "structure lines" (don't know the correct english words for it) copied from a dxf-file
crash_tin.zip

Zwischenablage01

Report Details

Crash ID: 961124c539d0b7f6fde37e8cf9f9e7a9c93f01e1

Stack Trace

MathUtils::leftOf mathutils.cpp:297
DualEdgeTriangulation::baseEdgeOfTriangle dualedgetriangulation.cpp:463
DualEdgeTriangulation::addPoint dualedgetriangulation.cpp:210
DualEdgeTriangulation::addLine dualedgetriangulation.cpp:78
QgsTinInterpolator::insertData qgstininterpolator.cpp:312
QgsTinInterpolator::initialize qgstininterpolator.cpp:141
QgsTinInterpolator::interpolatePoint qgstininterpolator.cpp:56
sipQgsTinInterpolator::interpolatePoint sip_analysispart1.cpp:9421
QgsGridFileWriter::writeFile qgsgridfilewriter.cpp:65
meth_QgsGridFileWriter_writeFile sip_analysispart2.cpp:54
PyMethodDef_RawFastCallKeywords :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyMethodDef_RawFastCallDict :
PyObject_Call :
PyInit_sip :
sipVH__core_331 sip_corepart0.cpp:17403
sipQgsProcessingAlgorithm::processAlgorithm sip_corepart2.cpp:190671
QgsProcessingAlgorithm::runPrepared qgsprocessingalgorithm.cpp:502
QgsProcessingAlgRunnerTask::run qgsprocessingalgrunnertask.cpp:66
sipQgsProcessingAlgRunnerTask::run sip_corepart1.cpp:91992
QgsTask::start qgstaskmanager.cpp:78
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.10.9-A Coru�a
QGIS code revision: bf47e9d
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 3.0.4
Running against GDAL: 3.0.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.18363

@PeterPetrik
Copy link
Contributor

Isn't this fixed by @vcloarec PR? Should be still open?

@gioman gioman added the Feedback Waiting on the submitter for answers label Sep 30, 2020
@gioman
Copy link
Contributor

gioman commented Sep 30, 2020

Should be still open?

@PeterPetrik I will test this again.

@mjb62
Copy link

mjb62 commented Oct 5, 2020

I have been trying to create DEMs from ASCII xyz files. When generating TINs some of the files appear to hang during their first pass in processing. I've left some running over night to find in the morning a processing failure or that QGIS crashed. Using QGIS 3.14.15 then 3.14.16.
I tried to find if there was something obvious inside the data. I picked one of the xyz files (covering 2km x 2km with 2,665,819 points). I clipped it to a 120m width along the transect of interest. This resulted in 448,466 points. The file still had the same processing issues.
I then started copying and pasting portions of the points into another layer and trying to generate the TIN on both layers. After several attempts I was working with selections of approximatey 10% at a time.
Eventually after cutting and pasting all of the points into the new layer the TIN could be generated rapidly from the new layer without problem. I did this all of the (reduced width) files that originally failed TIN processing and was eventually able to generate all TINs.
I originally tried creating the TINs at 1m then 10m. After the piecemeal cut and paste process I was working successfully with 0.5m.

@gioman
Copy link
Contributor

gioman commented Oct 5, 2020

Isn't this fixed by @vcloarec PR? Should be still open?

@PeterPetrik @vcloarec tested on master the dataset of the original issuer, and QGIS crashes at trying create a TIN with 1m resolution.

@vcloarec
Copy link
Member

vcloarec commented Oct 6, 2020

confirmed with the original dataset of this post, I missed it... I look at and try to fix it.

@vcloarec
Copy link
Member

vcloarec commented Oct 7, 2020

Now seems to be fixed by #39218

image

@gioman
Copy link
Contributor

gioman commented Oct 7, 2020

Now seems to be fixed by #39218

@vcloarec thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Feedback Waiting on the submitter for answers Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants