Am Dienstag, 13. März 2018 11:31:19 CET schrieb Jürgen Spitzmüller 
<sp...@lyx.org>:
> 2018-03-13 10:15 GMT+01:00 Kornel Benko <kor...@lyx.org>:
> > I see. The CJK.lyx is different here.
> 
> An the CJK.tex is identical to minde?
> 
> > Compiling now with a clean source tree.
> > 
> >         NOW, with qt4.8.7, I see a crash from tex2lyx.
> > 
> > Changing to qt5.6.1. Compiling.
> > 
> >         No crash. Same problem as before.
> > 
> > But how can tex2lyx be dependent on QT-version?
> 
> No idea. Can you do a backtrace?

Yes.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007f5abf26043c in std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::compare(char const*) const () 
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00000000005b403d in std::operator==<char, std::char_traits<char>, 
std::allocator<char> > (__lhs=" ", 
    __rhs=0x34333231302b2d20 <error: Cannot access memory at address 
0x34333231302b2d20>)
    at /usr/include/c++/5/bits/basic_string.h:4939
#3  0x000000000060c359 in lyx::is_known (str=" ", 
    what=0x72c5a0 <lyx::(anonymous namespace)::known_escaped_chars+64>)
    at /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:84
#4  0x0000000000629a50 in lyx::(anonymous namespace)::parse_environment 
(p=..., os=..., outer=true, 
    last_env="CJK", parent_context=...) at /usr2/src/lyx/lyx-git/src/tex2lyx/
text.cpp:1819
#5  0x000000000063432f in lyx::parse_text (p=..., os=..., flags=8, outer=true, 
context=..., rdelim="")
    at /usr2/src/lyx/lyx-git/src/tex2lyx/text.cpp:3066

Debugging:
$ cd src/tex2lyx/test
$ ./runtests.py /BUILD/BUILDMint18/BuildLyxGitQt4.8.7local-gcc5.4.0/bin/
tex2lyx2.4 ../../../lib/scripts/ /tmp CJK.tex
$ gdb /BUILD/BUILDMint18/BuildLyxGitQt4.8.7local-gcc5.4.0/bin/tex2lyx2.4 core
...
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007f5abf26043c in std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::compare(char const*) const () 
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00000000005b403d in std::operator==<char, std::char_traits<char>, 
std::allocator<char> > (__lhs=" ", 
    __rhs=0x34333231302b2d20 <error: Cannot access memory at address 
0x34333231302b2d20>)
    at /usr/include/c++/5/bits/basic_string.h:4939
#3  0x000000000060c359 in lyx::is_known (str=" ", what=0x72c5a0)
    at /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:84
#4  0x0000000000629a50 in lyx::(anonymous namespace)::parse_environment 
(p=..., os=..., outer=true, 
    last_env="CJK", parent_context=...) at /usr2/src/lyx/lyx-git/src/tex2lyx/
text.cpp:1819
#5  0x000000000063432f in lyx::parse_text (p=..., os=..., flags=8, outer=true, 
context=..., rdelim="")
    at /usr2/src/lyx/lyx-git/src/tex2lyx/text.cpp:3066
#6  0x0000000000610ada in lyx::(anonymous namespace)::tex2lyx (is=..., os=..., 
encoding="UTF-8", 
    outfiledir="/tmp/") at /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:876
...
(gdb) b /usr2/src/lyx/lyx-git/src/tex2lyx/text.cpp:1819
Haltepunkt 1 at 0x629a24: file /usr2/src/lyx/lyx-git/src/tex2lyx/text.cpp, line 
1819.
(gdb) R -roundtrip -copyfiles -f /usr2/src/lyx/lyx-git/src/tex2lyx/test/CJK.tex 
/tmp/CJK.lyx
Starting program: /BUILD/BUILDMint18/BuildLyxGitQt4.8.7local-gcc5.4.0/bin/
tex2lyx2.4 -roundtrip -copyfiles -f /usr2/src/lyx/lyx-git/src/tex2lyx/test/
CJK.tex /tmp/CJK.lyx
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Overwriting existing file /tmp/CJK.lyx

Breakpoint 1, lyx::(anonymous namespace)::parse_environment (p=..., os=..., 
outer=true, last_env="CJK", 
    parent_context=...) at /usr2/src/lyx/lyx-git/src/tex2lyx/text.cpp:1819
1819                                    if (snip == "\\" || is_known(snip, 
known_escaped_chars))
(gdb) p known_escaped_chars
$1 = {0x72c550 "&", 0x72c552 "_", 0x72c554 "$", 0x72c556 "%", 0x72c558 "#", 
0x72be53 "^", 0x72c55a "{", 
  0x72c55c "}"}

(gdb) b /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:84
Haltepunkt 3 at 0x60c343: file /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp, 
line 84.
(gdb) c
Continuing.

Breakpoint 3, lyx::is_known (str=" ", what=0x72c560 <lyx::(anonymous 
namespace)::known_escaped_chars>)
    at /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:84
84                      if (str == *what)
(gdb) p *what
$2 = 0x72c550 "&"
(gdb) c
Continuing.

Breakpoint 3, lyx::is_known (str=" ", what=0x72c590 <lyx::(anonymous 
namespace)::known_escaped_chars+48>)
    at /usr2/src/lyx/lyx-git/src/tex2lyx/tex2lyx.cpp:84
84                      if (str == *what)
...
(gdb) p *what
$9 = 0x72c55c "}"
(gdb) c
Continuing.

Breakpoint 3, lyx::is_known (str=" ", what=0x72c5a0) at /usr2/src/lyx/lyx-git/
src/tex2lyx/tex2lyx.cpp:84
84                      if (str == *what)
(gdb) p *what
$10 = 0x34333231302b2d20 <error: Cannot access memory at address 
0x34333231302b2d20>

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to