Am Dienstag, dem 16.12.2025 um 21:25 +0100 schrieb
[email protected]:
I REPORTED A SERIOS CRASH problem below..
I am an experience C++ developer
and can help to fix the problem.

?SOLUTION:
Do you think it is feasible to compile
it as a Win64 and/or using
typedef int64_t  pos_type ;
or find another work-around , that I can go on ?

Dear Frank,

Thank you for your detailed report. I have a doubt though about the cause of the bug. Do you get any backtrace, for example if you start LyX from a console?

He is my reasoning : we use pos_type not as a difference of pointers, but as a signed integer of the same size as size_t. The (bad) reason for that is that we sometimes use the special value -1 to indicate a position that concerns the whole paragraph.

However, to have a case where beginOfBody() is negative, we would need a paragraph with more than 2 billion characters and additionally have all these characters be in the 'label' part. This is the part in bold when one uses a Description or Labeling layout, before the first space.

Unless you confirm that your document has such a structure, I am inclined to look for another reason.

So now, this is the time when I enter in full divination mode : somewhere in your document, you have a paragraph with Labeling layout (Liste with German interface) which first paragraph is a line break inset.

In any case, this is how I managed to reproduce such a crash. The crash happens when LyX tries to display the paragraph, so it may seem random.

If you want to find the culprit and solve it, I would advise opening the lyx files in a text editor and search for something like:

\begin_body

\begin_layout Labeling
\labelwidthstring 00.00.0000
\begin_inset Newline newline
\end_inset

<maybe some content>
\end_layout

I would advise removing the whole paragraph, because it does not make much sense.

Did I get it right?

Anyway, thanks a lot for the report. I have committed to master a fix to the issue I have detected.

I am surprised though that this assertion is enabled in the code that we distribute. This is something that we have to discuss wrt our Windows packaging.

Riki, can I backport to 2.4.x and 2.5.x ?

HTH,
Jean-Marc
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to