JPNaude / Qtilities

Building blocks for Qt applications
http://jpnaude.github.io/Qtilities/
Other
137 stars 39 forks source link

MainWindowExample crashes on exit #109

Closed jkdoug closed 10 years ago

jkdoug commented 10 years ago

After compiling Qtilities and QtilitiesExamples, I simply ran the MainWindowExample and exited it. No other action was required to make this error occur.

ASSERT failure in QWeakPointer: "Detected QWeakPointer creation in a QObject being deleted", file tools\qsharedpointer.cpp, line 1230
Debug Error!

Program: D:\Qt\Qt5.2.0\5.2.0\msvc2012_64_opengl\bin\Qt5Cored.dll
Module: 5.2.0
File: global\qglobal.cpp
Line: 2104

ASSERT failure in QWeakPointer: "Detected QWeakPointer creation in a QObject being deleted", file tools\qsharedpointer.cpp, line 1230

(Press Retry to debug the application)
0   qt_message_fatal    qlogging.cpp    972 0x5770e4eb  
1   QMessageLogger::fatal   qlogging.cpp    384 0x5770de25  
2   qt_assert_x qglobal.cpp 2105    0x57706201  
3   QtSharedPointer::ExternalRefCountData::getAndRef    qsharedpointer.cpp  1230    0x57895734  
4   QWeakPointer<QObject>::QWeakPointer<QObject><QObject>   qsharedpointer_impl.h   657 0x7fee2436466   
5   QPointer<QObject>::QPointer<QObject>    qpointer.h  70  0x7fee24384f3   
6   Qtilities::Core::Observer::handle_deletedSubject    Observer.cpp    992 0x7fee2427d09   
7   Qtilities::Core::Observer::qt_static_metacall   moc_observer.cpp    303 0x7fee24fd62c   
8   QMetaObject::activate   qobject.cpp 3565    0x57b81319  
9   QMetaObject::activate   qobject.cpp 3439    0x57b80ac8  
10  Qtilities::Core::PointerListDeleter::objectDestroyed    moc_pointerlist.cpp 133 0x7fee25005ab   
11  Qtilities::Core::PointerList::removeThisObject  pointerlist.cpp 50  0x7fee24c16b3   
12  Qtilities::Core::PointerListDeleter::removeSender   pointerlist.h   52  0x7fee24144b1   
13  Qtilities::Core::PointerListDeleter::qt_static_metacall moc_pointerlist.cpp 80  0x7fee250050b   
14  QMetaObject::activate   qobject.cpp 3565    0x57b81319  
15  QMetaObject::activate   qobject.cpp 3439    0x57b80ac8  
16  QObject::destroyed  moc_qobject.cpp 203 0x57b872fa  
17  QObject::~QObject   qobject.cpp 801 0x57b827a7  
18  Qtilities::Core::Task::~Task    task.cpp    87  0x7fee24e2452   
19  Qtilities::Core::Task::`vbase destructor'   QtilitiesCored_1_4      0x7fee24c3393   
20  Qtilities::CoreGui::ObserverTreeModelBuilderPrivateData::~ObserverTreeModelBuilderPrivateData   QtilitiesCoreGuid_1_4       0x7fee278b554   
21  Qtilities::CoreGui::ObserverTreeModelBuilderPrivateData::`scalar deleting destructor'   QtilitiesCoreGuid_1_4       0x7fee278ba77   
22  Qtilities::CoreGui::ObserverTreeModelBuilder::~ObserverTreeModelBuilder ObserverTreeModelBuilder.cpp    48  0x7fee27884f0   
23  Qtilities::CoreGui::ObserverTreeModelData::~ObserverTreeModelData   QtilitiesCoreGuid_1_4       0x7fee277da60   
24  Qtilities::CoreGui::ObserverTreeModelData::`scalar deleting destructor' QtilitiesCoreGuid_1_4       0x7fee277e1c7   
25  Qtilities::CoreGui::ObserverTreeModel::~ObserverTreeModel   observertreemodel.cpp   89  0x7fee276eee3   
26  Qtilities::ExtensionSystem::PluginTreeModel::~PluginTreeModel   PluginTreeModel.h   38  0x7fee0fc6c63   
27  Qtilities::ExtensionSystem::PluginTreeModel::`scalar deleting destructor'   QtilitiesExtensionSystemd_1_4       0x7fee0fc6cd7   
28  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
29  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
30  QMainWindow::~QMainWindow   qmainwindow.cpp 379 0x58498de2  
31  Qtilities::CoreGui::ObserverWidget::~ObserverWidget observerwidget.cpp  370 0x7fee2657dee   
32  Qtilities::CoreGui::ObserverWidget::`vbase destructor'  QtilitiesCoreGuid_1_4       0x7fee26858b3   
33  Qtilities::CoreGui::ObserverWidget::`scalar deleting destructor'    QtilitiesExtensionSystemd_1_4       0x7fee0fb54b8   
34  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
35  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
36  QWidget::`scalar deleting destructor'   QtilitiesExtensionSystemd_1_4       0x7fee0fbb2a8   
37  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
38  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
39  QWidget::`scalar deleting destructor'   QtilitiesExtensionSystemd_1_4       0x7fee0fbb2a8   
40  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
41  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
42  QFrame::~QFrame qframe.cpp  219 0x58473372  
43  QStackedWidget::~QStackedWidget qstackedwidget.cpp  151 0x585134e2  
44  QStackedWidget::`vector deleting destructor'    Qt5Widgetsd     0x58513af8  
45  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
46  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
47  QTabWidget::~QTabWidget qtabwidget.cpp  367 0x58526672  
48  QTabWidget::`scalar deleting destructor'    QtilitiesExtensionSystemd_1_4       0x7fee0fbb208   
49  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
50  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
51  Qtilities::ExtensionSystem::ExtensionSystemConfig::~ExtensionSystemConfig   extensionsystemconfig.cpp   33  0x7fee0fb8fb3   
52  Qtilities::ExtensionSystem::ExtensionSystemConfig::`vbase destructor'   QtilitiesExtensionSystemd_1_4       0x7fee0fbaf63   
53  Qtilities::ExtensionSystem::ExtensionSystemConfig::`scalar deleting destructor' QtilitiesExtensionSystemd_1_4       0x7fee0fbb027   
54  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
55  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
56  QFrame::~QFrame qframe.cpp  219 0x58473372  
57  QStackedWidget::~QStackedWidget qstackedwidget.cpp  151 0x585134e2  
58  QStackedWidget::`vector deleting destructor'    Qt5Widgetsd     0x58513af8  
59  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
60  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
61  QTabWidget::~QTabWidget qtabwidget.cpp  367 0x58526672  
62  QTabWidget::`scalar deleting destructor'    QtilitiesCoreGuid_1_4       0x7fee26db538   
63  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
64  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
65  Qtilities::CoreGui::GroupedConfigPage::~GroupedConfigPage   groupedconfigpage.cpp   55  0x7fee279f272   
66  Qtilities::CoreGui::GroupedConfigPage::`vbase destructor'   QtilitiesCoreGuid_1_4       0x7fee270f3a3   
67  Qtilities::CoreGui::GroupedConfigPage::`vector deleting destructor' QtilitiesCoreGuid_1_4       0x7fee27a0df8   
68  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
69  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
70  QFrame::~QFrame qframe.cpp  219 0x58473372  
71  QFrame::`scalar deleting destructor'    QtilitiesCoreGuid_1_4       0x7fee2695fd8   
72  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
73  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
74  QWidget::`scalar deleting destructor'   QtilitiesCoreGuid_1_4       0x7fee2686648   
75  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
76  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
77  QFrame::~QFrame qframe.cpp  219 0x58473372  
78  QSplitter::~QSplitter   qsplitter.cpp   974 0x5850ae95  
79  QSplitter::`scalar deleting destructor' QtilitiesCoreGuid_1_4       0x7fee270f608   
80  QObjectPrivate::deleteChildren  qobject.cpp 1835    0x57b88716  
81  QWidget::~QWidget   qwidget.cpp 1488    0x58284e93  
82  Qtilities::CoreGui::ConfigurationWidget::~ConfigurationWidget   configurationwidget.cpp 86  0x7fee27082d4   
83  main    main.cpp    238 0x13f895796 
84  WinMain qtmain_win.cpp  131 0x13f89fb91 
85  __tmainCRTStartup   crtexe.c    528 0x13f89f3c0 
86  WinMainCRTStartup   crtexe.c    377 0x13f89f14e 
87  BaseThreadInitThunk kernel32        0x76f7652d  
88  RtlUserThreadStart  ntdll       0x770ac541  
JPNaude commented 10 years ago

Hi, thanks for the report.

This is a duplicate of https://github.com/JPNaude/Qtilities/issues/100. I will close this issue since its a duplicate.

The crash is complex and I've spent a few hours trying to fix it, however since its in the debug plugin which is really only for debugging, it should not happen in release code.

I'll try to spend some more time on it.