Bug report #18732

Crash when closing QGIS

Added by Antoine Lafranchis about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:Martin Dobias
Category:GUI
Affected QGIS version:3.1(master) Regression?:Yes
Operating System:Windows 10 with greek language Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:26619

Description

User Feedback

I just closed QGIS. Project was already saved. It happened all 3 times since I installed v3.0.1. This time I closed QGIS from the menu and after a few seconds the "QGis crashed" window appeared. The first two times I tried with the 'X' button: QGIS stopped responding and I had to close it with task manager.

Report Details

Crash ID: 1620e1db6fff03a492aa669cc81038220f86606b

Stack Trace

QgsMapLayerActionRegistry::mapLayerActions :
QgsActionMenu::reloadActions :
QMetaObject::activate :
QgsMapLayerActionRegistry::removeMapLayerAction :
QgsMapLayerAction::~QgsMapLayerAction :
QgsVectorLayerProperties::`default constructor closure' :
QgisApp::~QgisApp :
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator+= :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.0.1-Girona
QGIS code revision: a86bec25eb
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.15063

Associated revisions

Revision 8609a2fa
Added by Martin Dobias almost 6 years ago

Do not crash on exit due to dangling layer pointer (fixes #18732)

When using attribute dialog to edit attributes of multiple selected features,
the dialog may stay alive until QGIS exits (parented to QgisApp) and its internal
QgsActionMenu would try to reload actions when they get removed in ~QgisApp,
referring to a deleted map layer, so let's clean things up when the layer gets
deleted to avoid trouble later.

History

#1 Updated by Antoine Lafranchis about 6 years ago

Other log from identical crash

Crash ID: 343a3fb6096cb1965ad4055a0e4b7e6e18c3bbf4

Stack Trace

QListData::begin :
QgsActionManager::actions :
QgsActionMenu::reloadActions :
QMetaObject::activate :
QgsMapLayerActionRegistry::removeMapLayerAction :
QgsMapLayerAction::~QgsMapLayerAction :
QgsVectorLayerProperties::`default constructor closure' :
QgisApp::~QgisApp :
std::basic_string,std::allocator >::operator+= :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.0.1-Girona
QGIS code revision: a86bec25eb
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.15063

#2 Updated by Antoine Lafranchis almost 6 years ago

Update: The 1st crash seems to be fixed in version 3.0.3. The second one (343a3fb6096cb1965ad4055a0e4b7e6e18c3bbf4) however still happens sometimes.

It also happens with a slightly different stack trace:

Crash ID: 026b470710cc59fadc56a7fadda90d12c0dbffbf

Stack Trace

QObject::metaObject :
QMetaObject::cast :
QgsMapLayerActionRegistry::mapLayerActions :
QgsActionMenu::reloadActions :
QMetaObject::activate :
QgsMapLayerActionRegistry::removeMapLayerAction :
QgsMapLayerAction::~QgsMapLayerAction :
QgsVectorLayerProperties::`default constructor closure' :
QgisApp::~QgisApp :
std::basic_string,std::allocator >::operator+= :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.0.3-Girona
QGIS code revision: 8a899c8758
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.15063

#3 Updated by Martin Dobias almost 6 years ago

  • Assignee set to Martin Dobias

#4 Updated by Martin Dobias almost 6 years ago

Steps to reproduce:
1. open a vector layer + make it editable
2. select some features
3. click "Modify the Attributes of All Selected Features Simultaneously" to open attribute dialog
4. close dialog, close QGIS -> crash

#5 Updated by Martin Dobias almost 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF