Bug report #12166
Expressions on labels fail silently
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Labelling | ||
Affected QGIS version: | 2.6.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20359 |
Description
The "Show Label" option with an expression will apparently fail silently, leaving the user with labels that are appearing when they don't expect it.
Steps to reproduce:
1. Create expression in label engine with apparently valid expression
2. Apply and observe that labels are appearing where you don't expect them.
Please note: this bug IS NOT about writing incorrect expressions. This is about the USER EXPERIENCE when expressions are written incorrectly. Software should fail gracefully. This isn't, because I am left with no idea how to fix the problem
History
#1 Updated by Nathan Woodrow almost 10 years ago
I'm not sure I follow. Do you mean if you have an expression like 'hello world'
you expect it to fail because it's not True/False?
#2 Updated by Corey Burger almost 10 years ago
No, write an expression like this $FIELDNAME = 'value' either writing out manually or using the auto-select tool. Despite the fact that there are rows with 'value' in the table, labelling apparently "fails open", where it labels everything.
#3 Updated by Corey Burger almost 10 years ago
I think I have figured out the issue: if the table has rows with NULL in them, it will fail. I will open a separate bug.
#4 Updated by Corey Burger almost 10 years ago
I have open #12167 for the NULL issue
#5 Updated by Giovanni Manghi almost 10 years ago
- Category set to Labelling
- Status changed from Open to Feedback
Corey Burger wrote:
I have open #12167 for the NULL issue
why filing two tickets for the same issue?
#6 Updated by Corey Burger almost 10 years ago
Because there may be other ways to cause the label engine to fail this way, so #12167 is (likely) just one method of exposing this bug
#7 Updated by Nathan Woodrow almost 10 years ago
- Status changed from Feedback to Closed
Reopen if you find more. No point leaving a ticket open with no details.