Bug report #16187

Updated by Giovanni Manghi over 7 years ago

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())

        layer.addAttributeAlias(index, dictionary[key])



Field calculations work correctly using the field calculator accessed from the layer properties dialog.

Back