Ticket #3839 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

qgis trunk crashes when saving project or clicking "OK" in the "new shape" dialog (or when using other dialogs)

Reported by: lutra Owned by: rblazek
Priority: critical: causes crash or data corruption Milestone: Version 1.7.0
Component: Build/Install Version: Trunk
Keywords: Cc: jef, alexbruy
Platform Version: Platform: All
Must Fix for Release: Yes Awaiting user input: no

Description

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

Attachments

backtrace_3839.txt Download (3.4 KB) - added by brushtyler 2 years ago.
backtrace

Change History

Changed 2 years ago by lutra

  • cc jef added

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

Changed 2 years ago by brushtyler

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.

Changed 2 years ago by brushtyler

backtrace

Changed 2 years ago by lutra

  • summary changed from qgis trunk crashes when saving project or clicking "OK" in the "new shape" dialog to qgis trunk crashes when saving project or clicking "OK" in the "new shape" dialog (or when using other dialogs)

Changed 2 years ago by alexbruy

Confirmed under Slackware with latest self-compiled sources (c3e161a).

Changed 2 years ago by alexbruy

  • cc alexbruy added

Seems Windows builds not affected (tested with ef981f1)

Changed 2 years ago by rblazek

It should be fixed in 4070354d5.

Please test and close if it works.

Changed 2 years ago by alexbruy

  • status changed from new to closed
  • resolution set to fixed

Fixed in commit:4070354d5f0a8f401d3c

Note: See TracTickets for help on using tickets.