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

Fixed Interval classification needs a safe-guard against huge number of classes #49333

Closed
2 tasks done
kannes opened this issue Jul 12, 2022 · 2 comments
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Symbology Related to vector layer symbology or renderers

Comments

@kannes
Copy link
Contributor

kannes commented Jul 12, 2022

What is the bug or the crash?

The new Fixed Interval classification is awesome.
But it makes it really easy to crash the whole system if the number of classes is huge.

There needs to be a safeguard that halts before creating thousands or millions of classes and asks the user if that is what they really want with a warning (best not just about time but about memory and potentially crashing).

Steps to reproduce the issue

Warning, this might make your whole system become unresponsible, requiring a hard reboot, losing all your work.

  1. Load a dataset that has a big numeric range for a field, e. g. Natural Earth 50m countries with its GDP_MD field (-99 to 21433226)
  2. Classify by that field (GDP_MD) using Fixed Interval classification
  3. QGIS will freeze, the system might freeze, you might need to force an unexpected reboot

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS-Version 3.26.0-Buenos Aires QGIS-Codeversion 0aece28
Qt-Version 5.12.8
Python-Version 3.8.10
GDAL-Version 3.0.4
PROJ-Version 6.3.1
EPSG-Registraturdatenbankversion v9.8.6 (2020-01-22)
Kompiliert mit GEOS 3.8.0-CAPI-1.13.1 Läuft mit GEOS 3.8.0-CAPI-1.13.1
SQLite-Version 3.31.1
PDAL-Version 2.0.1
PostgreSQL-Client-Version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1)
SpatiaLite-Version 4.3.0a
QWT-Version 6.1.4
QScintilla2-Version 2.11.2
BS-Version Ubuntu 20.04.4 LTS
       
Aktive Python-Erweiterungen
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
MetaSearch 0.3.6
db_manager 0.1.20

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

As other classification methods emit warnings before the user creates a big number of classes and because this is something that can wreck total havoc by eating all available RAM, crashing QGIS or more likely the whole system, I'd consider it a bug (oversight), not a feature request. Hope that's alright! :)

@uclaros
Copy link
Contributor

uclaros commented Jul 4, 2024

Fixed in #57722

@uclaros uclaros closed this as completed Jul 4, 2024
@kannes
Copy link
Contributor Author

kannes commented Jul 5, 2024

Nice! Thanks @uclaros and @nyalldawson

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! Crash/Data Corruption Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants