Bug report #3839
qgis trunk crashes when saving project or clicking "OK" in the "new shape" dialog (or when using other dialogs)
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||13897|
Confirmed under Ubuntu and Windows.
Program seg faults. The responsible seems to be part of the code of the new "customization" feature
[[QgsCustomization]]::preNotify (this=0x861c720, receiver=0x98c9d70, event=0x98e6420, done=0xb16d4f7f) at /home/brushtyler/projects/sources/qgis/src/app/qgscustomization.cpp:841
#1 Updated by Giovanni Manghi over 10 years ago
More crashes for example when clicking "ok" or selecting files in various raster menu tools.
Debug: /home/brushtyler/projects/sources/qgis/src/app/qgscustomization.cpp: 794: (customizeWidget) p = /Customization/Widgets//QFileDialog/ on = 1 Debug: /home/brushtyler/projects/sources/qgis/src/app/qgscustomization.cpp: 860: (preNotify) click Fatal: ASSERT: "d" in file /usr/include/qt4/QtCore/qscopedpointer.h, line 112
#2 Updated by Giuseppe Sucameli over 10 years ago
It occurs closing non-native file dialogs (look at the difference between Save project and SaveAs project dialogs), either by pressing ok or cancel buttons.
Adding a check to exclude QFileDialog instances (as done for not QDialog instances) doesn't work as expected. In fact the problem is at line 841 trying to cast QObject to QWidget because the object was deleted yet before the preNotify was called.
I've attached a backtrace.