Juergen Spitzmueller wrote:

Helge Hafting wrote:
Crash recipe 1:
1. insert->math panel
2. insert a matrix of default size using the panel
3. select the matrix using the mouse
4. insert delimiters around the matrix
5. Get this crash as you press ok in the delimiter dialog:
MathNestInset::LFUN_MATH_DELIM
action: 104
action: 46
action: 106
MathNestInset::LFUN_MATH_DELIM
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../include/c++/4.0.2/debug/safe_
iterator.h:274: error: attempt to advance a past-the-end iterator 2 steps,
which falls
   outside its valid range.

I don't get the crash (my compiler is probably too old). Can you provide a backtrace?
(Here, inserting insert around a matrix works)
I don't know about  insets in general, I only tested the delimiter inset.
Inserted a 1x3 matrix, marked the matrix only (not the entire
formula) inserted delimiters.  This time, I didn't bother selecting
brackets,just the default big parentheses.  Compiled
with gcc 4.0.2 from debian, backtrace follows:

MathNestInset::LFUN_MATH_DELIM
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../include/c++/4.0.2/debug/safe_iterator.h:274:
error: attempt to advance a past-the-end iterator 1 steps, which falls outside its valid range.

Objects involved in the operation:
iterator @ 0x0xbfd398a0 {
type = N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIP9MathArrayN10__gnu_norm6vectorIS3_SaIS3_EEEEEN15__gnu_debug_def6vectorIS3_S7_EEEE (mutable iterator);
 state = past-the-end;
references sequence with type `N15__gnu_debug_def6vectorI9MathArraySaIS1_EEE' @ 0x0xbfd398a0
}

Program received signal SIGABRT, Aborted.
[Switching to Thread -1223260480 (LWP 9603)]
0xb71bf9e7 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb71bf9e7 in raise () from /lib/tls/libc.so.6
#1  0xb71c131b in abort () from /lib/tls/libc.so.6
#2  0xb733a535 in __gnu_debug::_Error_formatter::_M_error ()
  from /usr/lib/libstdc++.so.6
#3  0x0854a991 in MathGridInset::delRow (this=0x8eb1458, row=4)
   at safe_iterator.h:272
#4  0x08505981 in (anonymous namespace)::delEmptyLastRow ([EMAIL PROTECTED])
   at math_parser.C:186
#5  0x0850a107 in (anonymous namespace)::Parser::parse1 (this=0xbfd3c158,
   [EMAIL PROTECTED], flags=Variable "flags" is not available.
) at math_parser.C:948
#6  0x0850dfb4 in (anonymous namespace)::Parser::parse2 (this=0xbfd3c158,
   [EMAIL PROTECTED], flags=8, mode=InsetBase::MATH_MODE, numbered=false)
   at math_parser.C:644
#7  0x0850b0e5 in (anonymous namespace)::Parser::parse1 (this=0xbfd3c158,
   [EMAIL PROTECTED], flags=Variable "flags" is not available.
) at math_parser.C:1089
#8  0x0850dff1 in (anonymous namespace)::Parser::parse (this=0xbfd3c158,
[EMAIL PROTECTED], flags=0, mode=InsetBase::MATH_MODE) at math_parser.C:636
#9  0x0850e088 in mathed_parse_cell ([EMAIL PROTECTED], [EMAIL PROTECTED])
   at math_parser.C:1366
#10 0x0850e1b5 in mathed_parse_cell ([EMAIL PROTECTED], [EMAIL PROTECTED])
   at math_parser.C:1360
#11 0x08524a37 in asArray ([EMAIL PROTECTED], [EMAIL PROTECTED])
   at math_support.C:693
#12 0x0824fa49 in LCursor::handleNest (this=0x8cd2614, [EMAIL PROTECTED], c=0)
   at cursor.C:865
#13 0x08501df4 in MathNestInset::doDispatch (this=0x8c94220, [EMAIL PROTECTED],
   [EMAIL PROTECTED]) at math_nestinset.C:837
#14 0x08549426 in MathGridInset::doDispatch (this=0x8c94220, [EMAIL PROTECTED],
   [EMAIL PROTECTED]) at math_gridinset.C:1287
#15 0x084df6f4 in MathHullInset::doDispatch (this=0x8c94220, [EMAIL PROTECTED],
   [EMAIL PROTECTED]) at math_hullinset.C:1113
#16 0x08561190 in InsetBase::dispatch (this=0x8c94220, [EMAIL PROTECTED],
   [EMAIL PROTECTED]) at insetbase.C:141
#17 0x08258ee3 in LCursor::dispatch (this=0x8cd2614, [EMAIL PROTECTED])
   at cursor.C:275
#18 0x0832c355 in LyXFunc::dispatch (this=0x8ca2dd8, [EMAIL PROTECTED])
   at lyxfunc.C:1581
#19 0x087c7376 in lyx::frontend::Kernel::dispatch (this=0x0, [EMAIL PROTECTED])
   at Kernel.C:35
#20 0x0882c369 in lyx::frontend::ControlMath::dispatchFunc (this=0x0,
   action=LFUN_MATH_DELIM, [EMAIL PROTECTED]) at ControlMath.C:40
#21 0x0882c3d3 in lyx::frontend::ControlMath::dispatchDelim (this=0x8ea3f50,
   [EMAIL PROTECTED]) at ControlMath.C:80
#22 0x087007f6 in lyx::frontend::QDelimiterDialog::insertClicked (
   this=0x8ea4a78) at QDelimiterDialog.C:104
#23 0x0878bf1e in QDelimiterDialogBase::qt_invoke (this=0x8ea4a78, _id=50,
   _o=0xbfd4bd0c) at QDelimiterDialogBase_moc.C:84
#24 0x0878395d in lyx::frontend::QDelimiterDialog::qt_invoke (this=0x8ea4a78,
   _id=50, _o=0xbfd4bd0c) at QDelimiterDialog_moc.C:96
#25 0xb7a46c5f in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#26 0xb7a47743 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#27 0xb7ddf5ae in QButton::clicked () from /usr/lib/libqt-mt.so.3
#28 0xb7ae47b7 in QButton::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#29 0xb7a81fb6 in QWidget::event () from /usr/lib/libqt-mt.so.3
#30 0xb79dc778 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#31 0xb79dcd4b in QApplication::notify () from /usr/lib/libqt-mt.so.3
#32 0xb796c6d3 in QApplication::sendSpontaneousEvent ()
  from /usr/lib/libqt-mt.so.3
#33 0xb7967b64 in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3 #34 0xb7965e3e in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#35 0xb797f95c in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#36 0xb79f4ea2 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#37 0xb79f4dcb in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#38 0xb79db305 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#39 0x086e5748 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED])
   at lyx_gui.C:248
#40 0x0830c04e in LyX::priv_exec (this=0x8aa8718, [EMAIL PROTECTED],
   argv=0xbfd4d814) at lyx_main.C:282
#41 0x0830c28d in LyX::exec ([EMAIL PROTECTED], argv=0xbfd4d814)
   at lyx_main.C:143
#42 0x08062dfc in main (argc=1, argv=0xbfd4d814) at main.C:47


I hope this helps,
Helge Hafting

Reply via email to