On 25/08/2020 04:26, ci@xxxxxxxxxxxxxxx wrote:
UBSAN Linux Build - Build # 1738 - Failure: Identified problems: * cppunit failure: the cppunit test CppunitTest_sc_subsequent_export_test failed * Indication 1: <https://ci.libreoffice.org//job/lo_ubsan/1738/consoleFull#-882933039d893063f-7f3d-4b7e-b56f-4e0f225817cd>
The failure is
/sc/source/filter/excel/xlescher.cxx:116:43: runtime error: -764.94 is outside the range of representable values of type 'unsigned int' #0 0x2b30c609bf3b in (anonymous namespace)::lclGetRowFromY(ScDocument const&, short, unsigned int&, unsigned int&, unsigned int, unsigned int, long&, long, double) /sc/source/filter/excel/xlescher.cxx:116:43 #1 0x2b30c609b1ff in XclObjAnchor::SetRect(XclRoot const&, short, tools::Rectangle const&, MapUnit) /sc/source/filter/excel/xlescher.cxx:174:5 #2 0x2b30c4e4c027 in XclExpDffSheetAnchor::ImplCalcAnchorRect(tools::Rectangle const&, MapUnit) /sc/source/filter/excel/xeescher.cxx:308:14 #3 0x2b30c4e4b4f4 in XclExpDffAnchorBase::WriteData(EscherEx&, tools::Rectangle const&) /sc/source/filter/excel/xeescher.cxx:277:5 #4 0x2b306e07562c in EscherExHostAppData::WriteClientAnchor(EscherEx&, tools::Rectangle const&) /include/filter/msfilter/escherex.hxx:958:51 #5 0x2b306e14480f in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) /filter/source/msfilter/eschesdo.cxx:677:28 #6 0x2b306e14cabe in ImplEESdrWriter::ImplWritePage(EscherSolverContainer&) /filter/source/msfilter/eschesdo.cxx:827:13 #7 0x2b306e14e881 in ImplEESdrWriter::ImplWriteCurrentPage() /filter/source/msfilter/eschesdo.cxx:909:5 #8 0x2b306e14ed51 in EscherEx::AddSdrPage(SdrPage const&) /filter/source/msfilter/eschesdo.cxx:922:28 #9 0x2b30c4e89c21 in XclExpObjectManager::ProcessDrawing(SdrPage const*) /sc/source/filter/excel/xeescher.cxx:1807:21 #10 0x2b30c4831460 in ExcTable::FillAsTableXml() /sc/source/filter/excel/excdoc.cxx:630:47 #11 0x2b30c4837c43 in ExcDocument::ReadDoc() /sc/source/filter/excel/excdoc.cxx:747:23 #12 0x2b30c5463fac in XclExpXmlStream::exportDocument() /sc/source/filter/excel/xestream.cxx:1103:18 #13 0x2b3070c004e4 in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:492:49 #14 0x2b30c670399c in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:235:27 #15 0x2b3091e831fb in SfxObjectShell::ExportTo(SfxMedium&) /sfx2/source/doc/objstor.cxx:2451:25 #16 0x2b3091e7237c in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1543:19 #17 0x2b3091e856ff in SfxObjectShell::DoSaveAs(SfxMedium&) /sfx2/source/doc/objstor.cxx:1922:17 #18 0x2b308e173ff9 in ScBootstrapFixture::saveAndReload(ScDocShell*, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags) /sc/qa/unit/helper/qahelper.cxx:677:13 #19 0x2b308e17632f in ScBootstrapFixture::saveAndReload(ScDocShell*, int) /sc/qa/unit/helper/qahelper.cxx:699:28 #20 0x2b3067b71c92 in ScExportTest::testTdf135828_Shape_Rect() /sc/qa/unit/subsequent_export-test.cxx:5289:28 #21 0x2b3067c7e164 in void std::__invoke_impl<void, void (ScExportTest::*&)(), ScExportTest*&>(std::__invoke_memfun_deref, void (ScExportTest::*&)(), ScExportTest*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 #22 0x2b3067c7dd3e in std::__invoke_result<void (ScExportTest::*&)(), ScExportTest*&>::type std::__invoke<void (ScExportTest::*&)(), ScExportTest*&>(void (ScExportTest::*&)(), ScExportTest*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 #23 0x2b3067c7db82 in void std::_Bind<void (ScExportTest::* (ScExportTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 #24 0x2b3067c7d7e2 in void std::_Bind<void (ScExportTest::* (ScExportTest*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 #25 0x2b3067c7c871 in std::_Function_handler<void (), std::_Bind<void (ScExportTest::* (ScExportTest*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 #26 0x2b3067bc65c1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 #27 0x2b3067c7bbb4 in CppUnit::TestCaller<ScExportTest>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 #28 0x2b3020c1b60a in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 #29 0x2b303b893937 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 #30 0x2b3020becc97 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #31 0x2b302ffb9007 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 #32 0x2b3020becc97 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #33 0x2b302cb300c8 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:61:16 #34 0x2b3020becc97 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #35 0x2b3020b83fd4 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 #36 0x2b3020becc97 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #37 0x2b3020be66e7 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 #38 0x2b3020c85ac9 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 #39 0x2b3020c19c71 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 #40 0x2b3020c1daa2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 #41 0x2b3020c1cc9a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 #42 0x2b3020c1daa2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 #43 0x2b3020c1cc9a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 #44 0x2b3020cb365e in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 #45 0x2b3020c8452e in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 #46 0x2b3020cb45bb in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 #47 0x4fedcd in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:316:20 #48 0x4fb4f0 in sal_main() /sal/cppunittester/cppunittester.cxx:466:20 #49 0x4fa4de in main /sal/cppunittester/cppunittester.cxx:373:1 #50 0x2b30228bb504 in __libc_start_main (/lib64/libc.so.6+0x22504) #51 0x425ed4 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425ed4)
This is apparently caused by <https://git.libreoffice.org/core/+/5e8875780d665b7ae0fee1a053b5ce78ec513f69%5E!/> "tdf#135828 XLSX shape export: fix distortion of rotated shapes" adding ScExportTest::testTdf135828_Shape_Rect, but it may well be a pre-existing issue that only happens to get triggered by that test.
Debugging this a bit, I found that negative values start to appear in ImplEESdrWriter::ImplWriteShape (filter/source/msfilter/eschesdo.cxx, frame #5), where
if( rObj.GetAngle() ) ImplFlipBoundingBox( rObj, aPropOpt );
(lines 665--666) turns rObj.GetRect() from 463x3130@(3051,87) to 463x3130@(4396,-898), as rObj.GetAngle() returns 28306. That -898 then gets passed down to lclGetRowFromY (sc/source/filter/excel/xlescher.cxx, frame #0) as nY. No idea where and how to fix things, though.
_______________________________________________ LibreOffice mailing list LibreOffice@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/libreoffice