-
Notifications
You must be signed in to change notification settings - Fork 53
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
Clang build crashes #280
Comments
Clang version info:
|
can you try this? idk why diff --git a/src/components/channellist/channellisttree.cpp b/src/components/channellist/channellisttree.cpp
index 4816b42..35bfa2d 100644
--- a/src/components/channellist/channellisttree.cpp
+++ b/src/components/channellist/channellisttree.cpp
@@ -1158,8 +1158,11 @@ bool ChannelListTree::SelectionFunc(const Glib::RefPtr<Gtk::TreeModel> &model, c
}
}
- auto type = (*model->get_iter(path))[m_columns.m_type];
- return type == RenderType::TextChannel || type == RenderType::DM || type == RenderType::Thread;
+ if (const auto iter = model->get_iter(path)) {
+ auto type = (*iter)[m_columns.m_type];
+ return type == RenderType::TextChannel || type == RenderType::DM || type == RenderType::Thread;
+ }
+ return false;
}
void ChannelListTree::AddPrivateChannels() { |
That fixed it, I don't see any problems with the channel selection. |
I had the same issue on OpenBSD with Clang version 13 since Abaddon version 0.1.14 Seems Clang's optimizations causes problems with this specific code block. |
forgot about this but added the fix. realistically it was probably just UB |
Building with Clang works just fine, but the build crashes at startup with
Running with debugger reveals that this occurs in
ChannelListTree::SelectionFunc
when comparingtype
abaddon/src/components/channellist/channellisttree.cpp
Lines 1154 to 1163 in 7b63bfe
I am not much familiar with GTK, but it seems like
type
returned byget_iter
is in invalid state.The text was updated successfully, but these errors were encountered: