Crash with the new TOC widget

2007-06-09 Thread cmiramon
Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools - outline
3) Document - Next cross-reference
4) Click in the Toc Widget on the second section
5) Boum with this (rather unhelpful message)

/usr/include/c++/4.1.3/debug/safe_iterator.h:130:error: attempt to copy-
construct an iterator from a singular iterator.

Objects involved in the operation:
iterator this @ 0x0xaf918fe0 {
type =
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKN3lyx7TocItemEN10__gnu_norm6vectorIS4_SaIS4_EN15__gnu_debug_def6vectorIS4_S9_
(constant iterator);
  state = singular;
}
iterator other @ 0x0x92abed0 {
type =
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKN3lyx7TocItemEN10__gnu_norm6vectorIS4_SaIS4_EN15__gnu_debug_def6vectorIS4_S9_
(constant iterator);
  state = singular;
}

Cheers,
Charles



Re: Crash with the new TOC widget

2007-06-09 Thread Jürgen Spitzmüller
[EMAIL PROTECTED] wrote:
 1) Open User Guide
 2) Tools - outline
 3) Document - Next cross-reference
 4) Click in the Toc Widget on the second section
 5) Boum

Confirmed (backtrace below).

Please file a bug report.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47150429772400 (LWP 14733)]
0x005b9359 in lyx::ParConstIterator::operator- (this=0x18b0a48) at 
CursorSlice.h:81
81  pit_type pit() const { return pit_; }
(gdb) bt
#0  0x005b9359 in lyx::ParConstIterator::operator- (this=0x18b0a48) 
at CursorSlice.h:81
#1  0x0060a4ff in lyx::TocItem::id (this=0x18b0a48) at 
TocBackend.cpp:80
#2  0x0092f1a2 in lyx::frontend::ControlToc::goTo (this=0x1b09bd0, 
[EMAIL PROTECTED]) at ControlToc.cpp:83
#3  0x008d270c in lyx::frontend::QToc::goTo (this=0x1b09bc0, 
type=value optimized out, [EMAIL PROTECTED])
at QToc.cpp:110
#4  0x008cdf00 in lyx::frontend::TocWidget::selectionChanged 
(this=0x1b101b0, [EMAIL PROTECTED])
at TocWidget.cpp:88
#5  0x008ce9fc in lyx::frontend::TocWidget::qt_metacall 
(this=0x1b101b0, _c=QMetaObject::InvokeMetaMethod,
_id=104, _a=0x7fff9eecf560) at TocWidget_moc.cpp:87
#6  0x2ae20df5ebcb in QMetaObject::activate (sender=0x1460e30, 
from_signal_index=5, to_signal_index=5, argv=0x1)
at kernel/qobject.cpp:2940
#7  0x2ae20c2eb1fa in QItemSelectionModel::currentChanged (this=0x18b0a48, 
_t1=value optimized out,
_t2=value optimized out) 
at .moc/release-shared/moc_qitemselectionmodel.cpp:150
#8  0x2ae20c2eb534 in QItemSelectionModel::setCurrentIndex 
(this=0x1460e30, index=value optimized out,
[EMAIL PROTECTED]) at itemviews/qitemselectionmodel.cpp:1057
#9  0x2ae20c2b57d1 in QAbstractItemView::mousePressEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qabstractitemview.cpp:1306
#10 0x2ae20c2dfc2e in QTreeView::mousePressEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qtreeview.cpp:1347
#11 0x2ae20bfa356a in QWidget::event (this=0x1b100f0, 
event=0x7fff9eed0040) at kernel/qwidget.cpp:5714
#12 0x2ae20c1f4409 in QFrame::event (this=0x18b0a48, e=0x18b0a48) at 
widgets/qframe.cpp:633
#13 0x2ae20c25bc8a in QAbstractScrollArea::viewportEvent (this=0x18b0a48, 
e=0x18b0a48)
at widgets/qabstractscrollarea.cpp:854
---Type return to continue, or q return to quit---
#14 0x2ae20c2b0d41 in QAbstractItemView::viewportEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qabstractitemview.cpp:1270
#15 0x2ae20c25df98 in QAbstractScrollAreaFilter::eventFilter (this=value 
optimized out, o=value optimized out,
e=0x1b200e0) at widgets/qabstractscrollarea_p.h:78
#16 0x2ae20bf5eb73 in QApplicationPrivate::notify_helper (this=value 
optimized out, receiver=0x1b12140,
e=0x7fff9eed0040) at kernel/qapplication.cpp:3431
#17 0x2ae20bf614a1 in QApplication::notify (this=0xe4e4d0, 
receiver=0x1b12140, e=0x7fff9eed0040)
at kernel/qapplication.cpp:3138
#18 0x007d8668 in lyx::frontend::GuiApplication::notify 
(this=0x18b0a48, receiver=0x18b0a48, event=0x1b200e0)
at GuiApplication.cpp:237
#19 0x2ae20bfb3406 in QETWidget::translateMouseEvent (this=0x1b12140, 
event=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:186
#20 0x2ae20bfb22da in QApplication::x11ProcessEvent (this=0x136, 
event=0x7fff9eed0510)
at kernel/qapplication_x11.cpp:2853
#21 0x2ae20bfd3ca5 in x11EventSourceDispatch (s=0xe564a0, callback=0, 
user_data=0x0)
at kernel/qguieventdispatcher_glib.cpp:122
#22 0x2ae20e425f94 in g_main_context_dispatch () 
from /opt/gnome/lib64/libglib-2.0.so.0
#23 0x2ae20e428dc5 in g_main_context_prepare () 
from /opt/gnome/lib64/libglib-2.0.so.0
#24 0x2ae20e4292ee in g_main_context_iteration () 
from /opt/gnome/lib64/libglib-2.0.so.0
#25 0x2ae20df6f430 in QEventDispatcherGlib::processEvents (this=0xe529b0, 
flags=value optimized out)
at kernel/qeventdispatcher_glib.cpp:366
#26 0x2ae20bfd3abf in QGuiEventDispatcherGlib::processEvents 
(this=0x18b0a48, flags=value optimized out)
at kernel/qguieventdispatcher_glib.cpp:178
---Type return to continue, or q return to quit---
#27 0x2ae20df4dda8 in QEventLoop::processEvents (this=value optimized 
out, flags=value optimized out)
at kernel/qeventloop.cpp:126
#28 0x2ae20df4deb9 in QEventLoop::exec (this=0x7fff9eed0890, 
[EMAIL PROTECTED]) at kernel/qeventloop.cpp:172
#29 0x2ae20df50080 in QCoreApplication::exec () at 
kernel/qcoreapplication.cpp:730
#30 0x007d85d9 in lyx::frontend::GuiApplication::exec (this=value 
optimized out) at GuiApplication.cpp:158
#31 0x00550740 in lyx::LyX::exec (this=0x7fff9eed09c0, argc=value 
optimized out, argv=value optimized out)
at LyX.cpp:463
#32 0x004288ff in main (argc=1, argv=0x7fff9eed0ad8) at main.cpp:48


Jürgen


Re: Crash with the new TOC widget

2007-06-09 Thread cmiramon
Done

#3843



Re: Crash with the new TOC widget

2007-06-09 Thread Jürgen Spitzmüller
[EMAIL PROTECTED] wrote:
 Done

Thanks. I confirmed it and targetted it to 1.5.0.

Jürgen


Re: Crash with the new TOC widget

2007-06-09 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools - outline
3) Document - Next cross-reference


Here (Win/MSVC) it crashes at point 3 with this backtrace:


 	lyx-qt4.exe!lyx::frontend::TocModel::modelIndex(const 
std::_Vector_const_iteratorlyx::TocItem,std::allocatorlyx::TocItem  
 it={par_it_={...} depth_=3 str_={...} })  Line 57 + 0x13 bytes	C++
 	lyx-qt4.exe!lyx::frontend::QToc::getCurrentIndex(int type=2)  Line 90 
+ 0x44 bytes	C++

lyx-qt4.exe!lyx::frontend::TocWidget::update()  Line 235 + 0x25 bytes   
C++

lyx-qt4.exe!lyx::frontend::DockViewlyx::frontend::QToc,lyx::frontend::TocWidget::update() 
 Line 62	C++
 	lyx-qt4.exe!lyx::frontend::Dialog::checkStatus()  Line 192 + 0x1a 
bytes	C++

lyx-qt4.exe!lyx::Dialogs::checkStatus()  Line 256   C++
lyx-qt4.exe!lyx::LyXView::updateToolbars()  Line 347C++
 	lyx-qt4.exe!lyx::LyXFunc::dispatch(const lyx::FuncRequest  
cmd={...})  Line 1817	C++
 	lyx-qt4.exe!lyx::dispatch(const lyx::FuncRequest  action={...}) 
Line 1464	C++
 	lyx-qt4.exe!lyx::LyXView::dispatch(const lyx::FuncRequest  
cmd={...})  Line 446 + 0x9 bytes	C++

lyx-qt4.exe!lyx::frontend::Action::action()  Line 91C++



Re: Crash with the new TOC widget

2007-06-09 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools - outline
3) Document - Next cross-reference
4) Click in the Toc Widget on the second section
5) Boum with this (rather unhelpful message)

/usr/include/c++/4.1.3/debug/safe_iterator.h:130:error: attempt to copy-
construct an iterator from a singular iterator.


The problem has been introduced at revision 18693

URL: http://www.lyx.org/trac/changeset/18693
Log:
Update Toc when navigation menu is trigged.

This is fixed now.

Abdel.


Author: younes
Date: Sun Jun 10 00:21:21 2007
New Revision: 18730

URL: http://www.lyx.org/trac/changeset/18730
Log:
Fix missing signal emission following revision 18693.

Modified:
lyx-devel/trunk/src/MenuBackend.cpp

Modified: lyx-devel/trunk/src/MenuBackend.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/MenuBackend.cpp?rev=18730

==
--- lyx-devel/trunk/src/MenuBackend.cpp (original)
+++ lyx-devel/trunk/src/MenuBackend.cpp Sun Jun 10 00:21:21 2007
@@ -705,7 +705,9 @@
return;
}

-   const_castBuffer*(buf)-tocBackend().update();
+   Buffer* cbuf = const_castBuffer*(buf);
+   cbuf-tocBackend().update();
+   cbuf-structureChanged();

// Add an entry for the master doc if this is a child doc
Buffer const * const master = buf-getMasterBuffer();





Crash with the new TOC widget

2007-06-09 Thread cmiramon
Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools -> outline
3) Document -> Next cross-reference
4) Click in the Toc Widget on the second section
5) Boum with this (rather unhelpful message)

/usr/include/c++/4.1.3/debug/safe_iterator.h:130:error: attempt to copy-
construct an iterator from a singular iterator.

Objects involved in the operation:
iterator "this" @ 0x0xaf918fe0 {
type =
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKN3lyx7TocItemEN10__gnu_norm6vectorIS4_SaIS4_EN15__gnu_debug_def6vectorIS4_S9_
(constant iterator);
  state = singular;
}
iterator "other" @ 0x0x92abed0 {
type =
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKN3lyx7TocItemEN10__gnu_norm6vectorIS4_SaIS4_EN15__gnu_debug_def6vectorIS4_S9_
(constant iterator);
  state = singular;
}

Cheers,
Charles



Re: Crash with the new TOC widget

2007-06-09 Thread Jürgen Spitzmüller
[EMAIL PROTECTED] wrote:
> 1) Open User Guide
> 2) Tools -> outline
> 3) Document -> Next cross-reference
> 4) Click in the Toc Widget on the second section
> 5) Boum

Confirmed (backtrace below).

