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

Error when making buffer from empty layer with 'Dissolve result' option checked #46396

Closed
2 tasks done
FelisPimeja opened this issue Dec 7, 2021 · 0 comments · Fixed by #47348
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@FelisPimeja
Copy link
Contributor

What is the bug or the crash?

When trying to make a buffer from empty layer (produced in processing model for example) with 'Dissolve result' option checked I gain no result and error in the log:

Feature could not be written to Buffered_a03cb901_262a_4ed5_b22c_23aeb10000b1: Could not add feature with geometry type GeometryCollection to layer of type MultiPolygon
Could not write feature into OUTPUT
Execution failed after 0.01 seconds

No error if 'Dissolve result' option stays unchecked.
The problem occurs only with empty layer.

Steps to reproduce the issue

  1. Create new empty layer
  2. Use Buffer processing algorithm with 'Dissolve result' option checked
  3. Get an error
Screen.Recording.2021-12-07.a_t.13.15.16.mov

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.22.0-Białowieża QGIS code revision d902269
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version 12.3
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 12.0
       
Active Python plugins
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.5

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

Not OS specific - I get the same behaviour on Windows 10 also.

A workaround with the current behaviour for processing models is to count features in a layer before making a dissolved buffer using Basic statistics for fields algorithm. And check 'Dissolve result' option only when there are more than zero features in the layer.

image

@FelisPimeja FelisPimeja added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 7, 2021
@gioman gioman added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Dec 7, 2021
domi4484 pushed a commit to domi4484/QGIS that referenced this issue Feb 16, 2022
nyalldawson pushed a commit that referenced this issue Feb 17, 2022
nyalldawson pushed a commit that referenced this issue Feb 20, 2022
nyalldawson pushed a commit that referenced this issue Feb 21, 2022
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! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants