Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Kayvan" == Kayvan A Sylvan <[EMAIL PROTECTED]> writes:
| 
| >> I think that I found a way to recreate this bug (or maybe it a
| >> different bug) Open the attached file, put the cursor before the
| >> letter X, and then hold backspace, and LyX will crash (it doesn't
| >> happens every time, but often enough)
| 
| Kayvan> Yup. I managed to recreate this as well.
| 
| Kayvan> Same basic backtrace:
| 
| To add another bit of information, here is what purify says. It seems
| that the problem is in the mechanism which deletes empty paragraph.
| Lars, maybe this has to do with your double-space patch?

By now you should have had time to read my comments in text.C.

// This is the comments that some of the warnings below refers to.
// There are some issues in this file and I don't think they are
// really related to the FIX_DOUBLE_SPACE patch. I'd rather think that
// this is a problem that has been here almost from day one and that a
// larger userbase with differenct access patters triggers the bad
// behaviour. (segfaults.) What I think happen is: In several places
// we store the paragraph in the current cursor and then moves the
// cursor. This movement of the cursor will delete paragraph at the
// old position if it is now empty. This will make the temporary
// pointer to the old cursor paragraph invalid and dangerous to use.
// And is some cases this will trigger a segfault. I have marked some
// of the cases where this happens with a warning, but I am sure there
// are others in this file and in text2.C. There is also a note in
// Delete() that you should read. In Delete I store the paragraph->id
// instead of a pointer to the paragraph. I am pretty sure this faulty
// use of temporary pointers to paragraphs that might have gotten
// invalidated (through a cursor movement) before they are used, are
// the cause of the strange crashes we get reported often.
//                                            
// It is very tiresom to change this code, especially when it is as
// hard to read as it is. Help to fix all the cases where this is done
// would be greately appreciated.
//
// Lgb

So now have a go at it. If you have other ideas on what could cause
this crashing behaviour I'd like to hear that too.

        Lgb

Reply via email to