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

Crash when deleting features with node tool (2.12) #21707

Closed
qgib opened this issue Oct 26, 2015 · 4 comments
Closed

Crash when deleting features with node tool (2.12) #21707

qgib opened this issue Oct 26, 2015 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Digitizing Related to feature digitizing map tools or functionality

Comments

@qgib
Copy link
Contributor

qgib commented Oct 26, 2015

Author Name: Ivan Katanović (@igadmile)
Original Redmine Issue: 13674
Affected QGIS version: master
Redmine category:digitising


Qgis crashes whn you try to delete feature with node tool.

Steps to reproduce:
1.Start editing layer
2.Choose Node Tool and start deleting nodes from feature
3.When you try to delete last node of feature, Qgis crashes

As I recall the same thing was happening in 2.10.

Below is the Backtrace:

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff7801e32 in QgsMapToolNodeTool::safeSelectVertex (this=this@entry=0xdd3160, vertexNr=vertexNr@entry=0) at /tmp/buildd/qgis-2.12.0+23wily/src/app/nodetool/qgsmaptoolnodetool.cpp:591
591     /tmp/buildd/qgis-2.12.0+23wily/src/app/nodetool/qgsmaptoolnodetool.cpp: No such file or directory.
(gdb) bt
#_0  0x00007ffff7801e32 in QgsMapToolNodeTool::safeSelectVertex (this=this@entry=0xdd3160, vertexNr=vertexNr@entry=0) at /tmp/buildd/qgis-2.12.0+23wily/src/app/nodetool/qgsmaptoolnodetool.cpp:591
#_1  0x00007ffff7802e95 in QgsMapToolNodeTool::keyPressEvent (this=0xdd3160, e=0x7fffffffcb20) at /tmp/buildd/qgis-2.12.0+23wily/src/app/nodetool/qgsmaptoolnodetool.cpp:542
#_2  0x00007ffff70ebd2c in QgsMapCanvas::keyPressEvent (this=0xb8eea0, e=0x7fffffffcb20) at /tmp/buildd/qgis-2.12.0+23wily/src/gui/qgsmapcanvas.cpp:1198
#_3  0x00007ffff52af8c3 in QWidget::event (this=this@entry=0xb8eea0, event=event@entry=0x7fffffffcb20) at kernel/qwidget.cpp:8435
#_4  0x00007ffff567870e in QFrame::event (this=this@entry=0xb8eea0, e=e@entry=0x7fffffffcb20) at widgets/qframe.cpp:557
#_5  0x00007ffff56fdf4b in QAbstractScrollArea::event (this=0xb8eea0, e=0x7fffffffcb20) at widgets/qabstractscrollarea.cpp:996
#_6  0x00007ffff525acdc in QApplicationPrivate::notify_helper (this=this@entry=0x8765b0, receiver=receiver@entry=0xb8eea0, e=e@entry=0x7fffffffcb20) at kernel/qapplication.cpp:4570
#_7  0x00007ffff5262f63 in QApplication::notify (this=this@entry=0x7fffffffda50, receiver=receiver@entry=0xb8eea0, e=e@entry=0x7fffffffcb20) at kernel/qapplication.cpp:4011
#_8  0x00007ffff65321bb in QgsApplication::notify (this=0x7fffffffda50, receiver=0xb8eea0, event=0x7fffffffcb20) at /tmp/buildd/qgis-2.12.0+23wily/src/core/qgsapplication.cpp:269
#_9  0x00007ffff5f1185d in QCoreApplication::notifyInternal (this=0x7fffffffda50, receiver=receiver@entry=0xb8eea0, event=event@entry=0x7fffffffcb20) at kernel/qcoreapplication.cpp:955
#_10 0x00007ffff5259146 in QCoreApplication::sendSpontaneousEvent (event=event@entry=0x7fffffffcb20, receiver=receiver@entry=0xb8eea0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#11 qt_sendSpontaneousEvent (receiver=receiver@entry=0xb8eea0, event=event@entry=0x7fffffffcb20) at kernel/qapplication.cpp:5568
#_12 0x00007ffff5302cc3 in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0xb8eea0, grab=grab@entry=false, type=QEvent::KeyPress, code=16777223, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=119, 
    nativeVirtualKey=65535, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866
#_13 0x00007ffff53031d2 in QKeyMapperPrivate::translateKeyEvent (this=0x7fffffffd090, keyWidget=0xb8eea0, event=0x0, grab=<optimized out>) at kernel/qkeymapper_x11.cpp:1836
#_14 0x00007ffff52db2c1 in QApplication::x11ProcessEvent (this=0x7fffffffda50, event=event@entry=0x7fffffffd090) at kernel/qapplication_x11.cpp:3641
#_15 0x00007ffff5305b52 in x11EventSourceDispatch (s=0x877d00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#_16 0x00007fffedc5fff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_17 0x00007fffedc60250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_18 0x00007fffedc602fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#_19 0x00007ffff5f421ee in QEventDispatcherGlib::processEvents (this=0x8687d0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#_20 0x00007ffff5305c26 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#_21 0x00007ffff5f100d1 in QEventLoop::processEvents (this=this@entry=0x7fffffffd470, flags=...) at kernel/qeventloop.cpp:149
#_22 0x00007ffff5f10445 in QEventLoop::exec (this=this@entry=0x7fffffffd470, flags=...) at kernel/qeventloop.cpp:204
#_23 0x00007ffff5f16429 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#_24 0x00007ffff5258f2c in QApplication::exec () at kernel/qapplication.cpp:3828
#_25 0x00000000004069cd in main (argc=1, argv=<optimized out>) at /tmp/buildd/qgis-2.12.0+23wily/src/app/main.cpp:1229


Related issue(s): #21696 (relates)
Redmine related issue(s): 13661


@qgib
Copy link
Contributor Author

qgib commented Oct 27, 2015

Author Name: Saber Razmjooei (@saberraz)


Confirmed in master.
Another ticket was also mentioning that user is able to delete all the nodes for the polygon. The delete node should warn user to use Delete feature when nodes are 3 in polygon and 2 in line layers.


  • version was changed from 2.10.1 to master
  • operating_system was changed from linux to
  • priority_id was changed from High to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Oct 27, 2015

Author Name: Nyall Dawson (@nyalldawson)


That's not correct - the node tool has been designed to allow temporary creation of invalid geometries (was broken in 2.10 though).

What I think should happen is that removing the last node results in a null geoemtry for the feature. So the feature remains, but with no geom.

@qgib
Copy link
Contributor Author

qgib commented Oct 28, 2015

Author Name: Saber Razmjooei (@saberraz)


Makes sense to have geometry-less feature. Maybe a warning to tell user about this when pressing save will be a good option.


  • category_id was configured as Digitising

@qgib
Copy link
Contributor Author

qgib commented Oct 28, 2015

Author Name: Nyall Dawson (@nyalldawson)


Fixed in changeset "ba1de8b5aa82f26c9127d12897ce42f49a265cb2".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality Crash/Data Corruption labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
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 Digitizing Related to feature digitizing map tools or functionality
Projects
None yet
Development

No branches or pull requests

1 participant