Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3.0: lv2lint crashes on lv2 plugin #34

Closed
dvzrv opened this issue Jul 19, 2022 · 4 comments
Closed

0.3.0: lv2lint crashes on lv2 plugin #34

dvzrv opened this issue Jul 19, 2022 · 4 comments

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Jul 19, 2022

When trying to build 0.3.0 as a package for Arch Linux I was not able to succesfully run lv2lint on the resulting plugin.

I build as follows:

  autoreconf -fiv
  ./configure \
    --prefix=/usr \
    --enable-shared \
    --disable-static \
    --disable-static-cxx
  make

and then run lv2lint on the plugin in the build directory:

LD_LIBRARY_PATH="$pkgname-$pkgver/lib/.libs/:$LD_LIBRARY_PATH" lv2lint -Mpack -I $pkgname-$pkgver/lv2 "http://spectmorph.org/plugins/liquidsfz"
lv2lint 0.16.2
Copyright (c) 2016-2021 Hanspeter Portner ([email protected])
Released under Artistic License 2.0 by Open Music Kontrollers
/usr/include/c++/12.1.0/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = char; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
/startdir/PKGBUILD: line 49:  5539 Aborted                 (core dumped) LD_LIBRARY_PATH="$pkgname-$pkgver/lib/.libs/:$LD_LIBRARY_PATH" lv2lint -Mpack -I $pkgname-$pkgver/lv2 "http://spectmorph.org/plugins/liquidsfz"
@dvzrv
Copy link
Contributor Author

dvzrv commented Jul 19, 2022

FWIW, the release can not be built without #35 and 82ce2bb using gcc >= 12.
Building pull requests and this project in general against several (especially newer) gcc versions and testing the resulting binaries (e.g. with lv2lint in the case of the lv2 plugin) in CI would be much appreciated, as it leads to less friction upon upgrades for downstreams.

swesterfeld added a commit that referenced this issue Jul 20, 2022
When compiled with -D_GLIBCXX_ASSERTIONS, this triggers an assertion.
Possibly related to issues #27 and #34.

Signed-off-by: Stefan Westerfeld <[email protected]>
@swesterfeld
Copy link
Owner

swesterfeld commented Jul 20, 2022

I was able to reproduce the crash if I build with -D_GLIBCXX_ASSERTIONS enabled. Can you please re-test if it still crashes for you if you build from github master? The commit 01f0eb8 should fix it (at least with it I cannot reproduce the crash).

@dvzrv
Copy link
Contributor Author

dvzrv commented Jul 21, 2022

Thanks, that seems to fix it!

@swesterfeld
Copy link
Owner

Ok great, I'll close the issue. I'll need to make a new liquidsfz release as soon as possible, since this bug is probably not only affecting Arch Linux. I also found another bug in 0.3.0 which can cause crashes, so basically once released everyone should be using 0.3.1.

As for CI - good idea. I have scripts that build on gcc:latest and archlinux now, both with gcc and clang and run lv2lint. Also there is a new program called testsynth, which contains a few tests that test the liquidsfz Synth class directly, so this can catch problems in the synthesis code that lv2lint can't see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants