Bug report #6723
Multiple selection from table paste into layer crashes QGIS
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | worksforme |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 15888 |
Description
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.
History
#1 Updated by Giovanni Manghi almost 12 years ago
- Crashes QGIS or corrupts data changed from No to Yes
- Status changed from Open to Feedback
it works fine here on master, please try qgis-dev/osgeo4w and/or attach sample data.
#2 Updated by Giovanni Manghi almost 12 years ago
- Status changed from Feedback to Closed
- Resolution set to worksforme
closing for lack of feedback, reopen if necessary.
#3 Updated by Patrick Dunford almost 12 years ago
- Status changed from Closed to Reopened
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.
#4 Updated by Patrick Dunford almost 12 years ago
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.
#5 Updated by Patrick Dunford almost 12 years ago
- 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.
#6 Updated by Patrick Dunford almost 12 years ago
- 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.
#7 Updated by Patrick Dunford over 11 years ago
- File Bug6723.zip added
- Open the project and reattach the two layers.
- Open the attributes table of layer Whakatu and select all the rows.
- Deselect row 11 only (first column contains "Main") by Ctrl clicking.
- Go to the toolbar and click on Copy.
- Switch to the layer WBGHPNGLWhakatuYard2010 and put it into Edit mode.
- Click Paste.
- Qgis crashes.
#8 Updated by Patrick Dunford over 11 years ago
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.
#9 Updated by Patrick Dunford over 11 years ago
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.
#10 Updated by Giovanni Manghi over 11 years ago
- Resolution deleted (
worksforme) - Status changed from Reopened to Feedback
- Priority changed from Normal to Severe/Regression
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.
#11 Updated by Patrick Dunford over 11 years ago
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.
#12 Updated by Giovanni Manghi over 11 years ago
Patrick Dunford wrote:
which I am assured is a legitimate way of selecting multiple features for copying.
yes of course.
#13 Updated by Regis Haubourg over 11 years ago
is this speficic to kml provider? shp works fine here
#14 Updated by Nathan Woodrow over 11 years ago
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.
#15 Updated by Giovanni Manghi over 11 years ago
- Status changed from Feedback to Open
#16 Updated by Matthias Kuhn over 11 years ago
Can't reproduce with the attached dataset (tried several times).
A crashdump/stacktrace and debug output would be very helpful.
#17 Updated by Giovanni Manghi over 11 years ago
- Status changed from Open to Feedback
#18 Updated by Salvatore Larosa over 11 years ago
I can not reproduce it here, tested on Linux and Windows XP.
Please do you check if this may be closed ?
#19 Updated by Patrick Dunford over 11 years ago
I just checked it again on my computer (see #6723-8)
Well it crashed again.
#20 Updated by Matthias Kuhn over 11 years ago
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.
#21 Updated by Patrick Dunford over 11 years ago
Can you give me the steps for that.
#22 Updated by Salvatore Larosa over 11 years ago
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.
#23 Updated by Jürgen Fischer over 11 years ago
- Category set to Vectors
#24 Updated by Patrick Dunford over 11 years ago
There are no files called *.dmp anywhere in my computer.
#25 Updated by Giovanni Manghi over 11 years ago
Patrick Dunford wrote:
There are no files called *.dmp anywhere in my computer.
the dump files are discarded when you reboot, I think.
#26 Updated by Salvatore Larosa over 11 years ago
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!
#27 Updated by Patrick Dunford over 11 years ago
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
#28 Updated by Giovanni Manghi over 11 years ago
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?
#29 Updated by Patrick Dunford over 11 years ago
Install build 28 of the weekly builds
Well it doesn't crash any more so I can't get you any dmp files :)
#30 Updated by Salvatore Larosa over 11 years ago
- Status changed from Feedback to Closed
- Resolution set to worksforme