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

QGIS fails to copy all selected features to clipboard for large OSM datasets #28129

Closed
qgib opened this issue Nov 1, 2018 · 6 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Nov 1, 2018

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 20308
Affected QGIS version: 3.4.0
Redmine category:vectors
Assignee: Even Rouault


(I'm not in a position to confirm that this is a regression from previous versions, but it could well be)

On QGIS 3.4, copying to clipboard a large number of selected features in a large OSM dataset layer fails. Instead of copying all features, only a few features are actually inserted into the clipboard (for e.g., out of 2,500 selected features, between 1-10 features are copied). If you try to copy selected features twice in a row, the second time will lead to QGIS freezing.

Steps to reproduce:

  • Create a new project, and add the following OSM dataset (use the points layer): http://imhere-asia.com/pp.zip
  • Select a large number of points
  • Hit the copy button on QGIS' main toolbar
  • Paste the copied features (either as new scratch layer, or in MS Excel/LO Calc), notice it'll be missing most features
  • Hit the copy button on QGIS' main toolbar again, notice how QGIS freezes (you'll need to kill it)
@qgib
Copy link
Contributor Author

qgib commented Nov 1, 2018

Author Name: Even Rouault (@rouault)


#8397

@qgib
Copy link
Contributor Author

qgib commented Nov 1, 2018

Author Name: Even Rouault (@rouault)


Applied in changeset 986e11b.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Nov 1, 2018
@qgib
Copy link
Contributor Author

qgib commented Nov 1, 2018

Author Name: Even Rouault (@rouault)


  • regression was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2018

Author Name: Giovanni Manghi (@gioman)


I have noticed that opening the table of attributes it only shows 99 rows, is this a consequence of this bug?

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2018

Author Name: Even Rouault (@rouault)


Giovanni Manghi wrote:

I have noticed that opening the table of attributes it only shows 99 rows, is this a consequence of this bug?

No, this is a different issue. A quick investigation shows that it is due to
{{{

void QgsVectorLayerCache::setFullCache( bool fullCache )
{
mFullCache = fullCache;

if ( mFullCache )
{
// Add a little more than necessary...
setCacheSize( mLayer->featureCount() + 100 );
}}}

In the case of a OSM layer,mLayer->featureCount() returns -1 to indicate that the feature count is unknown, hence -1+100 = 99. I'm not familiar enough with this piece of code to fix that quickly

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2018

Author Name: Giovanni Manghi (@gioman)


Even Rouault wrote:

Giovanni Manghi wrote:

I have noticed that opening the table of attributes it only shows 99 rows, is this a consequence of this bug?

No, this is a different issue.

thanks for the explanation, I filed a different ticket.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Vectors Related to general vector layer handling (not specific data formats) Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels May 25, 2019
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 High Priority Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant