Bug report #16187
Expression Dialog causing minidump and crash when field aliases are in use
|Affected QGIS version:||2.18.3||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||duplicate|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||24097|
QGIS Version 2.18.3 running on Windows 7.
I have a shapefile that I am populating with data to handover to our client.
I am using the attribute table to edit the data. I toggle edit mode. Then click the expression dialog button.
Regardless of the expression I put in I am getting an immediate minidump and crash.
I think I've narrowed this down a little as it is only happening in files where I've created field aliases. Unfortunately I need these as the client has specified the field names which are coded and the aliases which are human readable. Also, as shapefile field names are limited to 10 characters aliases are required regardless.
My field aliases have been created using a pyqgis plugin I have written. Code below in case its me who's done something stupid:
layer = selectedLayer
fields = layer.pendingFields()
for field in fields:
for key in dictionary:
if field.name() == key:
index = layer.fieldNameIndex(field.name())
Field calculations work correctly using the field calculator accessed from the layer properties dialog.