Bug report #7668

Merge feature tools causes Qgis crash

Added by Alessandro Ciali over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Digitising
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 #:16585

Description

Merge selected feature tools causes qgis crash when choosing the feature whose attribute has to be copied.
Attached dump file

qgis-20130422-085541-5468-4456-269a419.zip (3.24 MB) Alessandro Ciali, 2013-04-22 12:13 AM

verifiche_idrauliche.zip (3.45 KB) Alessandro Ciali, 2013-06-02 03:36 AM

qgis-20130602-152215-8444-8592-e2bd04f.zip (3.26 MB) Alessandro Ciali, 2013-06-02 06:28 AM

qgis-20130620-173824-5388-4756-e4b278d.zip (3.01 MB) Alessandro Ciali, 2013-06-20 08:55 AM


Related issues

Related to QGIS Application - Bug report #7472: vector editing errors Closed 2013-03-29
Related to QGIS Application - Bug report #6902: "Merge selected features" leads to data loss and crash (i... Closed 2012-12-20
Duplicated by QGIS Application - Bug report #7922: Editing: feature merging crashes QGIS when selecting a ro... Closed 2013-05-28

Associated revisions

Revision e53aa076
Added by Matthias Kuhn over 11 years ago

Merge features: Fix "take attributes from selected feature"
Fix #7668
Fix #7922

History

#1 Updated by Luca Lanteri over 11 years ago

Confirmed also on linux64 - ubuntu 12.10.

#2 Updated by Alessandro Ciali over 11 years ago

I think that's a misunderstanding. The bug I was refferring is about the merge tool in the editing tools, the tools that, during an editing session, is used to select and merge two or more FEATURES NOT THE WHOLE SHAPES.
So it seems to me that the bug #7823 is not related to #7668.

#3 Updated by Giovanni Manghi over 11 years ago

  • Status changed from Open to Feedback

Hi Alessandro, still happens for you? here does not happen. Can you attach sample data? thanks.

#4 Updated by Alessandro Ciali over 11 years ago

Yes Giovanni, still present on the latest master. I refer to the merge selected features tools in the editing toolbar. Sample data is not necessary, the bug appens with every vector layer (line, polygons).
Not completely sure, but I think that this bug is related in some way to #7472.
I will check future version

#5 Updated by Giovanni Manghi over 11 years ago

Alessandro Ciali wrote:

Yes Giovanni, still present on the latest master. I refer to the merge selected features tools in the editing toolbar.

yes I know,

Sample data is not necessary, the bug appens with every vector layer (line, polygons).

it does not happen here, so this is why I asked for sample data.

#6 Updated by Alessandro Ciali over 11 years ago

Tested with e2bd04f on win64.
steps:
1. start editing
2. select at least 2 features
3. use merge selected feature tool
4. in the tool window, select one feature (whose attributes should be transferred to the merged shape)
5. QGIS crash
It not appens on 1.8
Attached sample data, have you any idea why this bug is not reproducible? If you send me some instruction, I can make further test.

#7 Updated by Giovanni Manghi over 11 years ago

Alessandro Ciali wrote:

Tested with e2bd04f on win64.
steps:
1. start editing
2. select at least 2 features
3. use merge selected feature tool
4. in the tool window, select one feature (whose attributes should be transferred to the merged shape)
5. QGIS crash
It not appens on 1.8
Attached sample data, have you any idea why this bug is not reproducible? If you send me some instruction, I can make further test.

Just tested on qgis master/osgeo4w and does not crash.

Can you temporarily remove your .qgis2 folder and so check if is a plugin that is interfering? cheers.

#8 Updated by Alessandro Ciali over 11 years ago

I renamed directory .qgis2 and launch qgis so that a new empy one was created. All plug-ins but default ones were unloaded. I tried to merge 2 feature, but the crash still appened.
I attach the dump produced on crash, if can help.

#9 Updated by Alessandro Ciali over 11 years ago

After further tests, and restabishing the original .qgis2 directory, I created a new project, I added the polygon layer I sent to you, then I selected two feature and merge them together. Well, no crash appened, but no attribute was passed to the resulting merged feature (the fields are empty).
I don't find an answer to this random behaviour...

#10 Updated by Giovanni Manghi over 11 years ago

Alessandro Ciali wrote:

Well, no crash appened, but no attribute was passed to the resulting merged feature (the fields are empty).

well, odd again because with your dataset I don't see this behavior.

On the other hand if the columns are numeric the tool is known to fail, see #6902

#11 Updated by Alessandro Ciali over 11 years ago

At the end of my tests, these are the results (on my computers!):
- merge feature no more causes QGIS to crash, but when I select a feature whose attribute will be trasferred, all fields get empty, no matters if they are numeric or character type.
- clicking ok, the tool merge the 2 feature correctly, but if I have made a choice in the merge dialog window, attributes are empty for the new merged feature.
So, I don't know where is the problem: it seems to be my problem, due to installation, or something else, but the question is: has anybody else experienced thi bug? If I'm the only one, I suggest to close the ticket.

#12 Updated by Giovanni Manghi over 11 years ago

Alessandro Ciali wrote:

At the end of my tests, these are the results (on my computers!):
- merge feature no more causes QGIS to crash, but when I select a feature whose attribute will be trasferred, all fields get empty, no matters if they are numeric or character type.
- clicking ok, the tool merge the 2 feature correctly, but if I have made a choice in the merge dialog window, attributes are empty for the new merged feature.
So, I don't know where is the problem: it seems to be my problem, due to installation, or something else, but the question is: has anybody else experienced thi bug? If I'm the only one, I suggest to close the ticket.

Hi Alessandro,

can test on another machine? I'm not getting your issues, but this could mean nothing.

#13 Updated by Andreas Neumann over 11 years ago

see also #7922 - which seems to be the same bug.

With the latest OSGeo4W nightly I do not have the problem anymore.

#14 Updated by Andreas Neumann over 11 years ago

I can confirm that the attribute handling is buggy.

After a merge - all the attributes are gone, even if the user selected a record before.

So this bug cannot be closed yet.

#15 Updated by Matthias Kuhn over 11 years ago

Please test if 7d38eac solved this issue.

#16 Updated by Alessandro Ciali over 11 years ago

I've now tested version e4b278d (win7 64bit). To be sure that any plugin could collide with merge tool, I renamed .qgis directory before starting QGIS. Then:

  • created a new shape in 3003 projection and 1 field (ID, numeric), drawn with categorized symbology based on ID field.
  • I started editing and I created 4 polygons with different ID values.
  • I selected 2 polygons and used the tool merge selected features.
  • I selected one of the two features attributes to keep after merging

QGIS crashed as usual, minidump attached. Tell me if It is necessary further test tha I can perform.

#17 Updated by Alessandro Ciali over 11 years ago

With the latest version f8d6e32 on win7 64bit, QGIS master no more crashes using merge selected features, but:
  • selecting two or more features and using merge selected features tool without making any choice in the merge features attributes performs correctly without errors
  • selecting one of the selected feature to copy attribute from, results in an empty record
  • choosing field by field the attributes of the merged feature from the dropdown menu, the merge operation ends correctly

I've tested this beaviour with integer, real, text field experiencing no difference; minimum, maximum. median, sum, concatenation operators selectable from the merge attribute window perform correctly.
Merge attributes tool shows exactly the same behaviour.

#18 Updated by Giovanni Manghi over 11 years ago

  • OS version deleted (win7 - 64bit)
  • Operating System deleted (windows)

Matthias Kuhn wrote:

Please test if 7d38eac solved this issue.

Hi Matthias,

it still crashes when clicking on "takes attributes from selected feature"

Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Fatal: QGIS died on signal 11
Stacktrace (piped through c++filt):
/usr/bin/qgis.bin(myMessageOutput(QtMsgType, char const*)+0xe2)[0x4e7e72]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x2e)[0x7f98675c441e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x718bf)[0x7f98675c48bf]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qFatal(char const*, ...)+0x94)[0x7f98675c4a64]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0)[0x7f9864ab54a0]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QLocalePrivate::stringToLongLong(QString const&, int, bool*, QLocalePrivate::GroupSeparatorMode) const+0x6c)[0x7f98675f698c]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QString::toLongLong(bool*, int) const+0x42)[0x7f9867617222]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QString::toInt(bool*, int) const+0x9)[0x7f9867617349]
/usr/bin/qgis.bin(QgsMergeAttributesDialog::refreshMergedValue(int)+0x652)[0x644a02]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7f98676e2281]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QComboBox::currentIndexChanged(QString const&)+0x25)[0x7f9866e38495]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x5b34e0)[0x7f9866e384e0]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x5b376a)[0x7f9866e3876a]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QComboBox::setCurrentIndex(int)+0x57)[0x7f9866e38877]
/usr/bin/qgis.bin(QgsMergeAttributesDialog::on_mFromSelectedPushButton_clicked()+0x1bb)[0x643dab]
/usr/bin/qgis.bin(QgsMergeAttributesDialog::qt_metacall(QMetaObject::Call, int, void**)+0x5b)[0x7d614b]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x4b9)[0x7f98676e2489]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::clicked(bool)+0x32)[0x7f98670e0c72]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x599a4e)[0x7f9866e1ea4e]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x59ad8b)[0x7f9866e1fd8b]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::mouseReleaseEvent(QMouseEvent*)+0x8c)[0x7f9866e1fffc]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x684)[0x7f9866aa1144]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4)[0x7f9866a50894]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7f9866a560bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7f98685dc8e6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7f98676cde9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7f9866a51862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bbf5)[0x7f9866ad0bf5]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(XEvent*)+0xdce)[0x7f9866acfbae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7f9866af90d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7f98635e1d53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7f98635e20a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7f98635e2164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7f98676fd3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7f9866af8d5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7f98676ccc82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7f98676cced7]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QDialog::exec()+0xd6)[0x7f9866f20936]
/usr/bin/qgis.bin(QgisApp::mergeSelectedFeatures()+0x1db)[0x510aeb]
/usr/bin/qgis.bin[0x7ceb7a]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7f98676e2281]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::triggered(bool)+0x32)[0x7f9866a4a132]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::activate(QAction::ActionEvent)+0x6f)[0x7f9866a4a31f]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x59ad4a)[0x7f9866e1fd4a]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::mouseReleaseEvent(QMouseEvent*)+0x8c)[0x7f9866e1fffc]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QToolButton::mouseReleaseEvent(QMouseEvent*)+0xa)[0x7f9866edd5da]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x684)[0x7f9866aa1144]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4)[0x7f9866a50894]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7f9866a560bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7f98685dc8e6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7f98676cde9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7f9866a51862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bbf5)[0x7f9866ad0bf5]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0xdce)[0x7f9866acfbae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7f9866af90d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7f98635e1d53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7f98635e20a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7f98635e2164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7f98676fd3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7f9866af8d5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7f98676ccc82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7f98676cced7]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::exec()+0x87)[0x7f98676d1f67]
/usr/bin/qgis.bin(main+0x229e)[0x4e3cce]
/lib/x86_64-linux-gnu/libc.so.6(
_libc_start_main+0xed)[0x7f9864aa076d]
/usr/bin/qgis.bin[0x4e7be1]
Aborted

#19 Updated by Giovanni Manghi over 11 years ago

  • selecting two or more features and using merge selected features tool without making any choice in the merge features attributes performs correctly without errors
  • selecting one of the selected feature to copy attribute from, results in an empty record
  • choosing field by field the attributes of the merged feature from the dropdown menu, the merge operation ends correctly

Hi Alessandro,

what is the difference between the 2nd and 3rd case?

#20 Updated by Alessandro Ciali over 11 years ago

In the 2nd case, you have to select one row in the merge selected feature window and the clik on the "Take attribute from selected feature" button;
in the 3rd case I've choosen the feature from the dropdown menues in the id line in the merge selected feature window.

#21 Updated by Giovanni Manghi over 11 years ago

Alessandro Ciali wrote:

In the 2nd case, you have to select one row in the merge selected feature window and the clik on the "Take attribute from selected feature" button;
in the 3rd case I've choosen the feature from the dropdown menues in the id line in the merge selected feature window.

ok, in my box the 2nd option still causes crashes.

#22 Updated by Matthias Kuhn over 11 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF