Bug report #8221

QGIS Crashes when saving the project and corrupt project file

Added by Michael Douchin almost 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Nathan Woodrow
Category:Project Loading/Saving
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 #:17035

Description

Version QGIS master version b7d7076

Issue : With an existing opened project, when you load a layer from the browser, then click on the Save button, QGIS crashes and corrupts the project file (project file size then : 0 ko). If the layer is loaded with the Add Vector layer menu, everything is ok

How to reproduce

  • open the attached project debug.qgs
  • open the attached shapefile with the classical "add vector layer" menu, the save --> Ok
  • open the attached shapefile with the browser panel Then save --> QGIS crashes

test.zip (48.5 KB) Michael Douchin, 2013-07-05 02:15 AM

Associated revisions

Revision 36bf49de
Added by Jürgen Fischer almost 11 years ago

browser: emit layoutAboutToBeChanged() before destroying home item (fixes #8221)

History

#1 Updated by Michael Douchin almost 11 years ago

  • Category changed from Browser to Project Loading/Saving

#2 Updated by Daniel Vaz almost 11 years ago

sorry, I can't reproduce with these steps. master 7d273b1eed

#3 Updated by Salvatore Larosa almost 11 years ago

I can reproduce here and I guess it is a Browser issue.

Stacktrace on the crash:

Program received signal SIGSEGV, Segmentation fault.
0x0000000001224a40 in ?? ()
(gdb) bt
#0  0x0000000001224a40 in ?? ()
#1  0x00007ffff48fdfad in QgsBrowserModel::flags (this=0x4d756a0, index=...)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsbrowsermodel.cpp:170
#2  0x00007ffff2e1e4eb in QSortFilterProxyModel::flags(QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#3  0x00007ffff2df2572 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#4  0x00007ffff2df2603 in QItemSelection::indexes() const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#5  0x00007ffff2df7cfb in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff2df8a89 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff350354f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffff2e20a51 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007ffff350354f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007ffff48fd063 in QgsBrowserModel::updateProjectHome (this=0x4d756a0)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsbrowsermodel.cpp:53
#11 0x00007ffff4b9abc1 in QgsBrowserModel::qt_static_metacall (_o=0x4d756a0, 
    _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fffffffb6e0)
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/core/moc_qgsbrowsermodel.cxx:70
#12 0x00007ffff350354f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#13 0x00007ffff4b9f6f9 in QgsProject::writeProject (this=0x118fd40, _t1=...)
---Type <return> to continue, or q <return> to quit---
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/core/moc_qgsproject.cxx:129
#14 0x00007ffff4a1d9dd in QgsProject::write (this=0x118fd40)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsproject.cpp:985
#15 0x0000000000586a1f in QgisApp::fileSave (this=0x1033910)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/app/qgisapp.cpp:3656
#16 0x00000000008cb67b in QgisApp::qt_static_metacall (_o=0x1033910, 
    _c=QMetaObject::InvokeMetaMethod, _id=136, _a=0x7fffffffc1f0)
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/app/moc_qgisapp.cxx:669
#17 0x00007ffff350354f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#18 0x00007ffff2891502 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x00007ffff28916f0 in QAction::activate(QAction::ActionEvent) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007ffff2c5185f in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007ffff2c51b0c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff2d0ba8a in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#23 0x00007ffff28e6e10 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff289770c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff289c3eb in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#26 0x00007ffff48f2b58 in QgsApplication::notify (this=0x7fffffffd890, receiver=0x1087010, event=
    0x7fffffffcb50) at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsapplication.cpp:242
#27 0x00007ffff34edb5e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00007ffff289854b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff2912fc4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff2911d51 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff2938bc2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007fffeed77355 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffeed77688 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fffeed77744 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff351c276 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#36 0x00007ffff293883e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff34ec8af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x00007ffff34ecb38 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#39 0x00007ffff34f1cf8 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#40 0x0000000000564349 in main (argc=1, argv=0x7fffffffe388)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/app/main.cpp:1020

#4 Updated by Jürgen Fischer almost 11 years ago

  • Status changed from Open to Closed

#5 Updated by Michael Douchin almost 11 years ago

Thanks a lot

Also available in: Atom PDF