On Tue, Apr 22, 2025 at 12:46:13PM +0200, Scott Kostyshak wrote:
> On Tue, Apr 22, 2025 at 12:33:56PM +0200, Jean-Marc Lasgouttes wrote:
> > Le 22 avril 2025 11:49:32 GMT+02:00, Scott Kostyshak <skost...@lyx.org> a 
> > écrit :
> > >On Mon, Apr 21, 2025 at 10:54:17AM +0000, Jean-Marc Lasgouttes wrote:
> > >> commit 0ed7820843d2b4dd09240d6e6145ddb013d090b8
> > >> Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
> > >> Date:   Mon Apr 21 12:53:34 2025 +0200
> > >> 
> > >>     Fix handling of \int with external math tools
> > >> ---
> > >>  src/mathed/MathExtern.cpp | 7 +++----
> > >>  1 file changed, 3 insertions(+), 4 deletions(-)
> > >> 
> > >> diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
> > >> index caa05aeadc..c8c5acf00e 100644
> > >> --- a/src/mathed/MathExtern.cpp
> > >> +++ b/src/mathed/MathExtern.cpp
> > >> @@ -292,7 +292,7 @@ bool testString(MathAtom const & at, char const * 
> > >> const str)
> > >>  
> > >>  bool testSymbol(MathAtom const & at, docstring const & name)
> > >>  {
> > >> -        return at->asSymbolInset() && at->asSymbolInset()->name() == 
> > >> name;
> > >> +        return (at->asSymbolInset() || at->asMacro()) && at->name() == 
> > >> name;
> > >>  }
> > >>  
> > >>  
> > >> @@ -373,9 +373,8 @@ void splitScripts(MathData & ar)
> > >>  
> > >>                  if (script->nuc().size() == 1) {
> > >>                          // leave alone sums and integrals
> > >> -                        InsetMathSymbol const * sym =
> > >> -                                script->nuc().front()->asSymbolInset();
> > >> -                        if (sym && (sym->name() == "sum" || sym->name() 
> > >> == "int"))
> > >> +                        MathAtom const & atom = script->nuc().front();
> > >> +                        if (testSymbol(atom, "sum") || testSymbol(atom, 
> > >> "int"))
> > >>                                  continue;
> > >>                  }
> > >
> > >I think this commit broke something with the XHTML export.
> > >
> > >The following ctest now fails:
> > >
> > >  export/doc/UserGuide_xhtml (Failed)
> > >
> > >I don't know what the specific error is but I can figure it out and give
> > >more details tomorrow when I'm at my computer with the ctests set up.
> > >
> > >Scott
> > 
> > Thanks for the heads up. This is just an html export, right ?
> 
> Yes, correct.

The following gives a SIGSEGV:

  lyx -e xhtml UserGuide.lyx

Can you reproduce? I attach a backtrace just in case.

Scott
Program received signal SIGSEGV, Segmentation fault.
std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, 
std::allocator<wchar_t> >::_M_data (this=0x80)
    at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223
223           { return _M_dataplus._M_p; }
(gdb) bt
#0  std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, 
std::allocator<wchar_t> >::_M_data (this=0x80)
    at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223
#1  0x00005555556dca25 in std::__cxx11::basic_string<wchar_t, 
std::char_traits<wchar_t>, std::allocator<wchar_t> >::begin (this=0x80)
    at 
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:965
#2  0x00005555561dd6a9 in lyx::operator== (l=<error reading variable: Cannot 
access memory at address 0x88>, r=0x555556225e42 "mathord")
    at /home/scott/lyxbuilds/master-master/repo/src/support/docstring.cpp:175
#3  0x0000555555b9a9f9 in lyx::latexkeys::mathml_type[abi:cxx11]() const 
(this=0x0) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/MathParser.cpp:2148
#4  0x0000555555c0165d in lyx::InsetMathSymbol::mathmlize (this=0x7ffffffee1b8, 
ms=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/InsetMathSymbol.cpp:162
#5  0x0000555555bdcb15 in lyx::InsetMathExInt::mathmlize (this=0x55555794b3f0, 
ms=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/InsetMathExInt.cpp:142
#6  0x0000555555bb61d9 in lyx::operator<< (ms=..., at=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/MathStream.cpp:651
#7  0x0000555555b825b7 in lyx::mathmlize (dat=..., ms=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/MathExtern.cpp:1643
#8  0x0000555555bb620d in lyx::operator<< (ms=..., ar=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/MathStream.cpp:658
#9  0x0000555555b30a63 in lyx::InsetMathHull::mathmlize (this=0x555556fbd1a0, 
ms=...) at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/InsetMathHull.cpp:2569
#10 0x0000555555b32d1d in lyx::InsetMathHull::xhtml[abi:cxx11](lyx::XMLStream&, 
lyx::OutputParams const&) const (this=0x555556fbd1a0, xs=..., op=...)
    at 
