Re: pdf (lua) of a lyx document

2022-02-07 Thread Jürgen Spitzmüller via lyx-users
Am Montag, dem 07.02.2022 um 16:32 +0100 schrieb Wolfgang Engelmann via
lyx-users:
> Thanks, Jürgen, for all the efforts. Since Debian does not provide
> the 
> dev, I should compile it again from source.
> Could you perhaps tell briefly the layman, what you had to fix?

We had done quite massive and thus sensitive changes/improvements to
the handling of nested languages, and your file revealed some corner
case bugs introduced by those changes.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-07 Thread Wolfgang Engelmann via lyx-users



Am 07.02.22 um 16:27 schrieb Jürgen Spitzmüller via lyx-users:

Am Montag, dem 07.02.2022 um 11:30 +0100 schrieb Wolfgang Engelmann via
lyx-users:

Is this fix already available for the normal user of lyx 2.4.0dev
(Debian)?


It is in the development repository. I don't know how recent the Debian
package you refer to is.

Jürgen


Thanks, Jürgen, for all the efforts. Since Debian does not provide the 
dev, I should compile it again from source.

Could you perhaps tell briefly the layman, what you had to fix?
Yours,
Wolfgang
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-07 Thread Jürgen Spitzmüller via lyx-users
Am Montag, dem 07.02.2022 um 11:30 +0100 schrieb Wolfgang Engelmann via
lyx-users:
> Is this fix already available for the normal user of lyx 2.4.0dev
> (Debian)?

It is in the development repository. I don't know how recent the Debian
package you refer to is.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-07 Thread Wolfgang Engelmann via lyx-users



Am 06.02.22 um 14:14 schrieb Scott Kostyshak via lyx-users:

On Sun, Feb 06, 2022 at 10:03:30AM +0100, Jürgen Spitzmüller via lyx-users 
wrote:

Am Samstag, dem 05.02.2022 um 13:41 -0500 schrieb Scott Kostyshak via
lyx-users:

I'm not sure (I did not do a bisect) but I think the recent commits
broke some ctests. Attached is an example document that fails on
current master that used to pass.


Please try again after d66c27de667b9.


Works well, thanks for the quick fix.

Scott



Is this fix already available for the normal user of lyx 2.4.0dev (Debian)?
Wolfgang
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-06 Thread Scott Kostyshak via lyx-users
On Sun, Feb 06, 2022 at 10:03:30AM +0100, Jürgen Spitzmüller via lyx-users 
wrote:
> Am Samstag, dem 05.02.2022 um 13:41 -0500 schrieb Scott Kostyshak via
> lyx-users:
> > I'm not sure (I did not do a bisect) but I think the recent commits
> > broke some ctests. Attached is an example document that fails on
> > current master that used to pass.
> 
> Please try again after d66c27de667b9.

Works well, thanks for the quick fix.

Scott


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


Re: pdf (lua) of a lyx document

2022-02-06 Thread Jürgen Spitzmüller via lyx-users
Am Samstag, dem 05.02.2022 um 13:41 -0500 schrieb Scott Kostyshak via
lyx-users:
> I'm not sure (I did not do a bisect) but I think the recent commits
> broke some ctests. Attached is an example document that fails on
> current master that used to pass.

Please try again after d66c27de667b9.

Thanks,
Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-05 Thread Scott Kostyshak via lyx-users
On Sat, Feb 05, 2022 at 07:49:34AM +0100, Jürgen Spitzmüller via lyx-users 
wrote:
> Am Freitag, dem 04.02.2022 um 17:27 +0100 schrieb Jürgen Spitzmüller
> via lyx-users:
> > However, Wolfgang's file reveals more language nesting problems which
> > I need to tackle.
> 
> Actually, the other problems seem to be related to problems in the
> complex setup. So from LyX's side, the issue seems solved.

Thanks for working on this, Jürgen.

I'm not sure (I did not do a bisect) but I think the recent commits
broke some ctests. Attached is an example document that fails on
current master that used to pass.

With unicode encoding in Document > Settings > Language, pdflatex
compilation succeeds, but it fails when changing to some custom
encodings. As for why we test that this Hebrew document compiles with
encoding "Chinese (simplified) (EUC-CN)", I have no idea.

Scott


012-hebrew_he.lyx
Description: application/lyx


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


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Freitag, dem 04.02.2022 um 17:27 +0100 schrieb Jürgen Spitzmüller
via lyx-users:
> However, Wolfgang's file reveals more language nesting problems which
> I need to tackle.

Actually, the other problems seem to be related to problems in the
complex setup. So from LyX's side, the issue seems solved.

Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Freitag, dem 04.02.2022 um 11:30 +0100 schrieb Jürgen Spitzmüller
via lyx-users:
> Am Freitag, dem 04.02.2022 um 11:23 +0100 schrieb Jean-Marc
> Lasgouttes
> via lyx-users:
> > I missed this test indeed. But what about line 1772 of
> > output_latex.cpp?
> 
> I missed this occurrence. Yes, here the test seems to be missing.
> 
> 
> Is this the place Wolfgang's test file points to?

