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
Editing a GeoPackage feature with spaces in the field names can crash QGIS #29630
Comments
Author Name: Brett Carlock (@Saijin-Naib) Can confirm here with the supplied data. |
Author Name: Giovanni Manghi (@gioman) No crash here on 3.6.1 on linux. Please also try a new/clean (qgis) profile, no 3rd party plugins installed.
|
Author Name: Matt Yoder (@yomatters) I can reproduce the crash with a clean profile on both Windows and Mac OS. However, I noticed in my testing that not all of the points in the layer cause the crash when they are moved. The point with fid 97 consistently causes the crash for me when I try to move it using the Vertex Tool. |
Author Name: Giovanni Manghi (@gioman) Matt Yoder wrote:
not on linux. |
Author Name: Matt Yoder (@yomatters) Yes, I went to Settings -> New Profile to create a new profile. I get the same crash under Windows and Mac OS with the clean profile. I just tested on Ubuntu as well, but I don't get the crash there. |
Author Name: Giovanni Manghi (@gioman)
|
MacOS build uses 1.9.0, Windows uses 1.9.0-1. Linux has 1.8.5. The bug is not present in 1.8.5 version and hence it cannot be reproduced in linux. the crash does not happen when you first move some other vertex and just after vertex 97. This suggests that it is something with the RTree internals. The whitespace in source fields should not have any affect on this, since RTree does not use fields, just fids and geometries. duplicate od #28751 |
Tested on Linux and I can't replicate with libspatialindex master (nearly the same as 1.9.0). BUT: looking into libspatialindex bug libspatialindex/libspatialindex#107 and code, it seems that the Node::rstarSplit() code could fail in case of some weird coordinates (nan/inf/?), probably if a whole node is full of them. And indeed, the test layer has a bunch of
Libspatialindex probably should not allow insertion of features with bounding boxes being NaN, but at the same time we should not feed such features to libspatialindex either - they would not match any spatial search. So I would suggest to skip indexing features in QgsPointLocator::rebuildIndex() where the bounding box is NaN or Inf (using QgsRectangle::isFinite()) Not sure what exactly introduced this change since 1.8.5. My guess is that it was libspatialindex/libspatialindex#61 which reverses how NaN region would be treated by touchesRegion() |
Author Name: Matt Yoder (@yomatters)
Original Redmine Issue: 21815
Affected QGIS version: 3.6.1
Redmine category:digitising
Steps to reproduce:
Renaming the source fields to remove spaces from the field names before editing seems to prevent the crash.
Crash output:
The text was updated successfully, but these errors were encountered: