On 03/06/2010 09:20 AM, rgheck wrote:
On 03/06/2010 04:19 AM, Abdelrazak Younes wrote:
On 06/03/2010 01:13, rgheck wrote:
I'm convinced now that this is wrong. And I just don't understand
this crash. Why does this call:
QModelIndexList indices = tocTV->model()->match(
tocTV->model()->index(0, 0),
Qt::DisplayRole, "*", -1,
Qt::MatchFlags(Qt::MatchWildcard|Qt::MatchRecursive));
lead to a segfault?
Maybe tocTV->model() is equal to zero?
It is zero.
I'm also seeing "type not found" errors printed to the screen, from
lines 267 and 371 in TocModel.cpp, just before the crash.
So, if I add "if (!tocTV->model()) return;" to the beginning of
TocWidget::filterContents(), then that crash goes away. Then I see the
"type note found" errors constantly.
And with that crash gone, I get a different one, which looks similar to
the one in branch. See line 37, etc, below. The currentIndexChanged
signal is again the problem, but this time because it tries to reset the
focus to the main work area, and we are not ready to do that yet.
So that's really the cause of all of this, it seems to me: Qt 4.6.x is
emitting that signal when we reset the model for the combo box. Perhaps
we could disable signals for that box, but I guess that probably hides
the real bug.
I wonder if the real problem is that we are entering updateBuffer (the
old updateLabels) before we really should.
rh
====
0 raise raise.c 64 0x0000003881e326c5
1 abort abort.c 92 0x0000003881e33ea5
2 lyx::lyx_exit LyX.cpp 216 0x0000000000594fb3
3 boost::assertion_failed boost.cpp 47 0x000000000046fb3d
4 lyx::doAssert lassert.cpp 23 0x0000000000bd1972
5 lyx::Paragraph::getFontSettings Paragraph.cpp 1406
0x00000000005f67e2
6 lyx::Bidi::computeTables Bidi.cpp 113 0x000000000069a085
7 lyx::TextMetrics::cursorX TextMetrics.cpp 1645
0x000000000065d2d7
8 lyx::BufferView::coordOffset BufferView.cpp 2548
0x00000000006a6957
9 lyx::BufferView::getPos BufferView.cpp 2570
0x00000000006a69dd
10 lyx::BufferView::cursorPosAndHeight BufferView.cpp 2593
0x00000000006a6a99
11 lyx::frontend::GuiWorkArea::showCursor GuiWorkArea.cpp
564 0x0000000000984077
12 lyx::frontend::GuiWorkArea::startBlinkingCursor
GuiWorkArea.cpp 400 0x00000000009849af
13 lyx::frontend::GuiWorkArea::focusInEvent GuiWorkArea.cpp
708 0x0000000000984a80
14 QWidget::event qwidget.cpp 8107 0x0000003a4cbf53d2
15 QFrame::event qframe.cpp 557 0x0000003a4cf70646
16 QAbstractScrollArea::event qabstractscrollarea.cpp 989
0x0000003a4cfef5eb
17 lyx::frontend::GuiWorkArea::event GuiWorkArea.cpp 658
0x0000000000985268
18 QApplicationPrivate::notify_helper qapplication.cpp 4300
0x0000003a4cbaa9dc
19 QApplication::notify qapplication.cpp 4183
0x0000003a4cbb0aab
20 lyx::frontend::GuiApplication::notify GuiApplication.cpp
2124 0x0000000000939b8b
21 QCoreApplication::notifyInternal qcoreapplication.cpp 704
0x0000003a4c55774c
22 QApplicationPrivate::setFocusWidget qapplication.cpp 2137
0x0000003a4cbaf7f5
23 QWidget::setFocus qwidget.cpp 6135 0x0000003a4cbf0b91
24 setFocus qwidget.h 420 0x000000000096380f
25 lyx::frontend::GuiView::focusInEvent GuiView.cpp 620
0x000000000096380f
26 QWidget::event qwidget.cpp 8107 0x0000003a4cbf53d2
27 QMainWindow::event qmainwindow.cpp 1433 0x0000003a4cf8996b
28 lyx::frontend::GuiView::event GuiView.cpp 972
0x0000000000969617
29 QApplicationPrivate::notify_helper qapplication.cpp 4300
0x0000003a4cbaa9dc
30 QApplication::notify qapplication.cpp 4183
0x0000003a4cbb0aab
31 lyx::frontend::GuiApplication::notify GuiApplication.cpp
2124 0x0000000000939b8b
32 QCoreApplication::notifyInternal qcoreapplication.cpp 704
0x0000003a4c55774c
33 QApplicationPrivate::setFocusWidget qapplication.cpp 2137
0x0000003a4cbaf7f5
34 QWidget::setFocus qwidget.cpp 6135 0x0000003a4cbf0b91
35 setFocus qwidget.h 420 0x000000000095de3a
36 lyx::frontend::GuiView::setFocus GuiView.cpp 609
0x000000000095de3a
37 lyx::frontend::TocWidget::on_typeCO_currentIndexChanged
TocWidget.cpp 318 0x0000000000b6c6c8
38 lyx::frontend::TocWidget::qt_metacall moc_TocWidget.cpp
109 0x0000000000b6c804
39 QMetaObject::activate qobject.cpp 3293 0x0000003a4c56a2af
40 QComboBox::currentIndexChanged moc_qcombobox.cpp 302
0x0000003a4cf43201
41 QComboBoxPrivate::_q_emitCurrentIndexChanged qcombobox.cpp
1235 0x0000003a4cf4488c
42 QComboBoxPrivate::_q_modelReset qcombobox.cpp 196
0x0000003a4cf477ed
43 QComboBox::qt_metacall moc_qcombobox.cpp 202
0x0000003a4cf4c00f
44 QMetaObject::activate qobject.cpp 3293 0x0000003a4c56a2af
45 QAbstractItemModel::endResetModel qabstractitemmodel.cpp
2839 0x0000003a4c550146
46 QSortFilterProxyModelPrivate::_q_sourceReset
qsortfilterproxymodel.cpp 1191 0x0000003a4d10727d
47 QSortFilterProxyModel::qt_metacall
moc_qsortfilterproxymodel.cpp 131 0x0000003a4d109189
48 QMetaObject::activate qobject.cpp 3293 0x0000003a4c56a2af
49 QAbstractItemModel::reset qabstractitemmodel.cpp 2797
0x0000003a4c55033e
50 lyx::frontend::TocTypeModel::reset TocModel.cpp 50
0x00000000009c1413
51 lyx::frontend::TocModels::reset TocModel.cpp 363
0x00000000009c44da
52 lyx::frontend::GuiView::structureChanged GuiView.cpp 1259
0x00000000009635b5
53 lyx::Buffer::structureChanged Buffer.cpp 2994
0x000000000046fce4
54 lyx::Buffer::updateBuffer Buffer.cpp 3622 0x000000000048e6d8
55 updateBuffer Buffer.h 548 0x0000000000629ab1
56 lyx::Text::breakParagraph Text.cpp 720 0x0000000000629ab1
57 lyx::Text::dispatch Text3.cpp 994 0x000000000063c69f
58 lyx::InsetText::doDispatch InsetText.cpp 289
0x0000000000904023
59 lyx::Inset::dispatch Inset.cpp 288 0x000000000080b9a9
60 lyx::Cursor::dispatch Cursor.cpp 364 0x00000000006d9250
61 lyx::frontend::GuiApplication::dispatch GuiApplication.cpp
1601 0x0000000000947306
62 lyx::frontend::GuiApplication::dispatch GuiApplication.cpp
1068 0x000000000093bffb
63 lyx::dispatch LyX.cpp 1155 0x0000000000594d24
64 lyx::frontend::GuiApplication::processKeySym
GuiApplication.cpp 1761 0x0000000000940dea
65 lyx::frontend::GuiWorkArea::processKeySym GuiWorkArea.cpp
461 0x0000000000984caf
66 lyx::frontend::GuiWorkArea::keyPressEvent GuiWorkArea.cpp
922 0x00000000009881c8
67 QWidget::event qwidget.cpp 8033 0x0000003a4cbf57e6
68 QFrame::event qframe.cpp 557 0x0000003a4cf70646
69 QAbstractScrollArea::event qabstractscrollarea.cpp 989
0x0000003a4cfef5eb
70 lyx::frontend::GuiWorkArea::event GuiWorkArea.cpp 658
0x0000000000985268
71 QApplicationPrivate::notify_helper qapplication.cpp 4300
0x0000003a4cbaa9dc
72 QApplication::notify qapplication.cpp 3763
0x0000003a4cbb2253
73 lyx::frontend::GuiApplication::notify GuiApplication.cpp
2124 0x0000000000939b8b
74 QCoreApplication::notifyInternal qcoreapplication.cpp 704
0x0000003a4c55774c
75 QKeyMapper::sendKeyEvent qkeymapper_x11.cpp 1861
0x0000003a4cc4490a
76 QKeyMapperPrivate::translateKeyEvent qkeymapper_x11.cpp
1831 0x0000003a4cc46d20
77 QApplication::x11ProcessEvent qapplication_x11.cpp 3394
0x0000003a4cc20ee4
78 x11EventSourceDispatch qguieventdispatcher_glib.cpp 146
0x0000003a4cc49d52
79 g_main_dispatch gmain.c 1960 0x000000388463920e
80 IA__g_main_context_dispatch gmain.c 2513 0x000000388463920e
81 g_main_context_iterate gmain.c 2591 0x000000388463cbf8
82 IA__g_main_context_iteration gmain.c 2654 0x000000388463cd1a
83 QEventDispatcherGlib::processEvents
qeventdispatcher_glib.cpp 412 0x0000003a4c57d063
84 QGuiEventDispatcherGlib::processEvents
qguieventdispatcher_glib.cpp 204 0x0000003a4cc49a1e
85 QEventLoop::processEvents qeventloop.cpp 149
0x0000003a4c556192
86 QEventLoop::exec qeventloop.cpp 201 0x0000003a4c55645c
87 QCoreApplication::exec qcoreapplication.cpp 981
0x0000003a4c558749
88 lyx::frontend::GuiApplication::exec GuiApplication.cpp
1907 0x0000000000939637
89 lyx::LyX::exec LyX.cpp 360 0x000000000059e810
90 main main.cpp 46 0x000000000043674a
rh