I have added tests to all cases and also fixed the actual cause
(language closed when none was open).

However, Wolfgang's file reveals more language nesting problems which I
need to tackle.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jean-Marc Lasgouttes via lyx-users

Le 04/02/2022 à 11:22, Wolfgang Engelmann via lyx-users a écrit :
Jürgen, I did send the document to Jean-Marc privately because of its 
size on 2 Feb 2022 17:50

Should I send it to you too?


Wolfgang, I am very sorry, but I cannot find this message of yours. 
Anyway, the best is indeed that you send it to Jürgen. He is the one who 
will know how to fix the issue.


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


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jean-Marc Lasgouttes via lyx-users

Le 04/02/2022 à 11:30, Jürgen Spitzmüller via lyx-users a écrit :

Am Freitag, dem 04.02.2022 um 11:23 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:

I missed this test indeed. But what about line 1772 of
output_latex.cpp?


I missed this occurrence. Yes, here the test seems to be missing.


Is this the place Wolfgang's test file points to?


I have no idea, all I see is the assertion in a header file.

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


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Freitag, dem 04.02.2022 um 11:23 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:
> I see also Font::latexWriteEndChanges and Paragraph.cpp:2808 that are
> not very clear.

And these one should be audited, too.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Freitag, dem 04.02.2022 um 11:22 +0100 schrieb Wolfgang Engelmann
via lyx-users:
> Jürgen, I did send the document to Jean-Marc privately because of its
> size on 2 Feb 2022 17:50
> Should I send it to you too?

Yes, please.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Freitag, dem 04.02.2022 um 11:23 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:
> I missed this test indeed. But what about line 1772 of
> output_latex.cpp?

I missed this occurrence. Yes, here the test seems to be missing.


Is this the place Wolfgang's test file points to?

Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jean-Marc Lasgouttes via lyx-users

Le 04/02/2022 à 10:02, Jürgen Spitzmüller via lyx-users a écrit :

Am Mittwoch, dem 02.02.2022 um 16:47 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:

The place where this pop() method is used (popLanguageName) is
related to our use of nested languages. And indeed, it does not check
that some language has been saved before pop-ing it.


But we check before all uses of popLanguageName() that
lang_switch_depth_ (which is the stack at stake here) is non-empty
via langOpenedAtThisLevel(). So from the code, I don't see why that can
happen.


I missed this test indeed. But what about line 1772 of output_latex.cpp?

I see also Font::latexWriteEndChanges and Paragraph.cpp:2808 that are 
not very clear.


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


Re: pdf (lua) of a lyx document

2022-02-04 Thread Wolfgang Engelmann via lyx-users



Am 04.02.22 um 10:02 schrieb Jürgen Spitzmüller via lyx-users:

Am Mittwoch, dem 02.02.2022 um 16:47 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:

The place where this pop() method is used (popLanguageName) is
related to our use of nested languages. And indeed, it does not check
that some language has been saved before pop-ing it.


But we check before all uses of popLanguageName() that
lang_switch_depth_ (which is the stack at stake here) is non-empty
via langOpenedAtThisLevel(). So from the code, I don't see why that can
happen.


At this point, having a document that triggers the issue would be
very useful. Then I am sure that Jürgen or Enrico will be able to
take over.


Yes. Wolfgang, if you cannot share your document, you can make a copy
of it and anonymize that via buffer-anonymize (in the minibuffer, i.e.
after Alt-X). This function replaces all characters in your document
with an "a". This will do for us ti debug.

Jürgen


Jürgen, I did send the document to Jean-Marc privately because of its 
size on 2 Feb 2022 17:50

Should I send it to you too?
Wolfgang

My Mail to Jean-Marc Lasgouttes:
Hi, JMarc,
I thought to send this to you directly.
I have the English version of a book translated in German, and used the 
same template as the English one, except of course the German Language 
selection.
It is unfortunately quite long (1.4 MB) and I am not sure whether I 
should fiddle around with it to shorten it. I also do not know whether 
the graphics and bibliography is needed. If so, I could send you an 
.arch.gz file.

Regards,
Wolfgang
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-04 Thread Jürgen Spitzmüller via lyx-users
Am Mittwoch, dem 02.02.2022 um 16:47 +0100 schrieb Jean-Marc Lasgouttes
via lyx-users:
> The place where this pop() method is used (popLanguageName) is
> related to our use of nested languages. And indeed, it does not check
> that some language has been saved before pop-ing it.

But we check before all uses of popLanguageName() that
lang_switch_depth_ (which is the stack at stake here) is non-empty
via langOpenedAtThisLevel(). So from the code, I don't see why that can
happen.

> At this point, having a document that triggers the issue would be
> very useful. Then I am sure that Jürgen or Enrico will be able to
> take over.

Yes. Wolfgang, if you cannot share your document, you can make a copy
of it and anonymize that via buffer-anonymize (in the minibuffer, i.e.
after Alt-X). This function replaces all characters in your document
with an "a". This will do for us ti debug.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: pdf (lua) of a lyx document

2022-02-02 Thread Jean-Marc Lasgouttes via lyx-users

Le 02/02/2022 à 09:48, Wolfgang Engelmann via lyx-users a écrit :

I use lyx 2.4.0dev (Debian)
starting lyx from a terminal, selecting a certain document and trying to 
view it by export pdflua

leads to this in the terminal

wolfgang@Fuji:~/Dokumente/PUBLIKATIONEN-EIGENE/A-SP-2022$ lyx
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 597, 
resource id: 0, major code: 20 (GetProperty), minor code: 0

Warning: Failed to produce 1 preview snippet(s)
/usr/include/c++/10/bits/stl_stack.h:274: void std::stack<_Tp, 
_Sequence>::pop() [with _Tp = int; _Sequence = std::__debug::dequestd::allocator >]: Assertion '__builtin_expect(!this->empty(), 
true)' failed.

Abgebrochen


Wolfgang, could you share the document that causes issues (at least 
privately)?


The assertion above (I ignore the QXcbConnection stuff for now) means 
that stack::pop() is called on a stack which is already empty (this 
methods removes one object from a stack).


In our code, there are two places where such a stack is used: 
output_latex.cpp (LaTeX output) and output_xhtml.cpp (HTML output).


Since your document is exported to late for LuaLaTeX, it has to be the 
former.


The place where this pop() method is used (popLanguageName) is related 
to our use of nested languages. And indeed, it does not check that some 
language has been saved before pop-ing it.


At this point, having a document that triggers the issue would be very 
useful. Then I am sure that Jürgen or Enrico will be able to take over.


JMarc

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


Re: pdf (lua) of a lyx document

2022-02-02 Thread Jean-Marc Lasgouttes via lyx-users

Le 02/02/2022 à 10:05, José Abílio Matos via lyx-users a écrit :

On Wednesday, 2 February 2022 08.48.18 WET Wolfgang Engelmann via lyx-users
wrote:

I use lyx 2.4.0dev (Debian)
starting lyx from a terminal, selecting a certain document and trying to
view it by export pdflua
leads to this in the terminal

wolfgang@Fuji:~/Dokumente/PUBLIKATIONEN-EIGENE/A-SP-2022$ lyx
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 597,
resource id: 0, major code: 20 (GetProperty), minor code: 0
Warning: Failed to produce 1 preview snippet(s)
/usr/include/c++/10/bits/stl_stack.h:274: void std::stack<_Tp,
_Sequence>::pop() [with _Tp = int; _Sequence = std::__debug::deque >]: Assertion '__builtin_expect(!this->empty(),
true)' failed.
I had reported before under
   lyx 2.4.0dev crashes
and wonder whether it is the same issue.


Yes probably.


What should I do?


From the build directory (tip: you can run LyX from there without 
installing):

1/ make sure that you have pulled the latest changes from git and built them
2/ run "gdb src/lyx"
3/ when you see the "(gdb)" prompt, type the following commands
catch throw
run
[do the crashing thing]
bt
4/ send the output of the bt command

f you have issues with thunderbird, try to close it before debugging.


p.s. if I compile lyx again, should I use
./configure --enable-debug
since I am not familiar with gdb?


Usually this type of discussion are more appropriate in lyx-devel mailing
list.


Indeed. But encouraging users to use latest version is good.

But I am not sure that this particular instance is encouraging :)


With that said if you use --enable-debug use also --enable-stdlib-debug that
it will help as well.


These are on by default with development builds.

JMarc

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


Re: pdf (lua) of a lyx document

2022-02-02 Thread José Abílio Matos via lyx-users
On Wednesday, 2 February 2022 08.48.18 WET Wolfgang Engelmann via lyx-users 
wrote:
> I use lyx 2.4.0dev (Debian)
> starting lyx from a terminal, selecting a certain document and trying to
> view it by export pdflua
> leads to this in the terminal
> 
> wolfgang@Fuji:~/Dokumente/PUBLIKATIONEN-EIGENE/A-SP-2022$ lyx
> qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 597,
> resource id: 0, major code: 20 (GetProperty), minor code: 0
> Warning: Failed to produce 1 preview snippet(s)
> /usr/include/c++/10/bits/stl_stack.h:274: void std::stack<_Tp,
> _Sequence>::pop() [with _Tp = int; _Sequence = std::__debug::deque std::allocator >]: Assertion '__builtin_expect(!this->empty(),
> true)' failed.
> Abgebrochen
> wolfgang@Fuji:~/Dokumente/PUBLIKATIONEN-EIGENE/A-SP-2022$
> 
> I had reported before under
>   lyx 2.4.0dev crashes
> and wonder whether it is the same issue.
> 
> What should I do?
> Go back to Lyx 2.3.x?
> Compile the 2.4 anew (in case it has changed in the meantime)?
> 
> This error does not happen with other lyx documents which I tried
> 
> Wolfgang
> 
> p.s. if I compile lyx again, should I use
> ./configure --enable-debug
> since I am not familiar with gdb?

Usually this type of discussion are more appropriate in lyx-devel mailing 
list.

With that said if you use --enable-debug use also --enable-stdlib-debug that 
it will help as well.

As usual with bug reports it helps to find, when possible, a minimal working 
example.

Regards,
-- 
José Abílio


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