-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
tint2: 17.0.2 -> 17.1.3, switch to fork, fix compatibility with glib >= 2.76 #244547
Conversation
Result of 1 package built:
|
Hmmm. This version itself segfaults on startup for me. Using the |
I also have been getting segfaults on startup with this version, but the previous version before this PR (old repo, no glib.patch) works. I tracked it down to my config file not having a
Some details on the
I crash here:
which is a macro for some sort of loop over a global GList *to_remove = panel_config.separator_list;
for_panel_items_order (&& to_remove)
if (panel_items_order[k] == ':')
to_remove = to_remove->next; #define for_panel_items_order(...) \
for (int items_n = strlen(panel_items_order), k = 0; k < items_n __VA_ARGS__; k++) Before the crash, tint2 logs
The old version that doesn't crash logs:
which is from panel.c:190, fprintf(stderr, "tint2: panel items: %s\n", panel_items_order); where case key_panel_items:
new_config_file = TRUE;
free_and_null(panel_items_order);
panel_items_order = strdup(value); So it looks like it's unset when the config doesn't specify panels, and the old version just defaults to
via a fallback or a bunch of other options implicitly appending some letter or other to that string, but in the current version that, uh, doesn't work anymore, apparently because it's now done via a macro that only appends to a local copy of the variable and doesn't write it back to the global one? #define _STR_EXTEND(s, L) \
int L; do{ \
L = strlen(s); \
s = realloc(s, L+2); \
}while(0)
// NOTE: c is 1-char string (null-terminated),
// not a char itself
// also, parts of string could be copied faster using wider data type (up to word)
#define STR_APPEND_CH(str, c) \
do{ char *s=(str); \
if (s) { \
_STR_EXTEND(s, L); \
s[L]=(c)[0], s[L+1]=(c)[1]; \
} else \
s = strdup(c); \
}while(0)
#define STR_PREPEND_CH(str, c) \
do{ char *s = (str); \
if (s) { \
_STR_EXTEND(s, L); \
memmove (s+1, s, L+1); \
s[0] = (c)[0]; \
} else \
s = strdup(c); \
}while(0) Edit: There's a fix for this at https://gitlab.com/nick87720z/tint2/-/merge_requests/2, but I don't know how alive that repo is now. |
Description of changes
For a while now tint2 has been crashing for me when I start Steam.
Looking for others with similar problems I found some relevant links
https://bbs.archlinux.org/viewtopic.php?id=284293
https://patchespromptly.com/glib2/
https://gitlab.com/nick87720z/tint2/-/issues/4
Long story short: the original tint2 is no longer maintained, a fork exists (which is not maintained very regularly either), but that fork plus a recent patch fixes the issues for me.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)