On Thu, 14 Sep 2023 09:16:38 +0200 Stephan Bergmann <sbergman@xxxxxxxxxx> wrote: > On 9/13/23 23:17, Dan Horák wrote: > > ... > > [New Thread 0x7fffcb38e7a0 (LWP 2839768)] > > [Thread 0x7fffcb38e7a0 (LWP 2839768) exited] > > warn:legacy.osl:2838662:2838662:oox/source/helper/storagebase.cxx:67: StorageBase::StorageBase - missing base input stream > > Test::testDateFormFieldCharacterFormatting finished in: 5248ms > > [_RUN_____] testListLabelPDFExport::TestBody > > private:factory/swriter: > > > > Thread 1 "cppunittester" received signal SIGSEGV, Segmentation fault. > > 0x00007fffd7c16188 in testListLabelPDFExport::TestBody (this=0x10e6d640) at /home/sharkcz/projects/libreoffice/sw/qa/extras/globalfilter/globalfilter.cxx:1290 > > 1290 CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount()); > > (gdb) where > > #0 0x00007fffd7c16188 in testListLabelPDFExport::TestBody() (this=0x10e6d640) at /home/sharkcz/projects/libreoffice/sw/qa/extras/globalfilter/globalfilter.cxx:1290 > > #1 0x00007fffd7c9b4a8 in std::__invoke_impl<void, void (testListLabelPDFExport::*&)(), testListLabelPDFExport*&>(std::__invoke_memfun_deref, void (testListLabelPDFExport::*&)(), testListLabelPDFExport*&) (__f=@0x10e6dba0: (void (testListLabelPDFExport::*)(testListLabelPDFExport * const)) 0x7fffd7c155d8 <testListLabelPDFExport::TestBody()>, __t=@0x10e6dbb0: 0x10e6d640) > > at /usr/include/c++/13/bits/invoke.h:74 > > ... > > > > but I think I see the problem, pPdfDocument is NULL, which is returned > > by parsePDFExport(), because we don't build with pdfium, I suppose. > > I can prepare a patch to run the test section only when non-NULL. > > I'd suggest to rather make execution of the test dependent on > $(ENABLE_PDFIUM), or on PDFIUM in $(BUILD_TYPE) (cf. configure.ac). > (Otherwise, you would silently hide errors when parsePDFExport() > erroneously returns null.) if I read https://opengrok.libreoffice.org/xref/core/test/source/unoapi_test.cxx?r=58ab2f00#213 right, then parsePDFExport() can return NULL only when built without pdfium. There is an assert checking NULL value returned from pPDFium->openDocument(). Thus we shouldn't be hiding anything, I believe. > But I wonder why all the other tests that call parsePDFExport() don't > appear to be conditional on $(ENABLE_PDFIUM), either. > Dan