Opened 13 years ago

Closed 13 years ago

#3839 closed bug (fixed)

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
Must Fix for Release: Yes Platform: All
Platform Version: 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 (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 by lutra, 13 years ago

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

comment:2 by brushtyler, 13 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.

by brushtyler, 13 years ago

Attachment: backtrace_3839.txt added

backtrace

comment:3 by lutra, 13 years ago

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

comment:4 by alexbruy, 13 years ago

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

comment:5 by alexbruy, 13 years ago

Cc: alexbruy added

Seems Windows builds not affected (tested with ef981f1)

comment:6 by rblazek, 13 years ago

It should be fixed in 4070354d5.

Please test and close if it works.

comment:7 by alexbruy, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in commit:4070354d5f0a8f401d3c

Note: See TracTickets for help on using tickets.