Bug report #13579

Crash Dump 2.11 with user defined expressions

Added by Alexandre Neto about 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Expressions
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:21621

Description

Hello all,

I'm having Crash Dumps in current master, on windows 7 64 bits.

After a few tests and some .qgis2 cleaning I realized it has something to do with expression functions created by user.

The attached file causes qgis-master to crash dump when you try to open any expression dialog.

It works well in QGIS 2.8.3 and 2.10.

I was not able to try in Linux

To reproduce copy the attached file to .qgi2/python/expressions folder, open some vector layer and press in select by expression.

alex_functions.py Magnifier (756 Bytes) Alexandre Neto, 2015-10-12 08:46 AM

Associated revisions

Revision cc9c7897
Added by Jürgen Fischer about 4 years ago

avoid on duplicate user functions (fixes #13579)

Revision e7a981cc
Added by Jürgen Fischer about 4 years ago

avoid on duplicate user functions (fixes #13579)

(backports from commit cc9c789)

History

#1 Updated by Nyall Dawson about 4 years ago

  • Status changed from Open to Feedback

I believe this is because that file implements an "area" function, which as of 2.12 is built in and in the reserved name list.

Can you confirm that removing this function fixes the crash?

#2 Updated by Alexandre Neto about 4 years ago

  • Status changed from Feedback to Closed

Nyall, you were right. Renaming the "area" function worked.

#3 Updated by Salvatore Larosa about 4 years ago

  • Priority changed from Severe/Regression to High
  • Status changed from Closed to Reopened

I think this still must be considered as a bug.
We anyway should avoid crashes anywhere in the application.
I have been thinking for some solution to fix this and I issued a PR [0].

[0] - https://github.com/qgis/QGIS/pull/2371

#4 Updated by Jürgen Fischer about 4 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF