Am Sat, 18 May 2024 12:12:56 +0200
schrieb Kornel Benko <kor...@lyx.org>:

> Am Fri, 17 May 2024 15:21:10 +0200
> schrieb Kornel Benko <kor...@lyx.org>:
> 
> > > Did you try to run LyX under valgrind? It can be very useful in such 
> > > cases.    
> > 
> > Will try later ... now grandpa duties
> >   
> > > JMarc    
> > 
> >     Kornel  
> 
> Ok there are plenty of errors. Using
>       # valgrind --track-origins=yes -s --log-file=xx bin/lyx2.5 \
> .../doc/es/UserGuide.23.lyx
> 
> the created file xx is
>       # ls -l xx 503595
>       # wc xx
>               3360  30798 503595 xx
> Too big to post, I suppose.
> 
> The output relevant to the runtime error is
> 
> ==5546== Conditional jump or move depends on uninitialised value(s)
> ==5546==    at 0x4705C0F: lyx::Tabular::updateIndexes() 
> (InsetTabular.cpp:1070)
> ==5546==    by 0x46FC58D: lyx::Tabular::init(lyx::Buffer*, unsigned long, 
> unsigned long)
> (InsetTabular.cpp:786) ==5546==    by 0x46FB7EE: 
> lyx::Tabular::Tabular(lyx::Buffer*,
> unsigned long, unsigned long) (InsetTabular.cpp:762) ==5546==    by 0x474F087:
> lyx::InsetTabular::InsetTabular(lyx::Buffer*, unsigned long, unsigned long)
> (InsetTabular.cpp:4495) ==5546==    by 0x3E78AD4: 
> lyx::readInset(lyx::support::Lexer&,
> lyx::Buffer*) (factory.cpp:652) ==5546==    by 0x3C73DB6:
> lyx::Text::readParToken(lyx::Paragraph&, lyx::support::Lexer&,
> std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
> > const&,
> lyx::Font&, lyx::Change&, lyx::ErrorList&) (Text.cpp:476) ==5546==    by 
> 0x3C79085:
> lyx::Text::readParagraph(lyx::Paragraph&, lyx::support::Lexer&, 
> lyx::ErrorList&)
> (Text.cpp:633) ==5546==    by 0x3C920B2: lyx::Text::read(lyx::support::Lexer&,
> lyx::ErrorList&, lyx::InsetText*) (Text.cpp:2114) ==5546==    by 0x47D74E3:
> lyx::InsetText::read(lyx::support::Lexer&) (InsetText.cpp:172) ==5546==    by 
> 0x4412EEB:
> lyx::InsetCollapsible::read(lyx::support::Lexer&) (InsetCollapsible.cpp:161) 
> ==5546==
> by 0x447C4BD: lyx::InsetFloat::read(lyx::support::Lexer&) 
> (InsetFloat.cpp:330) ==5546==
>  by 0x3E79B33: lyx::readInset(lyx::support::Lexer&, lyx::Buffer*) 
> (factory.cpp:705)
> ==5546==  Uninitialised value was created by a heap allocation
> ==5546==    at 0x8EE8013: operator new(unsigned long) 
> (vg_replace_malloc.c:422)
> ==5546==    by 0x3E78A85: lyx::readInset(lyx::support::Lexer&, lyx::Buffer*)
> (factory.cpp:652)
> ==5546==    by 0x3C73DB6: lyx::Text::readParToken(lyx::Paragraph&, 
> lyx::support::Lexer&,
> std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
> > const&,
> lyx::Font&, lyx::Change&, lyx::ErrorList&) (Text.cpp:476) ==5546==    by 
> 0x3C79085:
> lyx::Text::readParagraph(lyx::Paragraph&, lyx::support::Lexer&, 
> lyx::ErrorList&)
> (Text.cpp:633) ==5546==    by 0x3C920B2: lyx::Text::read(lyx::support::Lexer&,
> lyx::ErrorList&, lyx::InsetText*) (Text.cpp:2114)
> ==5546==    by 0x47D74E3: lyx::InsetText::read(lyx::support::Lexer&) 
> (InsetText.cpp:172)
> ==5546==    by 0x4412EEB: lyx::InsetCollapsible::read(lyx::support::Lexer&)
> (InsetCollapsible.cpp:161)
> ==5546==    by 0x447C4BD: lyx::InsetFloat::read(lyx::support::Lexer&)
> (InsetFloat.cpp:330) ==5546==    by 0x3E79B33: 
> lyx::readInset(lyx::support::Lexer&,
> lyx::Buffer*) (factory.cpp:705)
> ==5546==    by 0x3C73DB6: lyx::Text::readParToken(lyx::Paragraph&, 
> lyx::support::Lexer&,
> std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
> > const&,
> lyx::Font&, lyx::Change&, lyx::ErrorList&) (Text.cpp:476) ==5546==    by 
> 0x3C79085:
> lyx::Text::readParagraph(lyx::Paragraph&, lyx::support::Lexer&, 
> lyx::ErrorList&)
> (Text.cpp:633) ==5546==    by 0x3C920B2: lyx::Text::read(lyx::support::Lexer&,
> lyx::ErrorList&, lyx::InsetText*) (Text.cpp:2114)
> ==5546==
> ...
> 
> The last line of xx states
> ==5546== ERROR SUMMARY: 164722 errors from 56 contexts (suppressed: 0 from 0)
> 
> What do you need me to do now?
> 
>       Kornel
> 
> 

Test passes after the attached patch.

        Kornel
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index f6939c6eff..f2df88d501 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -897,11 +897,11 @@ public:
 	//
 	// for long tabulars
 	///
 	HAlignment longtabular_alignment;
 	//
-	bool is_long_tabular;
+	bool is_long_tabular = false;
 	/// endhead data
 	ltType endhead;
 	/// endfirsthead data
 	ltType endfirsthead;
 	/// endfoot data

Attachment: pgpxH59kMqY8O.pgp
Description: Digitale Signatur von OpenPGP

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

Reply via email to