Re: SIGSEGV on master when exporting MergedManuals.lyx in GUI

2022-01-28 Thread Scott Kostyshak
On Fri, Jan 28, 2022 at 06:18:29PM +0100, Pavel Sanda wrote:
> On Mon, Jan 24, 2022 at 11:07:38AM +0100, Pavel Sanda wrote:
> > On Mon, Dec 27, 2021 at 10:01:12PM +0100, Jean-Marc Lasgouttes wrote:
> > > Le 27/12/2021 ?? 19:53, Scott Kostyshak a écrit :
> > > >>It is not that I am not interested, but rather that I am incompetent in
> > > >>these things. Did someone look for subsequent commits in the 
> > > >>lyx-unstable
> > > >>tree?
> > > >
> > > >I took a quick look and did not see anything right after.
> > > >
> > > >I just compiled lyx-unstable and reproduce the bug on it (i.e., on
> > > >branch "unstable").
> > > 
> > > Thanks for checking.
> > 
> > Given that we either can not reproduce the crash which should have been 
> > fixed
> > nor we have clue how to fix the current one caused by the fix I'll revert 
> > soon.
> 
> Done at 33c68d7750e.

Thanks,

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master regarding math completion

2022-01-28 Thread Scott Kostyshak
On Fri, Jan 28, 2022 at 06:09:25PM +0100, Jean-Marc Lasgouttes wrote:
> Le 28/01/2022 à 17:49, Kornel Benko a écrit :
> > > This seems to work and makes sense. Could someone do a quick check
> > > before I commit ? I will run it under valgrind later, when I am in front
> > > of an old enough ubuntu box.
> 
> 
> > Works well here. Compiled with -fsanitize, no problems.
> 
> Thanks Kornel. I pushed it to master, we'll see.

Works well here also, thanks.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master when exporting MergedManuals.lyx in GUI

2022-01-28 Thread Pavel Sanda
On Mon, Jan 24, 2022 at 11:07:38AM +0100, Pavel Sanda wrote:
> On Mon, Dec 27, 2021 at 10:01:12PM +0100, Jean-Marc Lasgouttes wrote:
> > Le 27/12/2021 ?? 19:53, Scott Kostyshak a écrit :
> > >>It is not that I am not interested, but rather that I am incompetent in
> > >>these things. Did someone look for subsequent commits in the lyx-unstable
> > >>tree?
> > >
> > >I took a quick look and did not see anything right after.
> > >
> > >I just compiled lyx-unstable and reproduce the bug on it (i.e., on
> > >branch "unstable").
> > 
> > Thanks for checking.
> 
> Given that we either can not reproduce the crash which should have been fixed
> nor we have clue how to fix the current one caused by the fix I'll revert 
> soon.

Done at 33c68d7750e.

> Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master regarding math completion

2022-01-28 Thread Jean-Marc Lasgouttes

Le 28/01/2022 à 17:49, Kornel Benko a écrit :

This seems to work and makes sense. Could someone do a quick check
before I commit ? I will run it under valgrind later, when I am in front
of an old enough ubuntu box.




Works well here. Compiled with -fsanitize, no problems.


Thanks Kornel. I pushed it to master, we'll see.

JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master regarding math completion

2022-01-28 Thread Kornel Benko
Am Fri, 28 Jan 2022 17:17:40 +0100
schrieb Jean-Marc Lasgouttes :

> Le 27/01/2022 à 17:26, Jean-Marc Lasgouttes a écrit :
> > So finally, the MathRow object points to an inset that has been deleted 
> > at the time of the completion. There should be code somewhere that 
> > should regenerate the math row. I'll have a look.  
> 
> This seems to work and makes sense. Could someone do a quick check 
> before I commit ? I will run it under valgrind later, when I am in front 
> of an old enough ubuntu box.
> 
> JMarc
> 
> 

Works well here. Compiled with -fsanitize, no problems.

Kornel


pgp8CnoY49V0O.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master regarding math completion

2022-01-28 Thread Jean-Marc Lasgouttes

Le 27/01/2022 à 17:26, Jean-Marc Lasgouttes a écrit :
So finally, the MathRow object points to an inset that has been deleted 
at the time of the completion. There should be code somewhere that 
should regenerate the math row. I'll have a look.


This seems to work and makes sense. Could someone do a quick check 
before I commit ? I will run it under valgrind later, when I am in front 
of an old enough ubuntu box.


JMarc


From f400a2cfa9b5552c103da0b7e336b6964dfa5b2d Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Fri, 28 Jan 2022 17:13:30 +0100
Subject: [PATCH] Force redraw after completion

Inside a math inset when completing macro names, it could lead to crashes.

Note that this processUpdateFlags is present when outside of this if() branch.
---
 src/frontends/qt/GuiCompleter.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/frontends/qt/GuiCompleter.cpp b/src/frontends/qt/GuiCompleter.cpp
index 6fd39d3039..6effd3d05b 100644
--- a/src/frontends/qt/GuiCompleter.cpp
+++ b/src/frontends/qt/GuiCompleter.cpp
@@ -701,6 +701,10 @@ void GuiCompleter::tab()
 		hidePopup();
 		hideInline(cur);
 		updateVisibility(false, false);
+
+		// redraw if needed
+		if (cur.result().screenUpdate())
+			gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
 		return;
 	}
 	docstring nextchar = completion.substr(prefix.size(), 1);
-- 
2.32.0

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: SIGSEGV on master regarding math completion

2022-01-28 Thread Jean-Marc Lasgouttes

Le 27/01/2022 à 23:39, Scott Kostyshak a écrit :

So finally, the MathRow object points to an inset that has been deleted at
the time of the completion. There should be code somewhere that should
regenerate the math row. I'll have a look.


Thanks for walking this through! The only part you skipped over is what
did you do during the 20 minutes of wait-time while running with
Valgrind? :)


Well, I launch LyX, go back to what I was doing and after 45s a LyX 
windows pops up. That's still in the livable territory. And it is great 
to detect memory issues like this one.



I do hope to go back to trying Valgrind when I find bugs and I made a
note to study this case when I do.


It works quite well to detect memory issues like this one.

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel