From 63b5c9ea2bf04e2f0f2e658dbb79c8daa2b6f3a8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 May 2024 18:25:22 +0200 Subject: [PATCH 1/2] Trying to track down mysterious cxxabiv1::failed_throw It seems that a `Glib::ConvertError` is thrown, and then the function that catches the error causes another ConvertError in `err.what()` (which presumably include the filename that causes the error). relevant part of the backtrace (macOS Crashdump): ``` Glib::ConvertError::throw_func(_GError*) + 56 Glib::Error::throw_exception(_GError*) + 292 Glib::operator<<(std::__1::basic_ostream >&, Glib::ustring const&) + 131 StringPrivate::Composition& StringPrivate::Composition::arg(Glib::ustring const&) + 25 std::__1::basic_string, std::__1::allocator > string_compose (...) + 81 PBD::run_functor_for_paths(...) + 1313 ``` --- libs/pbd/file_utils.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index befc5235c8..e65f032a84 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -82,14 +82,15 @@ run_functor_for_paths (vector& result, bool recurse) { for (vector::const_iterator i = paths.begin(); i != paths.end(); ++i) { - string expanded_path = path_expand (*i); - DEBUG_TRACE (DEBUG::FileUtils, - string_compose("Find files in expanded path: %1\n", expanded_path)); - - if (!Glib::file_test (expanded_path, Glib::FILE_TEST_IS_DIR)) continue; - try { + string expanded_path = path_expand (*i); + + DEBUG_TRACE (DEBUG::FileUtils, + string_compose("Find files in expanded path: %1\n", expanded_path)); + + if (!Glib::file_test (expanded_path, Glib::FILE_TEST_IS_DIR)) continue; + Glib::Dir dir(expanded_path); for (Glib::DirIterator di = dir.begin(); di != dir.end(); di++) { @@ -137,10 +138,18 @@ run_functor_for_paths (vector& result, } } catch (Glib::FileError const& err) { +#ifndef NDEBUG warning << string_compose (_("Cannot access file: %1"), err.what()) << endmsg; +#endif } catch (Glib::ConvertError const& err) { +#ifndef NDEBUG warning << string_compose (_("Could not convert filename: %1"), err.what()) << endmsg; +#endif + } catch (...) { +#ifndef NDEBUG + warning << string_compose (_("Could not convert filename: '%1'"), *i) << endmsg; +#endif } } } From 13814deba26a3b78ac2bb3a7ba0ed263cde743fa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 May 2024 18:35:56 +0200 Subject: [PATCH 2/2] Backport Trax packaging --- tools/linux_packaging/build | 4 ++++ tools/osx_packaging/osx_build | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 5c31814071..942f279c0c 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -656,6 +656,10 @@ cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc +if test -n "$LIVETRAX"; then + cp $BUILD_ROOT/gtk2_ardour/livetrax.keys $Resources +fi + # Copied directly from source tree mkdir ${Shared}/icons diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index e12f6a361d..23f0f7bcb4 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -515,6 +515,10 @@ cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Resources cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Resources cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Resources +if test -n "$LIVETRAX"; then + cp $BUILD_ROOT/gtk2_ardour/livetrax.keys $Resources +fi + # Copied directly from source tree mkdir ${Resources}/icons