Re: cursor related(?) crash
Bo == Bo Peng [EMAIL PROTECTED] writes: Bo Should fix this. The first change was done by me Bo ((button_dim.contains(x, y) ) to not add text to cursor when the Bo inset is closed (the cursor before inset crash). The inline case Bo is forgotten. I do not know who is responsible for the second Bo missing Inline case. Thanks. JMarc
Re: cursor related(?) crash
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> Should fix this. The first change was done by me Bo> ((button_dim.contains(x, y) ) to not add text to cursor when the Bo> inset is closed (the cursor before inset crash). The inline case Bo> is forgotten. I do not know who is responsible for the second Bo> missing Inline case. Thanks. JMarc
cursor related(?) crash
recipe: insert ERT right click - inline - OK click in ERT box i get this in the console: Assertion triggered in void __thiscall lyx::LyXText::dispatch(class lyx::LCursor ,class lyx::FuncRequest ) by failing check cur.text() == this in file ..\..\..\src\text3.C:310 backtrace: lyx-qt4.exe!lyx::LyXServerSocket::`scalar deleting destructor'() + 0x27 bytes C++ lyx-qt4.exe!boost::checked_deletelyx::LyXServerSocket(lyx::LyXServerSocket * x=0x00318d98) Line 34 + 0x1c bytes C++ lyx-qt4.exe!boost::scoped_ptrlyx::LyXServerSocket::~scoped_ptrlyx::LyXServerSocket() Line 77 + 0xb bytes C++ lyx-qt4.exe!boost::scoped_ptrlyx::LyXServerSocket::reset(lyx::LyXServerSocket * p=0x) Line 84 C++ lyx-qt4.exe!lyx::LyX::emergencyCleanup() Line 976 C++ 01a89d40() lyx-qt4.exe!boost::assertion_failed(const char * expr=0x00e3eec8, const char * function=0x00e3ee70, const char * file=0x00e3ee58, long line=310) Line 57 C++ lyx-qt4.exe!lyx::LyXText::dispatch(lyx::LCursor cur={...}, lyx::FuncRequest cmd={...}) Line 310 + 0x28 bytes C++ lyx-qt4.exe!lyx::InsetText::doDispatch(lyx::LCursor cur={...}, lyx::FuncRequest cmd={...}) Line 260 C++ lyx-qt4.exe!lyx::InsetCollapsable::doDispatch(lyx::LCursor cur={...}, lyx::FuncRequest cmd={...}) Line 333 + 0x10 bytes C++ lyx-qt4.exe!lyx::InsetERT::doDispatch(lyx::LCursor cur={...}, lyx::FuncRequest cmd={...}) Line 261 C++ lyx-qt4.exe!lyx::InsetBase::dispatch(lyx::LCursor cur={...}, lyx::FuncRequest cmd={...}) Line 132 + 0x1a bytes C++ lyx-qt4.exe!lyx::BufferView::workAreaDispatch(const lyx::FuncRequest cmd0={...}) Line 1135 C++ lyx-qt4.exe!lyx::frontend::WorkArea::dispatch(const lyx::FuncRequest cmd0={...}) Line 196 + 0xf bytes C++ lyx-qt4.exe!lyx::frontend::GuiWorkArea::mousePressEvent(QMouseEvent * e=0x01a8c468) Line 295 C++ QtGuid4.dll!QWidget::event(QEvent * event=0x01a8c468) Line 5695 C++ QtGuid4.dll!QFrame::event(QEvent * e=0x01a8c468) Line 634 C++ QtGuid4.dll!QAbstractScrollArea::viewportEvent(QEvent * e=0x01a8c468) Line 854 + 0xc bytes C++ QtGuid4.dll!QAbstractScrollAreaPrivate::viewportEvent(QEvent * event=0x01a8c468) Line 78 + 0x28 bytes C++ QtGuid4.dll!QAbstractScrollAreaFilter::eventFilter(QObject * o=0x0030b8e8, QEvent * e=0x01a8c468) Line 89 + 0x29 bytes C++ QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x0030b8e8, QEvent * e=0x01a8c468) Line 3426 + 0x1b bytes C++ QtGuid4.dll!QApplication::notify(QObject * receiver=0x0030b8e8, QEvent * e=0x01a8c468) Line 3133 + 0x2f bytes C++ QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x0030b8e8, QEvent * event=0x01a8c468) Line 186 + 0x40 bytes C++ QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG msg={...}) Line 2622 + 0x14 bytes C++ QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x00250a36, unsigned int message=516, unsigned int wParam=2, long lParam=2359344) Line 1278 + 0xc bytes C++ QtCored4.dll!QEventDispatcherWin32::processEvents(QFlagsenum QEventLoop::ProcessEventsFlag flags={...}) Line 437 + 0x17 bytes C++ QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlagsenum QEventLoop::ProcessEventsFlag flags={...}) Line 930 + 0x15 bytes C++ QtCored4.dll!QEventLoop::processEvents(QFlagsenum QEventLoop::ProcessEventsFlag flags={...}) Line 127 C++ QtCored4.dll!QEventLoop::exec(QFlagsenum QEventLoop::ProcessEventsFlag flags={...}) Line 172 + 0x2d bytes C++ QtCored4.dll!QCoreApplication::exec() Line 727 + 0x15 bytesC++ QtGuid4.dll!QApplication::exec() Line 2928 C++ lyx-qt4.exe!lyx::frontend::GuiApplication::exec() Line 155 + 0x8 bytes C++ lyx-qt4.exe!lyx::LyX::exec(int argc=1, char * * argv=0x003e56a8) Line 435 + 0x30 bytes C++ lyx-qt4.exe!main(int argc=1, char * * argv=0x003e56a8) Line 48 + 0x10 bytes C++ lyx-qt4.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C lyx-qt4.exe!mainCRTStartup() Line 403 C kernel32.dll!7c816fd7()
Re: cursor related(?) crash
Edwin == Edwin Leuven [EMAIL PROTECTED] writes: Edwin recipe: insert ERT right click - inline - OK click in ERT box Edwin i get this in the console: This is a bug of BufferView::workAreaDispatch. When InsetCollapsable is invoked, cur does not point inside the inset (as most code assumes) but just outside. I do not know when this change happened, but it should be reverted. A linux backtrace: #4 0x08b693f5 in lyx::support::abort () at ../../../lyx-devel/src/support/abort.C:25 #5 0x081a3726 in boost::assertion_failed ( expr=0x8c7dec4 cur.text() == this, function=0x8c7d220 void lyx::LyXText::dispatch(lyx::LCursor, lyx::FuncRequest), file=0x8c7de58 ../../lyx-devel/src/text3.C, line=310) at ../../lyx-devel/src/boost.C:56 #6 0x0858356b in lyx::LyXText::dispatch (this=0x910e7b0, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../lyx-devel/src/text3.C:310 #7 0x087e6620 in lyx::InsetText::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insettext.C:259 #8 0x08719390 in lyx::InsetCollapsable::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetcollapsable.C:362 #9 0x0873470b in lyx::InsetERT::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetert.C:258 #10 0x086c20fa in lyx::InsetBase::dispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetbase.C:132 #11 0x0807ae69 in lyx::BufferView::workAreaDispatch (this=0x9018d78, [EMAIL PROTECTED]) at ../../lyx-devel/src/BufferView.C:1130 #12 0x0885a69a in lyx::frontend::WorkArea::dispatch (this=0x90094cc, [EMAIL PROTECTED]) at ../../../lyx-devel/src/frontends/WorkArea.C:196 Abdel? Bo? JMarc
Re: cursor related(?) crash
This is a bug of BufferView::workAreaDispatch. When InsetCollapsable is invoked, cur does not point inside the inset (as most code assumes) but just outside. I do not know when this change happened, but it should be reverted. Index: src/insets/insetcollapsable.C === --- src/insets/insetcollapsable.C (revision 16710) +++ src/insets/insetcollapsable.C (working copy) @@ -306,7 +306,7 @@ InsetBase * InsetCollapsable::editXY(LCursor cur, int x, int y) { //lyxerr InsetCollapsable: edit xy endl; - if (status() == Collapsed || button_dim.contains(x, y)) + if (status() == Collapsed || (button_dim.contains(x, y) status() != Inlined)) return this; cur.push(*this); return InsetText::editXY(cur, x, y); @@ -320,7 +320,7 @@ switch (cmd.action) { case LFUN_MOUSE_PRESS: - if (cmd.button() == mouse_button::button1 hitButton(cmd)) { + if (cmd.button() == mouse_button::button1 hitButton(cmd) status() != Inlined) { // reset selection if necessary (see bug 3060) if (cur.selection()) cur.bv().cursor().clearSelection(); Should fix this. The first change was done by me ((button_dim.contains(x, y) ) to not add text to cursor when the inset is closed (the cursor before inset crash). The inline case is forgotten. I do not know who is responsible for the second missing Inline case. OK to apply? Bo
Re: cursor related(?) crash
OK to apply? I did more testing and submitted it. Cheers, Bo
cursor related(?) crash
recipe: insert ERT right click -> inline -> OK click in ERT box i get this in the console: Assertion triggered in void __thiscall lyx::LyXText::dispatch(class lyx::LCursor &,class lyx::FuncRequest &) by failing check "cur.text() == this" in file ..\..\..\src\text3.C:310 backtrace: lyx-qt4.exe!lyx::LyXServerSocket::`scalar deleting destructor'() + 0x27 bytes C++ lyx-qt4.exe!boost::checked_delete(lyx::LyXServerSocket * x=0x00318d98) Line 34 + 0x1c bytes C++ lyx-qt4.exe!boost::scoped_ptr::~scoped_ptr() Line 77 + 0xb bytes C++ lyx-qt4.exe!boost::scoped_ptr::reset(lyx::LyXServerSocket * p=0x) Line 84 C++ lyx-qt4.exe!lyx::LyX::emergencyCleanup() Line 976 C++ 01a89d40() lyx-qt4.exe!boost::assertion_failed(const char * expr=0x00e3eec8, const char * function=0x00e3ee70, const char * file=0x00e3ee58, long line=310) Line 57 C++ > lyx-qt4.exe!lyx::LyXText::dispatch(lyx::LCursor & cur={...}, lyx::FuncRequest & cmd={...}) Line 310 + 0x28 bytes C++ lyx-qt4.exe!lyx::InsetText::doDispatch(lyx::LCursor & cur={...}, lyx::FuncRequest & cmd={...}) Line 260 C++ lyx-qt4.exe!lyx::InsetCollapsable::doDispatch(lyx::LCursor & cur={...}, lyx::FuncRequest & cmd={...}) Line 333 + 0x10 bytes C++ lyx-qt4.exe!lyx::InsetERT::doDispatch(lyx::LCursor & cur={...}, lyx::FuncRequest & cmd={...}) Line 261 C++ lyx-qt4.exe!lyx::InsetBase::dispatch(lyx::LCursor & cur={...}, lyx::FuncRequest & cmd={...}) Line 132 + 0x1a bytes C++ lyx-qt4.exe!lyx::BufferView::workAreaDispatch(const lyx::FuncRequest & cmd0={...}) Line 1135 C++ lyx-qt4.exe!lyx::frontend::WorkArea::dispatch(const lyx::FuncRequest & cmd0={...}) Line 196 + 0xf bytes C++ lyx-qt4.exe!lyx::frontend::GuiWorkArea::mousePressEvent(QMouseEvent * e=0x01a8c468) Line 295 C++ QtGuid4.dll!QWidget::event(QEvent * event=0x01a8c468) Line 5695 C++ QtGuid4.dll!QFrame::event(QEvent * e=0x01a8c468) Line 634 C++ QtGuid4.dll!QAbstractScrollArea::viewportEvent(QEvent * e=0x01a8c468) Line 854 + 0xc bytes C++ QtGuid4.dll!QAbstractScrollAreaPrivate::viewportEvent(QEvent * event=0x01a8c468) Line 78 + 0x28 bytes C++ QtGuid4.dll!QAbstractScrollAreaFilter::eventFilter(QObject * o=0x0030b8e8, QEvent * e=0x01a8c468) Line 89 + 0x29 bytes C++ QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x0030b8e8, QEvent * e=0x01a8c468) Line 3426 + 0x1b bytes C++ QtGuid4.dll!QApplication::notify(QObject * receiver=0x0030b8e8, QEvent * e=0x01a8c468) Line 3133 + 0x2f bytes C++ QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x0030b8e8, QEvent * event=0x01a8c468) Line 186 + 0x40 bytes C++ QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG & msg={...}) Line 2622 + 0x14 bytes C++ QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x00250a36, unsigned int message=516, unsigned int wParam=2, long lParam=2359344) Line 1278 + 0xc bytes C++ QtCored4.dll!QEventDispatcherWin32::processEvents(QFlagsQEventLoop::ProcessEventsFlag> flags={...}) Line 437 + 0x17 bytes C++ QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlagsQEventLoop::ProcessEventsFlag> flags={...}) Line 930 + 0x15 bytes C++ QtCored4.dll!QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag> flags={...}) Line 127 C++ QtCored4.dll!QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag> flags={...}) Line 172 + 0x2d bytes C++ QtCored4.dll!QCoreApplication::exec() Line 727 + 0x15 bytesC++ QtGuid4.dll!QApplication::exec() Line 2928 C++ lyx-qt4.exe!lyx::frontend::GuiApplication::exec() Line 155 + 0x8 bytes C++ lyx-qt4.exe!lyx::LyX::exec(int & argc=1, char * * argv=0x003e56a8) Line 435 + 0x30 bytes C++ lyx-qt4.exe!main(int argc=1, char * * argv=0x003e56a8) Line 48 + 0x10 bytes C++ lyx-qt4.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C lyx-qt4.exe!mainCRTStartup() Line 403 C kernel32.dll!7c816fd7()
Re: cursor related(?) crash
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> recipe: insert ERT right click -> inline -> OK click in ERT box Edwin> i get this in the console: This is a bug of BufferView::workAreaDispatch. When InsetCollapsable is invoked, cur does not point inside the inset (as most code assumes) but just outside. I do not know when this change happened, but it should be reverted. A linux backtrace: #4 0x08b693f5 in lyx::support::abort () at ../../../lyx-devel/src/support/abort.C:25 #5 0x081a3726 in boost::assertion_failed ( expr=0x8c7dec4 "cur.text() == this", function=0x8c7d220 "void lyx::LyXText::dispatch(lyx::LCursor&, lyx::FuncRequest&)", file=0x8c7de58 "../../lyx-devel/src/text3.C", line=310) at ../../lyx-devel/src/boost.C:56 #6 0x0858356b in lyx::LyXText::dispatch (this=0x910e7b0, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../lyx-devel/src/text3.C:310 #7 0x087e6620 in lyx::InsetText::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insettext.C:259 #8 0x08719390 in lyx::InsetCollapsable::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetcollapsable.C:362 #9 0x0873470b in lyx::InsetERT::doDispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetert.C:258 #10 0x086c20fa in lyx::InsetBase::dispatch (this=0x910e788, [EMAIL PROTECTED], [EMAIL PROTECTED]) at ../../../lyx-devel/src/insets/insetbase.C:132 #11 0x0807ae69 in lyx::BufferView::workAreaDispatch (this=0x9018d78, [EMAIL PROTECTED]) at ../../lyx-devel/src/BufferView.C:1130 #12 0x0885a69a in lyx::frontend::WorkArea::dispatch (this=0x90094cc, [EMAIL PROTECTED]) at ../../../lyx-devel/src/frontends/WorkArea.C:196 Abdel? Bo? JMarc
Re: cursor related(?) crash
This is a bug of BufferView::workAreaDispatch. When InsetCollapsable is invoked, cur does not point inside the inset (as most code assumes) but just outside. I do not know when this change happened, but it should be reverted. Index: src/insets/insetcollapsable.C === --- src/insets/insetcollapsable.C (revision 16710) +++ src/insets/insetcollapsable.C (working copy) @@ -306,7 +306,7 @@ InsetBase * InsetCollapsable::editXY(LCursor & cur, int x, int y) { //lyxerr << "InsetCollapsable: edit xy" << endl; - if (status() == Collapsed || button_dim.contains(x, y)) + if (status() == Collapsed || (button_dim.contains(x, y) && status() != Inlined)) return this; cur.push(*this); return InsetText::editXY(cur, x, y); @@ -320,7 +320,7 @@ switch (cmd.action) { case LFUN_MOUSE_PRESS: - if (cmd.button() == mouse_button::button1 && hitButton(cmd)) { + if (cmd.button() == mouse_button::button1 && hitButton(cmd) && status() != Inlined) { // reset selection if necessary (see bug 3060) if (cur.selection()) cur.bv().cursor().clearSelection(); Should fix this. The first change was done by me ((button_dim.contains(x, y) ) to not add text to cursor when the inset is closed (the cursor before inset crash). The inline case is forgotten. I do not know who is responsible for the second missing Inline case. OK to apply? Bo
Re: cursor related(?) crash
OK to apply? I did more testing and submitted it. Cheers, Bo
Re: Cursor-related crash
Angus Leeming wrote: Current cvs with my own changes to Martin's branches code, but that's irrelevant here. Start LyX File-New Insert-Special Formatting-Superscript Shift-Right arrow to select the blue box. Note that the cursor remains on the left hand side... Backspace Crash. It's not related to my selection.diff patch. (it's already present before that). There are also other [possibly related] strange cursor behaviour patterns with sup/sub-script, like cursor-right not willing to exit the inset, or cursor-left entering the inset when the cursor is on the left. Alfredo
Re: Cursor-related crash
Angus Leeming wrote: > Current cvs with my own changes to Martin's branches code, but that's > irrelevant here. > > Start LyX > File->New > Insert->Special Formatting->Superscript > Shift-Right arrow to select the blue box. > Note that the cursor remains on the left hand side... > Backspace > Crash. It's not related to my selection.diff patch. (it's already present before that). There are also other [possibly related] strange cursor behaviour patterns with sup/sub-script, like cursor-right not willing to exit the inset, or cursor-left entering the inset when the cursor is on the left. Alfredo