You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from [[PyQt]]4.QtCore import *
def handler():
print "Deleting features"
1. Create a scratch layer and connect to committedFeaturesRemoved signal
type="Point"
name = "Test"
layer = [[QgsVectorLayer]](type, name, "memory")
[[QgsMapLayerRegistry]].instance().addMapLayer(layer)
qgis.utils.iface.mapCanvas().setCurrentLayer(layer)
QObject.connect(layer, SIGNAL("committedFeaturesRemoved(const QString &, const [[QgsFeatureIds]] & )"),handler)
This will create a layer called test
Set the layer to be editable
Add a point to the layer
Commit the change (save the layer)
Select the point
Delete the point
Commit the change - this causes the crash.
This happens consistently for me in QGis versions 1.6 and 1.7 r14962
Operating system is windows XP SP3
I've had a look at it as far as I can in the Visual Studio debugger. The crash appears to happen in the generated moc_.. file where the python signal is implemented, and the message is:
Unhandled exception at 0x0372ba7c in qgis.exe: 0xC000001E: An attempt was made to execute an invalid lock sequence.
The text was updated successfully, but these errors were encountered:
When running the code in python console I get this (for the connect() call):
Traceback (most recent call last):
File "<input>", line 1, in <module>
[[TypeError]]: type 'QgsFeatureIds' is not supported as a slot argument type
(this is sip v4.10.5 and pyqt v4.7.4)
It doesn't crash for me. I see several possible causes of your crash:
* the committed*(...) signals were not known by sip (they were added in qgis 1.6 but not also to pyqgis)
I have fixed both in 1d66171f (SVN r14979) - please give it another try with new trunk and close this bug if it works now.
Martin
Author Name: Chris Crook (@ccrook)
Original Redmine Issue: 3366
Redmine category:python_plugins
Assignee: Borys Jurgiel
To replicate the problem ..
Open a new QGis project
Open a python console window
Enter the following code
This will create a layer called test
Set the layer to be editable
Add a point to the layer
Commit the change (save the layer)
Select the point
Delete the point
Commit the change - this causes the crash.
This happens consistently for me in QGis versions 1.6 and 1.7 r14962
Operating system is windows XP SP3
I've had a look at it as far as I can in the Visual Studio debugger. The crash appears to happen in the generated moc_.. file where the python signal is implemented, and the message is:
Unhandled exception at 0x0372ba7c in qgis.exe: 0xC000001E: An attempt was made to execute an invalid lock sequence.
The text was updated successfully, but these errors were encountered: