Le 26/10/2015 20:52, Georg Baum a écrit :
Guillaume Munch wrote:

Dear Uwe,

Keywords regression removed
Status changed from assigned to closed
Resolution set to wontfix
Milestone 2.2.0 deleted


I don't think that we should support things that break compilation
with the default settings.

Then maybe have listings in footnotes be added with the option inline,
with the possibility of changing it by hand afterwards? This sound good
to me, it would also fix the problem of users not knowing that this is a
possibility.

If we do this, and disable the option to change to the non-inline version
for listings inside footnotes, then there is no way for the user to create
an uncompilable document.

Please, revert aa82c1cc, and open a new ticket if the compilation issue
appears important to you. Also, if there is any crash, it should be
investigated.

You called on a decision from the list. Therefore I will wait a bit for
a discussion to happen before reopening the bug.

Please reopen.



I just reopened.


I tried to investigate the bug with ERT, and I discovered that:

1. As far as LaTeX is concerned, it is quite an unusual compilation
failure because it easily causes pdflatex to loop. One then has to kill
pdflatex by hand. (When it does not, the error message can indeed be
obscure and varies.)

2. I once managed to have LyX's thread itself to enter an endless loop
(!). It happened after pdflatex was looping and after I killed pdflatex.
Then I noticed that LyX was still using 100% cpu. I could produce the
attached backtrace for the looping thread. I haven't been able to
reproduce since. I should have thought about taking more backtraces
because I am not sure that we learn much from this one. Notice that this
was with Uwe's patch that already prevents listings in footnotes.


Independently of whether 2. needs to be investigated, this seems like
the kind of behaviour for which we would like LyX to help transparently.
A quick search gives two solutions:
1. the bigfoot package, which redefines \footnote
2. the cprotect package, which provides the command \cprotect to put
before \footnote for this purpose precisely.
Both seem to produce good results.


To summarize, it is more serious than it looks, and there might be the possibility to have a much better situation is the issue is taken seriously.



Thread 2 (Thread 0x7fa17599f700 (LWP 24401)):
#0  0x00000000004bb932 in std::string::find (this=<optimized out>,
    __s=0x7fa160014168 "l.", __pos=<optimized out>, __n=<optimized out>)
    at /usr/include/c++/4.9/bits/basic_string.tcc:749
#1  0x00000000005e8e1d in find (__pos=0, __str="l.", this=0x7fa17599c760)
    at /usr/include/c++/4.9/bits/basic_string.h:1867
#2  contains (b="l.",
a=" }\n \nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nYou can'\nY"...)
    at support/lstrings.h:146
#3  lyx::LaTeX::scanLogFile (this=this@entry=0x7fa17599d4f0, terr=...)
    at LaTeX.cpp:833
#4  0x00000000005f043e in lyx::LaTeX::run (this=this@entry=0x7fa17599d4f0,
    terr=...) at LaTeX.cpp:229
#5  0x000000000055c560 in lyx::Converters::runLaTeX (
    this=this@entry=0x7fa17599e9e0, buffer=..., command="pdflatex ",
    runparams=..., errorList=...) at Converter.cpp:653
#6  0x000000000055e6e1 in lyx::Converters::convert (
    this=this@entry=0x7fa17599e9e0, buffer=buffer@entry=0x9d27300,
    from_file=..., to_file=..., orig_from=..., from_format="pdflatex",
to_format="pdf2", errorList=..., conversionflags=0) at Converter.cpp:408 #7 0x00000000004f7d08 in lyx::Buffer::doExport (this=0x9d27300, target=...,
    put_in_tempdir=<optimized out>, includeall=includeall@entry=false,
    result_file="") at Buffer.cpp:4059
#8  0x00000000004facf5 in lyx::Buffer::doExport (this=<optimized out>,
    target=..., put_in_tempdir=<optimized out>, result_file="")
    at Buffer.cpp:3915
#9  0x00000000004fad31 in lyx::Buffer::doExport (this=<optimized out>,
    target=..., put_in_tempdir=<optimized out>) at Buffer.cpp:3897
#10 0x0000000000ab9a1d in _M_call<lyx::Buffer* const> (
    __args#1=<optimized out>,

__args#0="\320\355\231u\241\177\000\000\246\262\251\000\000\000\000\000\000\255O", '\000' <se r\377\377\377\377\377\377\377\377p\377\377\377\377\377\377\377\377te 13 fois>, "\001\025\305\001\000\000\000\000\000s\322\t\000\000\000\000 \223\263\b\000\000\000\000\000\017\023\204\213*\"\313 \356\231u\241\177\000\000Cc\253\000\000\000\000\000\200R*\001\000\000\000\000\000\017\023\204\213*\"\313\000\000\000\000\000\000\000\000\060\223\263\b\000\000\000\000\310\034\304\001\000\000\000\000_U\273'\374\177\000\000\000\000\200\000\000\000\000\000 \357\t\b\000\000\000\000\001\000\000\000\000\000\000\000p\233<\212\241\177\000\000_U\273'\374\177\000\000\000\000\200\000\000\000\000\000P\356\231u\241\177\000\000\060\357\t\b\000\000\000\000_U\273'\374\177\000\000"..., __ptr=@0x7fa17599ed78: 0x7b8c300,
    this=0x7fa17599ed60) at /usr/include/c++/4.9/tr1/functional:614
#11 operator()<lyx::Buffer* const> (__args#1=<optimized out>,
__args#0="UH\211\345SH\203\354(\350b\300\363\377H\215M\340\017\266 \322H\307E\340X\\*\001dH\213\004%(\000\000\000H\211E\350\061\300\350O \377\377\377H\213]\340H\215{\350H\201\377@\\*\001u\036H\213]\350dH3\034% (\000\000\000u\034H\203\304([]\303\017\037\204\000\000\000\000\000\211E \334\350X\376\374\377\213E\334\353\325\350N~\363\377H\211\303H\213E\340H \215x\350H\201\377@\\*\001t\005\350\065\376\374\377H\211\337荠\363\377 \220f\220f.\017\037\204\000\000\000\000\000UH\211\345AWAVAUATSH\201\354h \v\000\000跿\363\377dH\213\004%(\000\000\000H\211E\310\061\300"...,
    __object=@0x7fa17599ed78: 0x7b8c300, this=0x7fa17599ed60)
    at /usr/include/c++/4.9/tr1/functional:634
#12 __call<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, 0, 1, 2> (__args=..., this=0x7fa17599ed60)
    at /usr/include/c++/4.9/tr1/functional:1190
#13 operator()<const std::basic_string<char, std::char_traits<char>, std::allocator<char> > > (this=0x7fa17599ed60) at /usr/include/c++/4.9/tr1/functional:1243 #14 lyx::frontend::GuiView::GuiViewPrivate::runAndDestroy<std::tr1::_Bind<std::tr1::_Mem_fn<lyx::Buffer::ExportStatus (lyx::Buffer::*)(std::string const&, bool) const> (lyx::Buffer*, std::tr1::_Placeholder<1>, bool)> >(std::tr1::_Bind<std::tr1::_Mem_fn<lyx::Buffer::ExportStatus (lyx::Buffer::*)(std::string const&, bool) const> (lyx::Buffer*, std::tr1::_Placeholder<1>, bool)> const&, lyx::Buffer const*, lyx::Buffer*, std::string const&) (func=..., orig=0x7b8c300, clone=0x9d27300,
    format=...) at GuiView.cpp:3168
#15 0x0000000000a9b2a6 in lyx::frontend::GuiView::GuiViewPrivate::compileAndDestroy (orig=<optimized out>, clone=<optimized out>, format=...) at GuiView.cpp:3182
#16 0x0000000000ab6343 in runFunctor (this=0x8b39320)
    at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:673
#17 QtConcurrent::RunFunctionTask<lyx::Buffer::ExportStatus>::run (
    this=0x8b39320) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
#18 0x00007fa18a3c9b70 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #19 0x00007fa18a3d66ff in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#20 0x00007fa1890396aa in start_thread (arg=0x7fa17599f700)
    at pthread_create.c:333
#21 0x00007fa189869eed in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Reply via email to