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<char, std::__1::char_traits<char> >&, Glib::ustring const&) + 131 StringPrivate::Composition& StringPrivate::Composition::arg<Glib::ustring>(Glib::ustring const&) + 25 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > string_compose<Glib::ustring> (...) + 81 PBD::run_functor_for_paths(...) + 1313 ```
This commit is contained in:
parent
08eb25ef55
commit
63b5c9ea2b
@ -82,14 +82,15 @@ run_functor_for_paths (vector<string>& result,
|
||||
bool recurse)
|
||||
{
|
||||
for (vector<string>::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<string>& 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user