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

Multiple selection from table paste into layer crashes QGIS #15888

Closed
qgib opened this issue Nov 18, 2012 · 30 comments
Closed

Multiple selection from table paste into layer crashes QGIS #15888

qgib opened this issue Nov 18, 2012 · 30 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Nov 18, 2012

Author Name: Patrick Dunford (@enzedrailmaps)
Original Redmine Issue: 6723
Affected QGIS version: master
Redmine category:vectors


When multiple features of a layer are selected in the layer using the selection tools and pasted to another layer, QGIS performs the paste satisfactorily.
However if a table is opened and used to select the multiple features, the paste operation to another layer crashes QGIS.


@qgib
Copy link
Contributor Author

qgib commented Nov 24, 2012

Author Name: Giovanni Manghi (@gioman)


it works fine here on master, please try qgis-dev/osgeo4w and/or attach sample data.


  • crashes_corrupts_data was changed from 0 to 1
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Dec 27, 2012

Author Name: Giovanni Manghi (@gioman)


closing for lack of feedback, reopen if necessary.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to worksforme

@qgib
Copy link
Contributor Author

qgib commented Jan 17, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


This is inconsistent, it will crash on some occasions but not on others.

However, what is consistent is that it is the only time Qgis crashes when pasting multiple features.

Usually, the source file layer is a KML file and the destination file layer is SHP. They have different column names (since the column names in a KML produced by Google Earth are preset to Name and Description). The shapefiles I use generally have two columns, Name and Caption, both 80 character text columns.

There's no point in me sending you sample data, since I can't make it consistently crash with the same data on different occasions.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Jan 17, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


By the way I have quite a lot of paste crashes, in various circumstances
so the first question I would ask is about exception handling around paste operations,
is there exception handling to check for null pointers or data passed to a paste operation.

@qgib
Copy link
Contributor Author

qgib commented Jan 23, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Here is a summary of copy/paste problems

  • multiple item paste can crash Qgis
  • multiple item paste does not paste all the selected features.

Today for example I opened a KML and selected 25 features by using a selection rectangle. I deliberately ensured the selection rectangle was dragged all the way across the source area. I then pasted them to another layer. After the paste, seven features were not pasted. Only 18 features were pasted. Since there is no way I can look at the clipboard to see whether there were 25 features on it, I can't actually tell whether the problem was at the copy operation or the paste operation.

After about my third or fourth attempt I finally managed to get all 25 features pasted at one operation.

@qgib
Copy link
Contributor Author

qgib commented Jan 23, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Here's another more consistent multiple selection operation

  • Select 25 features from a KML layer
  • paste them into a shapefile layer.
  • check to see all 25 features are selected.
  • try to move all 25 features using the move tool
  • observation is about 20-22 features moved and about 3-5 features didn't move.
  • checked to see all features are selected (they are) by opening the attribute table.

At a rough guess, the features that weren't moved are the ones that weren't actually visible at the time, because they were not within the client area of the application window. But if you do any kind of multiple selection, an operation should apply to all selected features, not just the ones that are visible in the application window at the time.

This has been observed multiple times and seems to be consistent.
I will be switching to the 1.9 installation later on today for more testing.

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Using the attached data and a Windows 8 x64 computer with QGis 1.9 2a4d79d

  1. Open the project and reattach the two layers.
  2. Open the attributes table of layer Whakatu and select all the rows.
  3. Deselect +row 11 only+ (first column contains "Main") by Ctrl clicking.
  4. Go to the toolbar and click on Copy.
  5. Switch to the layer WBGHPNGLWhakatuYard2010 and put it into Edit mode.
  6. Click Paste.
  7. Qgis crashes.

  • 5389 was configured as Bug6723.zip

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


By the way, this is an example of multi feature paste crash when features are selected in the attribute table.

If I select the multiple features in the map using the selection tools and then paste them, no crash occurs. This is how I have managed to keep my hair on until now.

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Tested and shown to crash on Windows 7 x86 running another build of 1.9

Cannot test on the latest master 0c1faa5 until the KML loading bug is fixed.

@qgib
Copy link
Contributor Author

qgib commented Mar 10, 2013

Author Name: Giovanni Manghi (@gioman)


