-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
setting a field to a value via field calculator freezes qgis when "Automatic Creation of Transaction Group" is enabled #39178
Comments
@faridcher cannot confirm on 3.10.10 on Ubuntu 20.04- |
upgraded to 3.10.10 and the problem persists. Please try with attached gpkg file in the original post. Try to set the tsize field of labs layer to NULL. thanks |
No issues here on QGIS master/linux |
@faridcher try with a new QGIS profile. |
A new profile did not help. However, the problem relates to the qgis project file and it occurs when "Automatic Creation of Transaction Group" is enabled in the "Project Properties > Data Sources". Un-checking that option solves it. |
This is indeed a big bad voracious 🐛 |
Definitely related. |
I now know the source of the bug but the fix isn't trivial. |
See also: #39244 |
Reproducing test case: def testTransactionGroupIterator(self):
"""Test issue GH #39178: the bug is that this test hangs
forever in an endless loop"""
project = QgsProject()
project.setAutoTransaction(True)
tmpfile = os.path.join(
self.basetestpath, 'tempGeoPackageTransactionGroupIterator.gpkg')
ds = ogr.GetDriverByName('GPKG').CreateDataSource(tmpfile)
lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint)
lyr.CreateField(ogr.FieldDefn('str_field', ogr.OFTString))
f = ogr.Feature(lyr.GetLayerDefn())
f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 1)'))
f.SetField('str_field', 'one')
lyr.CreateFeature(f)
del lyr
del ds
vl = QgsVectorLayer(tmpfile + '|layername=test', 'test', 'ogr')
project.addMapLayers([vl])
self.assertTrue(vl.startEditing())
for f in vl.getFeatures():
self.assertTrue(vl.changeAttributeValue(1, 1, 'new value'))
# Test that QGIS sees the new changes
self.assertEqual(next(vl.getFeatures()).attribute(1), 'new value') |
How to Reproduce
Try to set the tsize field of labs layer to NULL via field calculator .
related:
https://issues.qgis.org/issues/11422
subdiv.zip
The text was updated successfully, but these errors were encountered: