Bug report #6902

"Merge selected features" leads to data loss and crash (in master)

Added by Giovanni Manghi almost 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16027

Description

Pick a vector layer,

select two features and try the "merge selected features" tool.

QGIS will ask you column by column if you want to keep the attribute of the first feature or if the one of the second feature.

If the column is of a numeric type, then a few more options are available, as sum, min, max, etc.

It seems anyway that this functions to always return a decimal number, and if the column is of type integer then the computed values is LOST (it becomes 0) when the edits are saved. This happens in QGIS 1.8.

In master is the same, but actually after merging the feature if the user try open the table of attributes QGIS will crash.

tested on Windows for now, will do also on linux.

Screen_Shot_2013-05-09_at_10.25.22.png (242 KB) Marco Francesco De Paolini, 2013-05-09 08:27 AM


Related issues

Related to QGIS Application - Bug report #7668: Merge feature tools causes Qgis crash Closed 2013-04-22

Associated revisions

Revision 7d38eac0
Added by Matthias Kuhn over 6 years ago

"Merge selected features" leads to data loss (Fix #6902)

History

#1 Updated by Giovanni Manghi almost 7 years ago

Oh boy... today it doesn't seems I'm able to replicate the crash, but the only the data loss. I will try to recover the original layer used in the first test.

#2 Updated by Giovanni Manghi almost 7 years ago

see also #7009

#3 Updated by Marco Francesco De Paolini over 6 years ago

May be related: sometimes when selecting two features with identical fields values and try the "merge selected features", it appears to select different random features in the Merge feature attributes window. Not sure how to replicate this issue.

#4 Updated by Giovanni Manghi over 6 years ago

The result (after saving edits) is always wrong in an integer column (it becomes 0) when using any function (median, sum, min, max). In a decimal column the decimal part is removed is using "median".

Anyway it causes data corruption.

#5 Updated by Matthias Kuhn over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF