LyX 2.4 -- memory full when trying to copy a math block having boxed expression with 4 levels of nested deep subscript
Pavel Sanda
sanda at lyx.org
Sat May 25 08:28:23 UTC 2024
On Fri, May 24, 2024 at 01:35:28PM -0400, Alexander Dunlap wrote:
> >>> I can reproduce this. I investigated a little and it seems that the problem is that the "while (true)" loop in the splitAndWrapInMText function in InsetMathBox.cpp is never terminating. I believe that the reason for this is that the logic in this function is not correctly identifying the matching XHTML end tag for a given start tag, since it doesn't take into account nested tags properly.
> >>
> >> Here is a patch that fixes the problem for me. It needs extensive checking/testing though because I do not know too much about XHTML or what all sorts of input might be seen in this function.
> >
> > This patch is indeed not good enough, because it fails if there is text inside the tag that contains the tag name. This is another case of the problem in the 2.4 RC's: if you type \left(msub\right)_{0} then it also hangs when you try to copy it. The attached patches attempt to fix this issue but it seems maybe a proper parsing system would be better.....
>
> Should I upload these patches to the bug tracker so they are not lost?
Yes, please do.
Pavel
More information about the lyx-devel
mailing list