Bug report #6240

Editing: Delete last Vertex crashes QGIS

Added by bjpfei - over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Digitising
Affected QGIS version:1.8.0 Regression?:No
Operating System:Ubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:15548

Description

When editing a polygon deleting the last vertex crashes QGIS when you delete another vertex.

1.) Start editing a polygon layer.
2.) Search the last vertex of the polygon and delete it.
3.) After deleting the vertex it's still visible (see Attachment)
4.) Delete another vertex.
5.) QGIS crashes

You can prevent QGIS from crashing when you click another tool (like zoom) before deleting the next vertex.
Here is the output of QGIS stacktrace.

_Fatal: ASSERT: "!mChangingGeometry" in file /usr/local/src/Quantum-GIS-1.8/src/app/nodetool/qgsselectedfeature.cpp, line 125
Stacktrace (run through c++filt):
/usr/local/qgis-1.8/bin/qgis(myMessageOutput(QtMsgType, char const*)+0x1a7)[0x52e3de]
/usr/lib/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x1e)[0x7f7a34dbe7ee]
/usr/lib/libQtCore.so.4(+0x71a22)[0x7f7a34dbea22]
/usr/lib/libQtCore.so.4(qFatal(char const*, ...)+0x95)[0x7f7a34dbebd5]
/usr/local/qgis-1.8/bin/qgis(QgsSelectedFeature::beginGeometryChange()+0x31)[0x67bd1d]
/usr/local/qgis-1.8/bin/qgis(QgsSelectedFeature::deleteSelectedVertexes()+0x23d)[0x67c853]
/usr/local/qgis-1.8/bin/qgis(QgsMapToolNodeTool::keyReleaseEvent(QKeyEvent*)+0x72)[0x679552]
/usr/local/qgis-1.8/lib/libqgis_gui.so.1.8.0(QgsMapCanvas::keyReleaseEvent(QKeyEvent*)+0xda)[0x7f7a35a855b4]
/usr/lib/libQtGui.so.4(QWidget::event(QEvent*)+0x7b7)[0x7f7a342ca347]
/usr/lib/libQtGui.so.4(QFrame::event(QEvent*)+0x26)[0x7f7a346714e6]
/usr/lib/libQtGui.so.4(QAbstractScrollArea::event(QEvent*)+0xbb)[0x7f7a346fc8ab]
/usr/lib/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xac)[0x7f7a3427422c]
/usr/lib/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0x1915)[0x7f7a3427bec5]
/usr/local/qgis-1.8/lib/libqgis_core.so.1.8.0(QgsApplication::notify(QObject*, QEvent*)+0xac)[0x7f7a35ff5e2a]
/usr/lib/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7f7a34ebb06c]
/usr/lib/libQtGui.so.4(+0x26916a)[0x7f7a3431f16a]
/usr/lib/libQtGui.so.4(+0x26b6f0)[0x7f7a343216f0]
/usr/lib/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0x864)[0x7f7a342f8904]
/usr/lib/libQtGui.so.4(+0x26e882)[0x7f7a34324882]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2)[0x7f7a2ca088c2]
/lib/libglib-2.0.so.0(+0x42748)[0x7f7a2ca0c748]
/lib/libglib-2.0.so.0(g_main_context_iteration+0x6c)[0x7f7a2ca0c8fc]
/usr/lib/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x73)[0x7f7a34ee4513]
/usr/lib/libQtGui.so.4(+0x26e46e)[0x7f7a3432446e]
/usr/lib/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7f7a34eb9992]
/usr/lib/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xdc)[0x7f7a34eb9d6c]
/usr/lib/libQtCore.so.4(QCoreApplication::exec()+0xbb)[0x7f7a34ebdaab]
/usr/local/qgis-1.8/bin/qgis(main+0x2430)[0x53083c]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f7a324cac4d]
/usr/local/qgis-1.8/bin/qgis[0x52df79]
/usr/local/qgis_devel/bin/qgis: Zeile 2: 30487 Abgebrochen             /usr/local/qgis-1.8/bin/qgis_

delete_last_vertex.png - After deleting the last vertex it's still visble (312 KB) bjpfei -, 2012-08-22 04:50 AM

Associated revisions

History

#1 Updated by Giovanni Manghi over 11 years ago

  • Status changed from Open to Feedback
  • Operating System changed from Ubuntu Server to Ubuntu

Is this a regression (it used to work in 1.7.4?)?

#2 Updated by bjpfei - over 11 years ago

I think so.
Tested it in our old 1.7.4 version and in Code Version commit:1fcfde2 and it worked.

#3 Updated by Giovanni Manghi over 11 years ago

bjpfei - wrote:

Code Version 1fcfde2 and it worked.

do you mean that in qgis master it works correctly?

#4 Updated by bjpfei - over 11 years ago

I don't know if it works correctly in master.
commit:1fcfde2 is not an actual version of master.It is an old version of master - a 1.8rc which we compiled in spring.

#5 Updated by Giovanni Manghi over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

bjpfei - wrote:

I don't know if it works correctly in master.

can you give it a try? under Windows you can use osgeo4w.

If it is a regression we must tag this ticket as blocker. If it is a regression and meanwhile it was fixed in master then we should close this ticket as fixed. Thanks in advance.

#6 Updated by bjpfei - over 11 years ago

Sorry we can't test this on actual version of master at the moment.
Does anybody else has the chance to test it?
Thanks in advance

#7 Updated by cmoe - over 11 years ago

Just tested on 777ce59 under ubuntu12.04: After deleting the last vertex, the marker is still visible, but Qgis doesn't crash anymore.

regards
cmoe

#8 Updated by cmoe - over 11 years ago

Just an update: It will crash, if press delete on the time the already deleted vertex is still marked.

1.) Start editing a polygon layer.
2.) Search the last vertex of the polygon (it will be marked blud) and delete it.
3.) The blue marker still exists, but the polygon shape will be whithout this vertex.
4.) Now press delete to get rid of the needless blue marker
5.) Qgis crashes!

regards Cédric

#9 Updated by Jürgen Fischer over 11 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF