Easy to say, but I'm not a real expert. I think the code that fails is Area *find_area_under_mouse(void *root, int x, int y)
{
Area *result = root;
Area *new_result = result;
do {
result = new_result;
// EDIT: I inserted here if(!result) break;
GList *it = result->children;
while (it) {
Area *a = (Area *)it->data;
if (area_is_under_mouse(a, x, y)) {
new_result = a;
break;
}
it = it->next;
}
} while (new_result != result);
return result;
}
the failure for me is a segfault so I assume that one of the -> ops fails. I think that must be the result->children ie result has become NULL. I will try returning result if result is NULL.
[EDIT:] I inserted if(!result) break; At line 2 of the do {} while loop. I installed that version of tint2 and it seemed to be OK with conky-1.19.6-1 and also has not crashed with conky-1.19.7-2. I'm just not sure if that is patching a bug in conky or if the original tint2 code is making a wrong assumption.
EDIT 2: if the tint2 fix is thought to be a good thing how should we/I proceed? I assume the PKGBUILD is originally in Arch so a patch needs to be added there as tint2 is now considered finished (The final release of tint2 is 17.0.2.The code is frozen and no more feature requests are accepted.) so should I submit a patch to the Arch maintainer?
EDIT 3: sadly after two days I again see a crash in tint2 when running with conky-1.19.7-2. The SEGV happens in something in tint2 called from handle_x_events. It's whackamole time