/home/scott/lyxbuilds/master-master/repo/src/mathed/InsetMathHull.cpp:2680
#11 0x0000555555983b5d in 
lyx::Paragraph::simpleLyXHTMLOnePar[abi:cxx11](lyx::Buffer const&, 
lyx::XMLStream&, lyx::OutputParams const&, lyx::Font const&, bool, bool, long) 
const (
    this=0x55555709aa70, buf=..., xs=..., runparams=..., outerfont=..., 
start_paragraph=false, close_paragraph=false, initial=0)
    at /home/scott/lyxbuilds/master-master/repo/src/Paragraph.cpp:4227
#12 0x0000555555aefdbd in lyx::(anonymous namespace)::makeParagraphs (buf=..., 
xs=..., runparams=..., text=..., pbegin=..., pend=...)
    at /home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:366
#13 0x0000555555aed3ff in lyx::xhtmlParagraphs (text=..., buf=..., xs=..., 
runparams=...) at 
/home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:728
#14 0x0000555555dc4ae7 in 
lyx::InsetText::insetAsXHTML[abi:cxx11](lyx::XMLStream&, lyx::OutputParams 
const&, lyx::InsetText::XHTMLOptions) const (this=0x55555709a990, xs=..., 
rp=..., 
    opts=lyx::InsetText::JustText) at 
/home/scott/lyxbuilds/master-master/repo/src/insets/InsetText.cpp:913
#15 0x0000555555d98e90 in 
lyx::InsetTableCell::xhtml[abi:cxx11](lyx::XMLStream&, lyx::OutputParams 
const&) const (this=0x55555709a990, xs=..., rp=...)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.cpp:4889
#16 0x0000555555d9247b in lyx::Tabular::xmlRow[abi:cxx11](lyx::XMLStream&, 
unsigned long, lyx::OutputParams const&, bool, lyx::Tabular::XmlOutputFormat, 
lyx::BufferParams::TableOutput) const (this=0x555557097ed0, xs=..., row=2, 
runparams=..., header=false, 
output_format=lyx::Tabular::XmlOutputFormat::XHTML, 
docbook_table_output=lyx::BufferParams::HTMLTable)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.cpp:4257
#17 0x0000555555d933f3 in lyx::Tabular::xmlBody (this=0x555557097ed0, xs=..., 
runparams=..., output_format=lyx::Tabular::XmlOutputFormat::XHTML)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.cpp:4329
#18 0x0000555555d94b1e in lyx::Tabular::xhtml[abi:cxx11](lyx::XMLStream&, 
lyx::OutputParams const&) const (this=0x555557097ed0, xs=..., runparams=...)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.cpp:4424
#19 0x0000555555da7054 in lyx::InsetTabular::xhtml[abi:cxx11](lyx::XMLStream&, 
lyx::OutputParams const&) const (this=0x555557097ec0, xs=..., rp=...)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetTabular.cpp:6895
#20 0x0000555555983b5d in 
lyx::Paragraph::simpleLyXHTMLOnePar[abi:cxx11](lyx::Buffer const&, 
lyx::XMLStream&, lyx::OutputParams const&, lyx::Font const&, bool, bool, long) 
const (
    this=0x555557096c10, buf=..., xs=..., runparams=..., outerfont=..., 
start_paragraph=true, close_paragraph=true, initial=0)
    at /home/scott/lyxbuilds/master-master/repo/src/Paragraph.cpp:4227
#21 0x0000555555aefdbd in lyx::(anonymous namespace)::makeParagraphs (buf=..., 
xs=..., runparams=..., text=..., pbegin=..., pend=...)
    at /home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:366
#22 0x0000555555aed3ff in lyx::xhtmlParagraphs (text=..., buf=..., xs=..., 
runparams=...) at 
/home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:728
#23 0x0000555555dc4ae7 in 
lyx::InsetText::insetAsXHTML[abi:cxx11](lyx::XMLStream&, lyx::OutputParams 
const&, lyx::InsetText::XHTMLOptions) const (this=0x555557096cc0, xs=..., 
rp=..., 
    opts=6) at 
/home/scott/lyxbuilds/master-master/repo/src/insets/InsetText.cpp:913
#24 0x0000555555c7007e in lyx::InsetFloat::xhtml[abi:cxx11](lyx::XMLStream&, 
lyx::OutputParams const&) const (this=0x555557096cc0, xs=..., rp=...)
    at /home/scott/lyxbuilds/master-master/repo/src/insets/InsetFloat.cpp:370
#25 0x0000555555983b5d in 
lyx::Paragraph::simpleLyXHTMLOnePar[abi:cxx11](lyx::Buffer const&, 
lyx::XMLStream&, lyx::OutputParams const&, lyx::Font const&, bool, bool, long) 
const (
    this=0x555557094f30, buf=..., xs=..., runparams=..., outerfont=..., 
start_paragraph=true, close_paragraph=true, initial=0)
    at /home/scott/lyxbuilds/master-master/repo/src/Paragraph.cpp:4227
#26 0x0000555555aefdbd in lyx::(anonymous namespace)::makeParagraphs (buf=..., 
xs=..., runparams=..., text=..., pbegin=..., pend=...)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:366
#27 0x0000555555aed3ff in lyx::xhtmlParagraphs (text=..., buf=..., xs=..., 
runparams=...) at 
/home/scott/lyxbuilds/master-master/repo/src/output_xhtml.cpp:728
#28 0x00005555557250ad in lyx::Buffer::writeLyXHTMLSource (this=0x55555693a4e0, 
os=..., runparams=..., output=lyx::Buffer::FullSource)
    at /home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:2372
#29 0x0000555555723847 in lyx::Buffer::makeLyXHTMLFile (this=0x55555693a4e0, 
fname=..., runparams=...) at 
/home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:2261
#30 0x00005555557322df in lyx::Buffer::doExport (this=0x55555693a4e0, 
target="xhtml", put_in_tempdir=false, includeall=false, result_file="")
    at /home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:4630
#31 0x000055555572af70 in lyx::Buffer::doExport (this=0x55555693a4e0, 
target="xhtml", put_in_tempdir=false, result_file="") at 
/home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:4509
#32 0x000055555572ae74 in lyx::Buffer::doExport (this=0x55555693a4e0, 
target="xhtml", put_in_tempdir=false) at 
/home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:4491
#33 0x0000555555728cb4 in lyx::Buffer::dispatch (this=0x55555693a4e0, func=..., 
dr=...) at /home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:2981
#34 0x000055555572882e in lyx::Buffer::dispatch (this=0x55555693a4e0, 
command="buffer-export xhtml", result=...) at 
/home/scott/lyxbuilds/master-master/repo/src/Buffer.cpp:2945
#35 0x000055555592d931 in lyx::LyX::execWithoutGui (this=0x7fffffffc990, 
argc=@0x7fffffffc9a8: 2, argv=0x7fffffffcad8) at 
/home/scott/lyxbuilds/master-master/repo/src/LyX.cpp:543
#36 0x0000555555937c35 in lyx::LyXConsoleApp::doExec (this=0x7fffffffc818) at 
/home/scott/lyxbuilds/master-master/repo/src/LyX.cpp:226
#37 0x00005555561a99ba in lyx::support::ConsoleApplicationPrivate::doExec 
(this=0x555556610ce0) at 
/home/scott/lyxbuilds/master-master/repo/src/support/ConsoleApplicationPrivate.h:61
#38 0x00005555561a95e1 in 
lyx::support::ConsoleApplicationPrivate::qt_static_metacall (_o=0x555556610ce0, 
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x555556611288)
    at 
/home/scott/lyxbuilds/master-master/CMakeBuild/src/support/moc_ConsoleApplicationPrivate.cpp:73
#39 0x00007ffff6b06343 in QObject::event(QEvent*) () from 
/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007ffff6ad80e6 in QCoreApplication::notifyInternal2(QObject*, QEvent*) 
() from /lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007ffff6adb94b in QCoreApplicationPrivate::sendPostedEvents(QObject*, 
int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007ffff6b35c0f in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff67145b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff6773717 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff6713a53 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff6b35279 in 
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () 
from /lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007ffff6ad6a7b in 
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from 
/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007ffff6adf3e8 in QCoreApplication::exec() () from 
/lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00005555561a9993 in lyx::support::ConsoleApplicationPrivate::execute 
(this=0x555556610ce0) at 
/home/scott/lyxbuilds/master-master/repo/src/support/ConsoleApplicationPrivate.h:56
#50 0x00005555561a9579 in lyx::support::ConsoleApplication::exec 
(this=0x7fffffffc818) at 
/home/scott/lyxbuilds/master-master/repo/src/support/ConsoleApplication.cpp:38
#51 0x000055555592765a in lyx::LyX::exec (this=0x7fffffffc990, 
argc=@0x7fffffffc9a8: 2, argv=0x7fffffffcad8) at 
/home/scott/lyxbuilds/master-master/repo/src/LyX.cpp:333
#52 0x0000555555ac4133 in main (argc=2, argv=0x7fffffffcad8) at 
/home/scott/lyxbuilds/master-master/repo/src/main.cpp:55
(gdb) 

Attachment: signature.asc
Description: PGP signature

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

Reply via email to