I had run into this when prior to 23245f723f
"external/nss: Fix rpath for Linux et al" that call had failed at least for my
Linux ASan+UBSan build, causing UITest_calc_tests to fail with
> ../../lib/cryptohi/sechash.c:443:16: runtime error: member access within null pointer of type 'HASHContext' (aka 'struct HASHContextStr')
> #0 in HASH_Begin at workdir/UnpackedTarball/nss/nss/out/Debug/../../lib/cryptohi/sechash.c:443:16 (instdir/program/libnss3.so +0x3c47eb)
> #1 in comphelper::HashImpl::HashImpl(comphelper::HashType) at comphelper/source/misc/hash.cxx:78:9 (instdir/program/libcomphelper.so +0x149945a)
> #2 in comphelper::Hash::Hash(comphelper::HashType) at comphelper/source/misc/hash.cxx:96:16 (instdir/program/libcomphelper.so +0x1496eb7)
> #3 in vcl::PDFWriterImpl::PDFWriterImpl(vcl::PDFWriter::PDFWriterContext const&, com::sun:⭐:uno::Reference<com::sun:⭐🫘:XMaterialHolder> const&, vcl::PDFWriter&) at vcl/source/gdi/pdfwriter_impl.cxx:1137:9 (instdir/program/libvcllo.so +0x8f20d3c)
because that HASH functionality was used even though initializing it had failed.
Throwing a RuntimeException appears to be effective, even though conceptually
not the best approach: at least doing "Export Directly as PDF" of a fresh Writer
document fails cleanly with an error box "Error saving the document Untitled 1:
General Error. General input/output error."
Change-Id: I07564a7f27a7b44e535556032e0eeb267026f06d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91088
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Helper functionality for implementing UNO components ...anything not generic/mature enough to end up in URE's stable interface at cppuhelper etc.