qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.5k stars 2.99k forks source link

QGIS crashes when creating an attribute join if the target layer's table is open #48380

Closed stuskier closed 2 years ago

stuskier commented 2 years ago

What is the bug or the crash?

QGIS will crash (freeze) when creating an attribute join if the target layer's table is open at the time the join is created. The freeze can only be "undone" by killing QGIS via the Windows Task Manager and then restarting QGIS. If the target layer's table is not open at the time the join is created, the join is successful and QGIS continues to operate normally

Steps to reproduce the issue

  1. Open the target layer's table
  2. From the table's properties window, click on the "join" tab. The "Add Vector Join" window appears.
  3. Add the join criteria and click "Ok".
  4. As soon as the "Ok" button is clicked, QGIS freezes.

Versions

QGIS version | 3.24.2-Tisler | QGIS code revision | 13c1a028 -- | -- | -- | -- Qt version | 5.15.2 Python version | 3.9.5 GDAL/OGR version | 3.4.2 PROJ version | 9.0.0 EPSG Registry database version | v10.054 (2022-02-13) GEOS version | 3.10.2-CAPI-1.16.0 SQLite version | 3.38.1 PDAL version | 2.3.0 PostgreSQL client version | unknown SpatiaLite version | 5.0.1 QWT version | 6.1.3 QScintilla2 version | 2.11.5 OS version | Windows 10 Version 2009   |   |   |   Active Python plugins DataPlotly | 3.9 DissolveWithStats | 0.6 GroupStats | 2.2.5 ImportPhotos | 3.0.3 LAStools | 1.4 latlontools | 3.6.3 mapswipetool_plugin | 1.2 mask | 1.10.2 Mergin | 2022.2.1 mmqgis | 2021.9.10 MultiDistanceBuffer | 3.2.4 NNJoin | 3.1.3 OSMDownloader | 1.0.3 pointstopaths | 0.4 qchainage | 3.0.1 qdraw | 3.0.2 qfieldsync | v4.0.0 Qgis2threejs | 2.7.1 QGISSortAndNumber-master | 1.0 qgis_resource_sharing | 0.16.0 QuickOSM | 2.0.1 quick_map_services | 0.19.29 RasterAttributeTable | 1.1 SemiAutomaticClassificationPlugin | 7.10.6 Serval | 3.10.2 shapetools | 3.4.4 SpreadsheetLayers | 2.0.1 SRTM-Downloader | 3.1.17 SuperLabeling | ver.1.4 VectorBender | 0.2.1 db_manager | 0.1.20 grassprovider | 2.12.99 MetaSearch | 0.3.6 processing | 2.12.99 sagaprovider | 2.12.99 QGIS version 3.24.2-Tisler QGIS code revision [13c1a028](https://github.com/qgis/QGIS/commit/13c1a028) Qt version 5.15.2 Python version 3.9.5 GDAL/OGR version 3.4.2 PROJ version 9.0.0 EPSG Registry database version v10.054 (2022-02-13) GEOS version 3.10.2-CAPI-1.16.0 SQLite version 3.38.1 PDAL version 2.3.0 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.3 QScintilla2 version 2.11.5 OS version Windows 10 Version 2009 Active Python plugins DataPlotly 3.9 DissolveWithStats 0.6 GroupStats 2.2.5 ImportPhotos 3.0.3 LAStools 1.4 latlontools 3.6.3 mapswipetool_plugin 1.2 mask 1.10.2 Mergin 2022.2.1 mmqgis 2021.9.10 MultiDistanceBuffer 3.2.4 NNJoin 3.1.3 OSMDownloader 1.0.3 pointstopaths 0.4 qchainage 3.0.1 qdraw 3.0.2 qfieldsync v4.0.0 Qgis2threejs 2.7.1 QGISSortAndNumber-master 1.0 qgis_resource_sharing 0.16.0 QuickOSM 2.0.1 quick_map_services 0.19.29 RasterAttributeTable 1.1 SemiAutomaticClassificationPlugin 7.10.6 Serval 3.10.2 shapetools 3.4.4 SpreadsheetLayers 2.0.1 SRTM-Downloader 3.1.17 SuperLabeling ver.1.4 VectorBender 0.2.1 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 sagaprovider 2.12.99 ### Supported QGIS version - [X] I'm running a supported QGIS version according to the roadmap. ### New profile - [X] I tried with a new QGIS profile ### Additional context _No response_
stuskier commented 2 years ago

This problem has been reported at Stack Exchange GIS: https://gis.stackexchange.com/questions/425263/troubles-on-joining-data-and-identifying-specific-fields-via-joined-fields-in

jackdudman commented 2 years ago

Sounds like the same as #47921 - would the fixes for that have made it to 3.24.2 yet?

stuskier commented 2 years ago

Yes, this appears to be the same as #47921. Fixes have not made it to 3.24.2 because that's the version reported in this issue.

agiudiceandrea commented 2 years ago

@Pedro-Murteira this issue report is a duplicate of #47921 which is already fixed in master, release-3_22 and release-3_24 branches; the fix will be in the upcoming QGIS 3.24.3 and QGIS 3.22.7 releases.

pigreco commented 2 years ago

The problem is still present in QGIS 3.22.6.2 released today.

agiudiceandrea commented 2 years ago

@pigreco the patch was backported to the 3_22 and 3_24 branches and will be in QGIS 3.22.7 and QGIS 3.24.3. So, if you want to check if the patch actually fixes the bug on Windows using OSGeo4W, you need to wait for the release of QGIS 3.22.7 or QGIS 3.24.3 or you need to install and use qgis-ltr-dev or qgis-rel-dev or you need to use a recent build of QGIS 3.25.0-Master (qgis-dev).