Closed treapster closed 10 months ago
Hi, thanks, if will check if I can reproduce. If this happens in 3.2, than also should in 3.3, but is good that not in 3.3 only because 3.3 has a lot of changes in the core DSP. This crash I think is related to GUI part only, I will check.
Thanks for a quick reply! The weird part is that the only place where std::vector\<int> comes up in the codebase is percussionIdList in GeonkickApi, at least according to github search, and all accesses to it seem to be properly checked. But i hope you'll be able to reproduce and get a proper stacktrace pointing at the right spot.
@treapster Tested on Manjaro (latest release) and Geonkick (3.2.0) on Ardour (8.2.0), all from repository. Even using a MIDI sequence of notes in a loop and at the same time switching the kits I cannot reproduce the crash. Tested on Ubuntu, and I cannot reproduce. Also, if I download the GNU/Linux binaries from the release Geonkick 3.3.0 from https://geonkick.org and replace the binaries and all files at /usr/lib/lv2/geonkick.lv2 on Manjaro, Geonkick 3.3.0 is loaded ok in Arduor, and also I cannot reproduce the problem. If you can reproduce and can get more info about the stack frames, please, attach them here.
Thanks for your efforts. Regarding the latest release from github, it was my bad and ardour errors were because i was setting vst2 path in ardour instead of LV2_PATH env variable, and it tried to read lv2 plugin as vst2. After loading 3.3.0 release properly in ardour i could not reproduce the error, but it may be because the binary is built without assertions. If you can confirm that github releases are built with NDEBUG, then i think there is no point in trying to reproduce it in github release. I also tried reproducing with repo version again, and it seems like aside from changing presets you also need to click through instruments in the kit tab before and after changing preset to cause crash. It is not super determenistic bug but i'll try to build the plugin with assertions and debug symbols and get you a traceback.
"you can confirm that github releases are built with NDEBUG" -- yes, they are built with NDEBUG.
Although judging from the code in stdlib(/usr/include/c++/13.2.1/debug/assertions.h for manjaro version), _GLIBCXX_ASSERTIONS in question depends on _GLIBCXX_DEBUG being defined and does not care about NDEBUG, so apparently the version from manjaro repo was built with _GLIBCXX_DEBUG or at least _GLIBCXX_ASSERTIONS.
I built with -DCMAKE_CXX_FLAGS="-D_GLIBCXX_DEBUG" -DCMAKE_BUILD_TYPE=Debug
but despite debug type i still don't get line numbers in traceback. But now we at least got method names!
Looks like the patch should be
diff --git a/src/kit_model.cpp b/src/kit_model.cpp
index d08387b..d3634f8 100644
--- a/src/kit_model.cpp
+++ b/src/kit_model.cpp
@@ -325,7 +325,7 @@ size_t KitModel::maxPercussionNumber() const
int KitModel::percussionId(int index) const
{
const auto &ids = geonkickApi->ordredPercussionIds();
- if (index < -1 || index > static_cast<decltype(index)>(ids.size() - 1))
+ if (index < 0 || index > static_cast<decltype(index)>(ids.size() - 1))
return -1;
return ids[index];
}
percussionIdList was indeed the culprit!
@treapster Hi, I'll thanks for the findings. I'll create a commit. :)
I'm on manjaro, geonkick 3.2.0-1 lv2 from manjaro repo. I tried to reproduce on the latest github release but ardour reported errors("Missing entry method in ...") when scanning, so i couldn't check the 3.3.0.