On the latest master it seems to work fine, selection can be done using the map. Does this happen only when selecting/copying from the table of attributes? If yes it is a regression, so meanwhile I'll tag this as blocker, waiting for the attributes issue to be fixed for kml, gpx, etc.


  • resolution was changed from worksforme to
  • status_id was changed from Reopened to Feedback
  • priority_id was changed from Normal to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Mar 10, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


This does happen when the attribute table is used to select the features, which I am assured is a legitimate way of selecting multiple features for copying.

@qgib
Copy link
Contributor Author

qgib commented Mar 10, 2013

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

which I am assured is a legitimate way of selecting multiple features for copying.

yes of course.

@qgib
Copy link
Contributor Author

qgib commented Mar 19, 2013

Author Name: Regis Haubourg (@haubourg)


is this speficic to kml provider? shp works fine here

@qgib
Copy link
Contributor Author

qgib commented May 28, 2013

Author Name: Nathan Woodrow (@NathanW2)


Seems a bit hit and miss. I just had a crash copying from the attribute table but now I can't get it to do it again.

@qgib
Copy link
Contributor Author

qgib commented Jun 2, 2013

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Jun 5, 2013

Author Name: Matthias Kuhn (@m-kuhn)


Can't reproduce with the attached dataset (tried several times).
A crashdump/stacktrace and debug output would be very helpful.

@qgib
Copy link
Contributor Author

qgib commented Jun 6, 2013

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jul 1, 2013

Author Name: Salvatore Larosa (@slarosa)


I can not reproduce it here, tested on Linux and Windows XP.

Please do you check if this may be closed ?

@qgib
Copy link
Contributor Author

qgib commented Jul 2, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


I just checked it again on my computer (see #15888 (comment))
Well it crashed again.

@qgib
Copy link
Contributor Author

qgib commented Jul 4, 2013

Author Name: Matthias Kuhn (@m-kuhn)


Patrick, would you be able to generate a backtrace or crashdump?
This would help a lot for getting an idea for where the problem roots.

@qgib
Copy link
Contributor Author

qgib commented Jul 4, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Can you give me the steps for that.

@qgib
Copy link
Contributor Author

qgib commented Jul 15, 2013

Author Name: Salvatore Larosa (@slarosa)


Patrick Dunford wrote:

Can you give me the steps for that.

I guess you are asking for Windows, if yes you can find a dump file (like @qgis-date-xxxx-xxxx-revision.dmp@)
into the temp directory. it is created when the crash occurs.
if I am not wrong, that should be a good point to trace the problem.

@qgib
Copy link
Contributor Author

qgib commented Jul 17, 2013

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Vectors

@qgib
Copy link
Contributor Author

qgib commented Jul 21, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


There are no files called *.dmp anywhere in my computer.

@qgib
Copy link
Contributor Author

qgib commented Jul 21, 2013

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

There are no files called *.dmp anywhere in my computer.

the dump files are discarded when you reboot, I think.

@qgib
Copy link
Contributor Author

qgib commented Jul 22, 2013

Author Name: Salvatore Larosa (@slarosa)


Patrick Dunford wrote:

There are no files called *.dmp anywhere in my computer.

Hi Patrick,
when you get the crash will be shown a dialog which tell to you
where the dmp file has been created.
Also, please, could you try again with the latest master? and,
eventually, could you create a video with the steps to the crash?
Thanks!

@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


No such thing happens.

I get the Windows error dialog telling me that Qgis has stopped working. Nothing tells me where to find the dmp files.
There are no files in \Users\x\Appdata\Local\Temp or C:\Windows\Temp or D:\Users\x\.qgis

@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2013

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

No such thing happens.

I get the Windows error dialog telling me that Qgis has stopped working. Nothing tells me where to find the dmp files.
There are no files in \Users\x\Appdata\Local\Temp or C:\Windows\Temp or D:\Users\x\.qgis

are you using the latest qgis master available?

@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2013

Author Name: Patrick Dunford (@enzedrailmaps)


Install build 28 of the weekly builds

Well it doesn't crash any more so I can't get you any dmp files :)

@qgib
Copy link
Contributor Author

qgib commented Jul 26, 2013

Author Name: Salvatore Larosa (@slarosa)


  • status_id was changed from Feedback to Closed
  • resolution was changed from to worksforme

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) Crash/Data Corruption labels May 24, 2019
@qgib qgib closed this as completed May 24, 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 Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant