Building the installer for pumpCompanion fails, with a segfault just after adding a lot of files. This consistently happens in the same place, so it is deterministic, but could be just due to the total size the installer is growing to. Due to the presence of a portable Cygwin layer, such installers are ~1GB .
File: "catman.8.gz" [compress] 1854 bytes
File: "mandb.8.gz" [compress] 3053 bytes
File: Descending to: "../../../pumpCompanion-accessories/parts/ubcp/package_ubcp-core/ubcp/cygwin/usr/share/man/man1/"
./ubiquitous_bash.sh: line 46037: 61114 Segmentation fault (core dumped) makensis -V4 "$scriptLib"/nsis/pumpCompanion.nsi
The git repository and commit for which this error occurs is:
https://github.com/mirage335-gizmos/pumpCompanion/tree/bcb8d94c90e35317e23e576c8598a8f1e081db88
This is the nsi file:
This is the GitHub Actions workflow:
For now, I am attempting to workaround this bug by such means as pinning to Ubuntu version 22 for runners building these installers.
We also experienced this issue. I managed to retrieve a core dump from the GitHub runner, which showed that the stack backtrace at the point of the segfault was:
The crash is at line Source/dirreader.cpp:217:
And appears to be in the assignment operator for std::wstring
I think is being called with dit->d_name equal to "An_Lão_District.shp".
This might be something to do with the multi-byte to wchar_t conversion which takes place in the class constructed by PosixBug_CtoTString().
We have managed to work around this by tightening up the file specification for the File /r command so that it doesn't search the TestData directory where that file is located and this has avoided the problem for us.
Last edit: Michael Lane 2025-05-13
What if you remove the entire
#if defined(_UNICODE) && !defined(_WIN32)block and just leave the MultiByteToWideChar part?