Under Linux in version 4.01, the attached file layout.ps
(created by xkbprint
) causes a crash:
❯ /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.01/src/pstoedit -f plot-svg layout.ps layout-test.svg
pstoedit: version 4.01 / DLL interface 108 (release build - g++ 13.2.1 20230801 - 64-bit) : Copyright (C) 1993 - 2024 Wolfgang Glunz
/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = const char*; _Alloc = std::allocator<const char*>; reference = const char*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
zsh: IOT instruction (core dumped) /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.01/src/pstoedit -f
This does not happen in version 4.00:
❯ /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.00/src/pstoedit -f plot-svg layout.ps layout-test.svg
pstoedit: version 4.00 / DLL interface 108 (release build - g++ 13.2.1 20230801 - 64-bit) : Copyright (C) 1993 - 2023 Wolfgang Glunz
libplot: cannot retrieve font "IsoKeyCaps", using default "Helvetica"
I zipped the layout.ps input file because GitHub tells me file type ps
is not supported. For full reference, I am also attaching the correct output layout-test.svg
file generated by version 4.00.
The binary is built as specified in this Arch PKGBUILD
file:
pkgname=pstoedit-nomagick
pkgver=4.00
pkgrel=1
pkgdesc='Translates PS/PDF graphics to other vector formats (no ImageMagick dependency)'
arch=('x86_64')
url='http://www.pstoedit.net/'
license=('GPL-2.0-or-later')
depends=('gd' 'ghostscript' 'ming' 'libemf' 'libzip' 'plotutils' 'zlib')
provides=('pstoedit')
conflicts=('pstoedit')
source=("https://sourceforge.net/projects/pstoedit/files/pstoedit/${pkgver}/pstoedit-${pkgver}.tar.gz")
sha256sums=('075a7daeaba75f3d1922beae680cc3662bb373c7e3826282229fda2733ac62ea')
build() {
cd "pstoedit-${pkgver}"
./configure \
--prefix='/usr'\
--enable-static='no' \
--enable-shared='yes' \
--with-emf \
--without-magick \
--with-libplot \
--with-swf \
--with-pptx
make
}
check() {
make -C "pstoedit-${pkgver}" check
}
package() {
make -C "pstoedit-${pkgver}" DESTDIR="$pkgdir" install
}
Since I am testing both versions on the same system, it is highly unlikely that the issue is due to an incorrect or missing dependency in the Arch PKGCONFIG, given that version 4.00 works while version 4.01 does not.
For the full picture: The original version of this PKGBUILD included two patches to the code, which have been removed in version 4.01. I built version 4.00 without these patches exactly like version 4.01, using the above PKGBUILD file, and it still works. Hence, the only remaining difference between the two versions I am comparing is indeed the source code of pstoedit.
layout.ps.zip