Opened 15 years ago

Closed 15 years ago

#5491 closed defect (fixed)

Crash with undo, mathed and toc dialog.

Reported by: younes Owned by: younes
Priority: high Milestone: 1.6.1
Component: undo/redo Version: 1.6.0
Severity: critical Keywords:
Cc: alexander.ene@…, gf-lyx@…

Description

1) Open attached lyx file.
2) Make sure the outline pane is open
3) enter the formula
4) insert a fraction
5) undo
6) BOOM

The problem is that the dialog tries to find the current item using the
bufferview cursor before it is even cleaned up after the undo.

This is not easy to debug because of an invalid inset pointer, I have trace it
down the following backtrace:

Toc::item(const lyx::DocIterator & dit={...}) Ligne 185 C++
frontend::TocModel::modelIndex(const lyx::DocIterator & dit={...}) Ligne 116 +
0x36 octets C++
frontend::TocModels::currentIndex(const QString & type={...}) Ligne 284 +
0x1f octets C++
frontend::TocWidget::updateView() Ligne 292 + 0x1d octets C++
frontend::TocWidget::init(const QString & str={...}) Ligne 336 C++
frontend::GuiToc::initialiseParams() Ligne 77 + 0x2f octets C++
frontend::GuiView::updateDialog() Ligne 1070 + 0x13 octets C++
frontend::GuiView::structureChanged() Ligne 1055 + 0x54 octets C++
Buffer::structureChanged() Ligne 2177 + 0x15 octets C++
updateLabels(const lyx::Buffer & buf={...}, bool childonly=false) Ligne 525 C++
Undo::Private::textUndoOrRedo(lyx::DocIterator & cur={...}, bool
isUndoOperation=true) Ligne 430 + 0xd octets C++
Undo::textUndo(lyx::DocIterator & cur={...}) Ligne 445 C++
Cursor::textUndo() Ligne 2110 + 0x1d octets C++

The correct solution would be to remove the call to updateView() in
TocWidget::init() but this was introduced to solve another bug IIRC.

Attachments (2)

crash-math-toc.lyx (1.4 KB ) - added by younes 15 years ago.
test case
crash-math-toc.2.lyx (1.4 KB ) - added by younes 15 years ago.
test case

Download all attachments as: .zip

Change History (14)

comment:1 by younes, 15 years ago

* #5490 has been marked as a duplicate of this bug. *

by younes, 15 years ago

Attachment: crash-math-toc.lyx added

test case

by younes, 15 years ago

Attachment: crash-math-toc.2.lyx added

test case

comment:2 by Juergen Spitzmueller, 15 years ago

Milestone: 1.6.1

comment:3 by Juergen Spitzmueller, 15 years ago

Keywords: fixedintrunk added

comment:4 by Juergen Spitzmueller, 15 years ago

Keywords: fixedinbranch added

also fixedinbranch actually. Both the 1.5.x branch (which didn't have this bug)
and the not yet existing 1.6.x branch.

comment:5 by Juergen Spitzmueller, 15 years ago

Cc: gf-lyx@… added

comment:6 by Juergen Spitzmueller, 15 years ago

* #5500 has been marked as a duplicate of this bug. *

comment:7 by alexander.ene@…, 15 years ago

Some additional info, as I previously reported this as "5531":

  • The crash is not specific to particular lyx files or the eqn. environment!

It's not just fractions in equation mode that cause the crash. I tried creating
different LyX environments (ERT, math editor) in several chapters of my thesis -
some of them simply text files with section/chapter headings, nothing fancier.
The crash occurs when Undo-ing after just creating an _empty_ ERT, equation or
fraction within an equation. You get the idea, empty environment with no
arguments in it: check whether removing a function with no argument causes this
behavior.

One type of files which did not cause a crash were empty files (i.e. Ctrl+Alt+N
to create an eqn. and then undo twice to get rid of it). Probably empty files
don't have an outline, that's why!

I normally have 'outline' and 'view source' open, and I couldn't recreate the
bug on a different computer until I had the outline open in there too. See
transcript below (really no error info in the output this time!):

C:/Documents and Settings/Alexene/My Documents/Thesis

Backups/101008/Cap2.lyx.emergency

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions
in Help->Introduction and send us a bug report, if necessary. Thanks !
Bye.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Completed

comment:8 by younes, 15 years ago

To Alexander: yes you are right, this is not mathed specific. But it is
nevertheless fixed.

comment:9 by Juergen Spitzmueller, 15 years ago

Cc: alexander.ene@… added

comment:10 by Juergen Spitzmueller, 15 years ago

* #5531 has been marked as a duplicate of this bug. *

comment:11 by Juergen Spitzmueller, 15 years ago

Keywords: fixedinbranch removed
Resolution: fixed
Status: newclosed

LyX 1.6.1 is out.

comment:12 by Vincent van Ravesteijn, 10 years ago

Keywords: fixedintrunk removed
Note: See TracTickets for help on using tickets.