Please file a bug report.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47150429772400 (LWP 14733)]
0x005b9359 in lyx::ParConstIterator::operator-> (this=0x18b0a48) at 
CursorSlice.h:81
81  pit_type pit() const { return pit_; }
(gdb) bt
#0  0x005b9359 in lyx::ParConstIterator::operator-> (this=0x18b0a48) 
at CursorSlice.h:81
#1  0x0060a4ff in lyx::TocItem::id (this=0x18b0a48) at 
TocBackend.cpp:80
#2  0x0092f1a2 in lyx::frontend::ControlToc::goTo (this=0x1b09bd0, 
[EMAIL PROTECTED]) at ControlToc.cpp:83
#3  0x008d270c in lyx::frontend::QToc::goTo (this=0x1b09bc0, 
type=, [EMAIL PROTECTED])
at QToc.cpp:110
#4  0x008cdf00 in lyx::frontend::TocWidget::selectionChanged 
(this=0x1b101b0, [EMAIL PROTECTED])
at TocWidget.cpp:88
#5  0x008ce9fc in lyx::frontend::TocWidget::qt_metacall 
(this=0x1b101b0, _c=QMetaObject::InvokeMetaMethod,
_id=104, _a=0x7fff9eecf560) at TocWidget_moc.cpp:87
#6  0x2ae20df5ebcb in QMetaObject::activate (sender=0x1460e30, 
from_signal_index=5, to_signal_index=5, argv=0x1)
at kernel/qobject.cpp:2940
#7  0x2ae20c2eb1fa in QItemSelectionModel::currentChanged (this=0x18b0a48, 
_t1=,
_t2=) 
at .moc/release-shared/moc_qitemselectionmodel.cpp:150
#8  0x2ae20c2eb534 in QItemSelectionModel::setCurrentIndex 
(this=0x1460e30, index=,
[EMAIL PROTECTED]) at itemviews/qitemselectionmodel.cpp:1057
#9  0x2ae20c2b57d1 in QAbstractItemView::mousePressEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qabstractitemview.cpp:1306
#10 0x2ae20c2dfc2e in QTreeView::mousePressEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qtreeview.cpp:1347
#11 0x2ae20bfa356a in QWidget::event (this=0x1b100f0, 
event=0x7fff9eed0040) at kernel/qwidget.cpp:5714
#12 0x2ae20c1f4409 in QFrame::event (this=0x18b0a48, e=0x18b0a48) at 
widgets/qframe.cpp:633
#13 0x2ae20c25bc8a in QAbstractScrollArea::viewportEvent (this=0x18b0a48, 
e=0x18b0a48)
at widgets/qabstractscrollarea.cpp:854
---Type  to continue, or q  to quit---
#14 0x2ae20c2b0d41 in QAbstractItemView::viewportEvent (this=0x1b100f0, 
event=0x7fff9eed0040)
at itemviews/qabstractitemview.cpp:1270
#15 0x2ae20c25df98 in QAbstractScrollAreaFilter::eventFilter (this=, o=,
e=0x1b200e0) at widgets/qabstractscrollarea_p.h:78
#16 0x2ae20bf5eb73 in QApplicationPrivate::notify_helper (this=, receiver=0x1b12140,
e=0x7fff9eed0040) at kernel/qapplication.cpp:3431
#17 0x2ae20bf614a1 in QApplication::notify (this=0xe4e4d0, 
receiver=0x1b12140, e=0x7fff9eed0040)
at kernel/qapplication.cpp:3138
#18 0x007d8668 in lyx::frontend::GuiApplication::notify 
(this=0x18b0a48, receiver=0x18b0a48, event=0x1b200e0)
at GuiApplication.cpp:237
#19 0x2ae20bfb3406 in QETWidget::translateMouseEvent (this=0x1b12140, 
event=)
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:186
#20 0x2ae20bfb22da in QApplication::x11ProcessEvent (this=0x136, 
event=0x7fff9eed0510)
at kernel/qapplication_x11.cpp:2853
#21 0x2ae20bfd3ca5 in x11EventSourceDispatch (s=0xe564a0, callback=0, 
user_data=0x0)
at kernel/qguieventdispatcher_glib.cpp:122
#22 0x2ae20e425f94 in g_main_context_dispatch () 
from /opt/gnome/lib64/libglib-2.0.so.0
#23 0x2ae20e428dc5 in g_main_context_prepare () 
from /opt/gnome/lib64/libglib-2.0.so.0
#24 0x2ae20e4292ee in g_main_context_iteration () 
from /opt/gnome/lib64/libglib-2.0.so.0
#25 0x2ae20df6f430 in QEventDispatcherGlib::processEvents (this=0xe529b0, 
flags=)
at kernel/qeventdispatcher_glib.cpp:366
#26 0x2ae20bfd3abf in QGuiEventDispatcherGlib::processEvents 
(this=0x18b0a48, flags=)
at kernel/qguieventdispatcher_glib.cpp:178
---Type  to continue, or q  to quit---
#27 0x2ae20df4dda8 in QEventLoop::processEvents (this=, flags=)
at kernel/qeventloop.cpp:126
#28 0x2ae20df4deb9 in QEventLoop::exec (this=0x7fff9eed0890, 
[EMAIL PROTECTED]) at kernel/qeventloop.cpp:172
#29 0x2ae20df50080 in QCoreApplication::exec () at 
kernel/qcoreapplication.cpp:730
#30 0x007d85d9 in lyx::frontend::GuiApplication::exec (this=) at GuiApplication.cpp:158
#31 0x00550740 in lyx::LyX::exec (this=0x7fff9eed09c0, argc=, argv=)
at LyX.cpp:463
#32 0x004288ff in main (argc=1, argv=0x7fff9eed0ad8) at main.cpp:48


Jürgen


Re: Crash with the new TOC widget

2007-06-09 Thread cmiramon
Done

#3843



Re: Crash with the new TOC widget

2007-06-09 Thread Jürgen Spitzmüller
[EMAIL PROTECTED] wrote:
> Done

Thanks. I confirmed it and targetted it to 1.5.0.

Jürgen


Re: Crash with the new TOC widget

2007-06-09 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools -> outline
3) Document -> Next cross-reference


Here (Win/MSVC) it crashes at point 3 with this backtrace:


 	lyx-qt4.exe!lyx::frontend::TocModel::modelIndex(const 
std::_Vector_const_iterator 
& it={par_it_={...} depth_=3 str_={...} })  Line 57 + 0x13 bytes	C++
 	lyx-qt4.exe!lyx::frontend::QToc::getCurrentIndex(int type=2)  Line 90 
+ 0x44 bytes	C++

lyx-qt4.exe!lyx::frontend::TocWidget::update()  Line 235 + 0x25 bytes   
C++

lyx-qt4.exe!lyx::frontend::DockView::update() 
 Line 62	C++
 	lyx-qt4.exe!lyx::frontend::Dialog::checkStatus()  Line 192 + 0x1a 
bytes	C++

lyx-qt4.exe!lyx::Dialogs::checkStatus()  Line 256   C++
lyx-qt4.exe!lyx::LyXView::updateToolbars()  Line 347C++
 	lyx-qt4.exe!lyx::LyXFunc::dispatch(const lyx::FuncRequest & 
cmd={...})  Line 1817	C++
 	lyx-qt4.exe!lyx::dispatch(const lyx::FuncRequest & action={...}) 
Line 1464	C++
 	lyx-qt4.exe!lyx::LyXView::dispatch(const lyx::FuncRequest & 
cmd={...})  Line 446 + 0x9 bytes	C++

lyx-qt4.exe!lyx::frontend::Action::action()  Line 91C++



Re: Crash with the new TOC widget

2007-06-09 Thread Abdelrazak Younes

[EMAIL PROTECTED] wrote:

Hello,

I've compiled LyX 5.0 svn.

1) Open User Guide
2) Tools -> outline
3) Document -> Next cross-reference
4) Click in the Toc Widget on the second section
5) Boum with this (rather unhelpful message)

/usr/include/c++/4.1.3/debug/safe_iterator.h:130:error: attempt to copy-
construct an iterator from a singular iterator.


The problem has been introduced at revision 18693

URL: http://www.lyx.org/trac/changeset/18693
Log:
Update Toc when navigation menu is trigged.

This is fixed now.

Abdel.


Author: younes
Date: Sun Jun 10 00:21:21 2007
New Revision: 18730

URL: http://www.lyx.org/trac/changeset/18730
Log:
Fix missing signal emission following revision 18693.

Modified:
lyx-devel/trunk/src/MenuBackend.cpp

Modified: lyx-devel/trunk/src/MenuBackend.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/MenuBackend.cpp?rev=18730

==
--- lyx-devel/trunk/src/MenuBackend.cpp (original)
+++ lyx-devel/trunk/src/MenuBackend.cpp Sun Jun 10 00:21:21 2007
@@ -705,7 +705,9 @@
return;
}

-   const_cast(buf)->tocBackend().update();
+   Buffer* cbuf = const_cast(buf);
+   cbuf->tocBackend().update();
+   cbuf->structureChanged();

// Add an entry for the master doc if this is a child doc
Buffer const * const master = buf->getMasterBuffer();