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

Merge Selected Features crashes on Temporary Scratch Layers #54856

Closed
2 tasks done
rgreenwood opened this issue Oct 5, 2023 · 5 comments · Fixed by #54862
Closed
2 tasks done

Merge Selected Features crashes on Temporary Scratch Layers #54856

rgreenwood opened this issue Oct 5, 2023 · 5 comments · Fixed by #54862
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption

Comments

@rgreenwood
Copy link

What is the bug or the crash?

Using the Merge Selected Features on a Temporary Scratch Layer causes QGIS 3.32.x to crash (close after a brief delay). The problem does not exist in QGIS 3.28. The problem occurs on linestring and polygon layers (haven't tested on other layer types). The problem occurs in data that has been pasted from PostGIS and geopkg layers (haven't tested other sources). If all fields are removed from the pasted layer before attempting to merge features is does not crash.

Steps to reproduce the issue

  1. Unzip this test4.gpkg.zip file which contains a gpkg that has four linestrings with a single attribute named "fid". Open the gpkg.
  2. Control-A Select all features
  3. Control-C copy all the features
  4. Edit > Paste Features As > Temporary Scratch Layer (named "Pasted")
  5. select "Pasted" layer and make it editable
  6. Control-A Select all features on "Pasted" layer
  7. click the Merge Selected Features tool
  8. QGIS 3.32 closes / crashes

Versions

Works in 3.28
Fails in version below

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.32.3-Lima QGIS code revision 67d4610
Qt version 5.15.3
Python version 3.10.12
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
PDAL version 2.3.0
PostgreSQL client version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Linux Mint 21.2
       
Active Python plugins
qgis2wegue 1.1.1
debug_vs 0.8
plugin_reloader 0.9.3
AnotherDXF2Shape 1.3.1
qgsAzimuth 0.9.16
ImportPhotos 3.0.5
splitmultipart 1.0.0
MemoryLayerSaver 5.0.1
latlontools 3.6.15
processing 2.12.99
MetaSearch 0.3.6
grassprovider 2.12.99
db_manager 0.1.20
QGIS version 3.32.3-Lima QGIS code revision [67d4610](https://github.com/qgis/QGIS/commit/67d46100b5) Qt version 5.15.3 Python version 3.10.12 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 PDAL version 2.3.0 PostgreSQL client version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) SpatiaLite version 5.0.1 QWT version 6.1.4 QScintilla2 version 2.11.6 OS version Linux Mint 21.2

Active Python plugins
qgis2wegue
1.1.1
debug_vs
0.8
plugin_reloader
0.9.3
AnotherDXF2Shape
1.3.1
qgsAzimuth
0.9.16
ImportPhotos
3.0.5
splitmultipart
1.0.0
MemoryLayerSaver
5.0.1
latlontools
3.6.15
processing
2.12.99
MetaSearch
0.3.6
grassprovider
2.12.99
db_manager
0.1.20

Supported QGIS version

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

New profile

Additional context

No response

@rgreenwood rgreenwood added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 5, 2023
@Antoviscomi
Copy link

Antoviscomi commented Oct 5, 2023

Sorry @rgreenwood ,
I can't reproduce here,
as you can see in attached screencast, all works as expected.

Video.del.05-10-2023.16.52.42.webm

I'm working on Ubuntu server 22.04 LTS

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
Versione di QGIS 3.32.3-Lima Revisione codice QGIS 67d4610
Versione Qt 5.15.3
Versione Python 3.10.12
Versione GDAL/OGR 3.4.1
Versione PROJ 8.2.1
Versione database del Registro EPSG v10.041 (2021-12-03)
Compilato con GEOS 3.10.2-CAPI-1.16.0 Esecuzione con GEOS 3.11.1-CAPI-1.17.1
Versione SQLite 3.37.2
Versione PDAL 2.3.0
Versione client PostgreSQL 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)
Versione SpatiaLite 5.0.1
Versione QWT 6.1.4
Versione QScintilla2 2.11.6
Versione SO Ubuntu 22.04.3 LTS
       
Plugins Python attivi
pg_metadata 1.2.2
SwapVectorDirection 0.9
easy_labeling 1.1
lizmap 3.17.1
webmap_utilities 0.1
path_sorting 0.3
DataPlotly 4.0.3
e_tracability 0.7
ORStools 1.6.0
profiletool 4.2.6
Cluster-Analysis-plugin-main 1.0.1
go2streetview 8.6
clusterpoints 6.1
line_profile 3.1.2
processing_saga_nextgen 1.0.0
dissect_dissolve_overlaps 0.3
pg_raster_import 3.2.0
corrector_vector 0.3.1
BoundingBox 2.1
db-style-manager 0.8
StreetView 3.2
HouseNumbering3 version 0.0.5
MultiJoin 1.0
quick_map_services 0.19.33
RenameField 0.1
Qgis2threejs 2.7.1
postgis_geoprocessing 0.9
DAI 0.1
profileexport 0.5.1
CalculateGeometry 0.6.9
citygen 0.3
splitmultipart 1.0.0
pgRoutingLayer 3.0.2
ProcessX 1.5
qquake 1.5
DeepLearningTools 0.2.0
QuickOSM 2.2.3
veloroutes_voies_vertes 1.0.0
tile_index_generator 1.0
qgis_resource_sharing 1.0.0
pluginbuilder3 3.2.1
realcentroid 1.0.3
gribdownloader 0.5
GeometryShapes 0.7
PostGISQueries 0.2
xplan-umring 2.3.3
timemanager 3.6
OSMDownloader 1.0.3
openlayers_plugin 2.0.0
QuickWKT 3.1
plugin_reloader 0.9.3
postgis_toolbox 1.1
grassprovider 2.12.99
processing 2.12.99
db_manager 0.1.20

@Antoviscomi
Copy link

Antoviscomi commented Oct 5, 2023

@rgreenwood look at the type, your gpkg contain 4 MultiLineString type not LineString type ;-)

@rgreenwood
Copy link
Author

@Antoviscomi thanks for looking at it. I am aware that the layer is a multi, as are the polygon layers that also crash.

@elpaso elpaso self-assigned this Oct 5, 2023
@rgreenwood
Copy link
Author

rgreenwood commented Oct 5, 2023

@Antoviscomi I watched your screencast again and I believe you created a new temporary scratch layer, then pasted the features into it. That is not what I am doing. I select the features, copy them and then go to the Edit menu > Paste Features > Temporary Scratch Layer. The keyboard shortcut Ctrl-Alt-V does the same thing.

The layer is automatically created with the correct type (multi-linestring) and coord system (epsg:2242). I make it editable and select all features, then click the Merge Selected Features button, then crash.

@Antoviscomi
Copy link

Antoviscomi commented Oct 6, 2023

@Antoviscomi I watched your screencast again and I believe you created a new temporary scratch layer, then pasted the features into it. That is not what I am doing. I select the features, copy them and then go to the Edit menu > Paste Features > Temporary Scratch Layer. The keyboard shortcut Ctrl-Alt-V does the same thing.

The layer is automatically created with the correct type (multi-linestring) and coord system (epsg:2242). I make it editable and select all features, then click the Merge Selected Features button, then crash.

@rgreenwood I'm sorry,
I misunderstood this step,
So I confirm the issue

Video.del.06-10-2023.09.18.03.webm

nyalldawson added a commit that referenced this issue Oct 6, 2023
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Oct 9, 2023
constraint set

Fixes qgis#54856

(cherry picked from commit ec631e8)
nyalldawson added a commit that referenced this issue Oct 9, 2023
constraint set

Fixes #54856

(cherry picked from commit ec631e8)
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants