LyX crashes when undoing an advanced search-replace

Bug #1737429 reported by Christopher Barrington-Leigh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LyX
New
Undecided
Unassigned
lyx (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Open a new document. Type content as follows:

aaa
bbb
ccc
bbb

Then open the Advanced Search-Replace dialog (under edit), and search for "bbb". In the replace box, write "\abc" inside an ERT (red) box.

Make the substitution. Now try to undo the operation (ctrl-z). LyX repeatably crashes /dies completely at this point.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: lyx 2.2.3-1
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Dec 10 15:12:34 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-11-18 (22 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
SourcePackage: lyx
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :
Revision history for this message
Scott Kostyshak (scott-kostyshak) wrote :

Christopher, thank you very much for taking the time to report this issue and to give details on how to reproduce. I've tried several times and I cannot reproduce. Can you make a screencast? If not, please answer the following questions: After writing "ccc", do you put the cursor at the top? Or after you search you first click on "Yes" in the "wrap search" dialog? Do you do the search before you click in the replace box and type "\abc"? Do you do anything (e.g. click in the main text area?) after you make the substitution and before you execute the ctrl-z? If you do ctrl-z with the cursor in the advanced find, then it undoes the last edit to the advanced find window. If you do it in the main workarea, it undoes the substitution.

Are you able to reproduce while running LyX from gdb? Can you post a backtrace?

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

I also tried to reproduce it, even with the ubuntu-provided binary, but did not succeed. There is something that we are missing. I see however that the ubuntu binary is built with -fstack-protector and I presume that it can catch things that we do not routinely see.

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Here is a screen capture.
After making one match (of two possible), I move the cursor to the main window and type ctrl-z.

description: updated
Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

OK, I can reproduce now. The issue is not about replacement itself, but about using Undo while the cursor is inside an inset in one of the two document areas of the advanced search panel. I'll try to see what I can do from there.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

Concerning your comment below the video, actually you do not move the (blinking) cursor to the main window, only the mouse cursor. Therefore the undo command goes to the place where the blinking cursor is, in the ERT inset.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

The bug is now fixed in our master branch (it was a tough one to track). Eventually, it should be backported to upcoming 2.3.0 and 2.2.4 versions.

Thanks a lot for your detailed report. Undo handling was broken in the Finad/Replace work areas.

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Aha. Thanks for your responsiveness and thanks very much for this amazing software!

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

You are welcome. By reporting bugs, you help us making is amazing.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

For reference, the upstream bug is https://www.lyx.org/trac/ticket/10847

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

For information, the upstream bug is now fixed for the yet-to-be-released versions 2.2.4 and 2.3.0.

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

LyX 2.2.4 and LyX 2.3.0 have been released. The bug is fixed upstream.

Changed in lyx (Ubuntu):
status: New → Confirmed
Changed in lyx (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.