Bug report #9166
invalid field name in expressions make QGIS crash in debug mode
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | 2.0.1 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17798 |
Description
If you have invalid field names in the expression of a label in a layer, QGIS will crash at start.
The crash occurs in the method prepareJoins and it occurs only in Debug (not in Release).
Associated revisions
Safety check when joining before accessing fields
Fix #9166
History
#1 Updated by Jürgen Fischer about 11 years ago
- Priority changed from Severe/Regression to Normal
Not reproducable here. Tried joining a shape with a csv and renamed the csv field on windows 64bit. no crash.
#2 Updated by Jürgen Fischer about 11 years ago
- Status changed from Open to Feedback
#3 Updated by Matthias Kuhn about 11 years ago
- Status changed from Feedback to Closed
Fixed in changeset f428c869a980cc707da1fe96e2ba8ba763af78c6.
#4 Updated by Matthias Kuhn about 11 years ago
I wonder if we should change all the QgsFields methods from [] to .value() which does check if the index exists at the cost of a probably neglectable overhead.