LyX 2.4 -- memory full when trying to copy a math block having boxed expression with 4 levels of nested deep subscript

Niranjana K M niranjana26 at gmail.com
Sat May 18 06:30:32 UTC 2024


Dear LyX developers,
    Thank you and congratulations for heading towards much awaited LyX-2.4.
I have been using LyX-2.4-RC1 from last 6 months and yesterday accidentally
i caught this strange behavior. And I even installed recently released
LyX-2.4 and the behavior persisted in this version also. But i am not
facing this problem in LyX-2.3.7.
    The problem is, when I try to copy, by selecting and pressing Ctrl+C
(or Copy from edit menu), a math block which is boxed and also having deep
nested subscripts to at least 4 levels then my computer memory rapidly got
consumed to the full (starting from 1GB to ~10GB) and in the end LyX closed
with following message.

$ /usr/local/bin/lyx
Error: Software exception Detected
----------------------------------------
LyX has caught an exception, it will now attempt to save all unsaved
documents and exit.
Exception: std::bad_alloc
Aborted

Following is the math block which caused it, (LyX code)
\begin_inset Formula
\[
\boxed{v=\left[v_{p}\right]_{a_{0}}}
\]
\end_inset

The file is also attached in the end and here is the screenshot of the math
block.
[image: Screenshot from 2024-05-18 11-43-00.png]

It is a legitimate construction and it gives no problem in LyX-2.3.7
(confirmed).
If either the box is removed or the subscript 0 is removed from *a*, then
it has no issues in copying.

All these versions I mentioned were compiled from source on Gentoo Linux.
This LyX-2.4 was compiled with the following configuration,
$ ./configure --without-included-boost
Configuration
  Host type:               x86_64-pc-linux-gnu
  Special build flags:      build=release callback-printing use-hunspell
use-aspell use-enchant
  Bundled libraries:        nod
  C++ Compiler:            g++ (13.2.1)
  C++ Compiler flags:       -fPIC -O2 -std=c++17
  C++ Compiler user flags:   -std=c++17  -march=native -O2 -pipe
  Linker flags:             -rdynamic
  Linker user flags:
  Qt Frontend:
      Qt version:   5.15.11
  Packaging:               posix
  LyX binary dir:          /usr/local/bin
  LyX files dir:           /usr/local/share/lyx

I loved the new features in LyX-2.4 and don't want to go back to LyX-2.3.7
due to this issue. Please help in this regard.


*Regards*
*Niranjana*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240518/3ac22092/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2024-05-18 11-43-00.png
Type: image/png
Size: 2400 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240518/3ac22092/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.24.lyx
Type: application/x-lyx
Size: 2483 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240518/3ac22092/attachment-0001.lyx>


More information about the lyx-devel mailing list