Bug report #18170

QGIS crashes when makeGraph is called.

Added by Tommie Jones over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:C++ Plugins
Affected QGIS version:2.14.3 Regression?:No
Operating System:ac OS X 10.11.6 (15G17023) Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:26061

Description

I have a plugin that runs the following code

        layer = self.iface.activeLayer()
        director = QgsLineVectorLayerDirector( layer, -1, '', '', '', 3 )
        properter = QgsDistanceArcProperter()
        director.addProperter( properter )
        builder = QgsGraphBuilder( layer.crs() )
        tiedPoints  = director.makeGraph( builder, [] )
        #graph = builder.graph()
        #vn = graph.vertexCount()
        #print(u"the graph has"+str(vn)+u" points")

When the function makeGraph is called then the qgis crashes

 Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
--> 
    __TEXT                 000000010b76b000-000000010b98e000 [ 2188K] r-x/rwx SM=COW  /Applications/QGIS.app/Contents/MacOS/QGIS

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.qgis.qgis2_core               0x000000010d2cadde QgsGeometry::wkbType() const + 4
1   org.qgis.qgis2_networkanalysis    0x000000012096021a QgsLineVectorLayerDirector::makeGraph(QgsGraphBuilderInterface*, QVector<QgsPoint> const&, QVector<QgsPoint>&) const + 656
2   _networkanalysis.so               0x00000001247734a2 meth_QgsLineVectorLayerDirector_makeGraph(_object*, _object*) + 203
3   org.python.python                 0x0000000121017a0b PyEval_EvalFrameEx + 13400
4   org.python.python                 0x00000001210143c1 PyEval_EvalCodeEx + 1583
5   org.python.python                 0x0000000120fb92e5 0x120f91000 + 164581
6   org.python.python                 0x0000000120f9b202 PyObject_Call + 99
7   org.python.python                 0x0000000120fa5ff5 0x120f91000 + 86005
8   org.python.python                 0x0000000120f9b202 PyObject_Call + 99
9   org.python.python                 0x0000000121019e83 PyEval_CallObjectWithKeywords + 165
10  sip.so                            0x00000001212add03 sip_api_invoke_slot_ex + 785
11  QtCore.so                         0x00000001213d124c PyQtProxy::invokeSlot(qpycore_slot const

History

#1 Updated by Alexander Bruy over 2 years ago

QGIS 2.14 is too old. Please test on latest 2.18 and/or master.

#2 Updated by Giovanni Manghi over 2 years ago

  • Crashes QGIS or corrupts data changed from No to Yes
  • Priority changed from Normal to High
  • Status changed from Open to Feedback

#3 Updated by Alexander Bruy over 2 years ago

  • Status changed from Feedback to Closed

Closed for the lack of feedback. Please reopen if necessary.

Also available in: Atom PDF