Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze with virtual field on $area used as parameter in sum #49589

Closed
1 of 2 tasks
signedav opened this issue Aug 5, 2022 · 1 comment · Fixed by #50533
Closed
1 of 2 tasks

Freeze with virtual field on $area used as parameter in sum #49589

signedav opened this issue Aug 5, 2022 · 1 comment · Fixed by #50533
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions

Comments

@signedav
Copy link
Contributor

signedav commented Aug 5, 2022

What is the bug or the crash?

When having the following expression for a virtual field of a polygon layer, on opening the Attribute Table or identifying the feature QGIS loads and freezes (times out).

sum($area)

The same does not happen, when performing the expression to create a new field, only virtual fields are affected.
On passing $area to other functions (like to_string, rand etc.) everything works fine. I noticed it with sum and I can assume (but not tested) that aggregates would be affected too.

Steps to reproduce the issue

  1. Open the attached project.
  2. Go to layer "polys"
  3. Go to the Field Calculator (via canvas) and create a new virtual field:
    image
    4.Open the Attribute Table and experience the freeze OR Identify the Feature and experience the freeze.
    image

When opening the Field Calculator via Attribute Table the freeze is immediately after closing the Field Calculator.

Versions

QGIS version 3.27.0-Master QGIS code revision c12712e
Qt version 5.15.3
Python version 3.10.4
GDAL/OGR version 3.4.1
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04 LTS
       
This copy of QGIS writes debugging output.

And happened as well with 3.24.3

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

sumofarea.zip

@signedav signedav added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Aug 5, 2022
@gioman gioman added the Expressions Related to the QGIS expression engine or specific expression functions label Aug 8, 2022
@gioman
Copy link
Contributor

gioman commented Aug 8, 2022

Confirmed also on Windows/3.26.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants