Date: Sat, 9 Jan 2021 22:44:33 +0100 From: Guido Falsi <mad@madpilot.net> To: Andrea Venturoli <ml@netfence.it>, xfce@freebsd.org Subject: Re: XFCE upgraded to 4.16 Message-ID: <8b50516a-e248-2613-74d2-887f805d335c@madpilot.net> In-Reply-To: <5ac5e637-8c47-0a0d-f8dd-d38dcecd4ed0@netfence.it> References: <46a21428-a640-f895-0f3b-f44c09497bf5@madpilot.net> <747ecac6-6d60-6143-1ae1-47801299b59b@netfence.it> <1502a321-02c0-13e9-16b3-6f11da9de3af@madpilot.net> <47ede65d-817a-8d80-a582-660d43ac6ac3@andreaventuroli.it> <ee9f59de-8814-cf6d-cf8a-ff13a88dccd2@madpilot.net> <45c74d5a-909b-8905-6673-b340e1d976b4@netfence.it> <b46f4878-8bb5-557f-a6c5-9b5500550aa6@madpilot.net> <989cf919-245c-61f9-3091-b0933849093b@netfence.it> <2b8631d8-479b-15ee-1efd-cc4bffd14710@madpilot.net> <838b577f-eb40-2776-19d4-2fb5f71611b3@netfence.it> <3655b4f7-0012-424b-7aa6-1d85fa2e9021@madpilot.net> <af5f0dc4-e700-5726-c92c-f546a90f6911@netfence.it> <5ac5e637-8c47-0a0d-f8dd-d38dcecd4ed0@netfence.it>
index | next in thread | previous in thread | raw e-mail
On 09/01/21 22:29, Andrea Venturoli wrote:
> On 1/9/21 11:59 AM, Andrea Venturoli wrote:
>
>> Right now I reached an usable config on my desktop, but I will try and
>> get suck a backtrace and I'll come back if I succeed.
>
> Here it is:
>
>> (gdb) bt
>> #0 0x0000000800e95287 in g_filename_from_uri () at
>> /usr/local/lib/libglib-2.0.so.0
>> #1 0x00000000002103a7 in install_theme (widget=0x80361c3f0,
>> uris=0x80463bf98, builder=0x802d504e0) at main.c:881
>> #2 0x000000000020f949 in appearance_settings_install_theme_cb
>> (widget=0x803631180, builder=0x802d504e0) at main.c:1000
>> #3 0x0000000800db2486 in () at /usr/local/lib/libgobject-2.0.so.0
>> #4 0x0000000800dc8488 in g_signal_emit_valist () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #5 0x0000000800dc8ee6 in g_signal_emit () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #6 0x00000008008ab72e in () at /usr/local/lib/libgtk-3.so.0
>> #7 0x0000000800db2486 in () at /usr/local/lib/libgobject-2.0.so.0
>> #8 0x0000000800dc8488 in g_signal_emit_valist () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #9 0x0000000800dc8ee6 in g_signal_emit () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #10 0x00000008008abd36 in () at /usr/local/lib/libgtk-3.so.0
>> #11 0x0000000800b8dc18 in () at /usr/local/lib/libgtk-3.so.0
>> #12 0x0000000800db2486 in () at /usr/local/lib/libgobject-2.0.so.0
>> #13 0x0000000800dc8488 in g_signal_emit_valist () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #14 0x0000000800dc8ee6 in g_signal_emit () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #15 0x00000008009817f1 in () at /usr/local/lib/libgtk-3.so.0
>> #16 0x0000000800db588c in g_cclosure_marshal_VOID__BOXEDv () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #17 0x0000000800db2486 in () at /usr/local/lib/libgobject-2.0.so.0
>> #18 0x0000000800dc8488 in g_signal_emit_valist () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #19 0x0000000800dc8ee6 in g_signal_emit () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #20 0x000000080097f69e in () at /usr/local/lib/libgtk-3.so.0
>> #21 0x0000000800983395 in () at /usr/local/lib/libgtk-3.so.0
>> #22 0x000000080094341c in gtk_event_controller_handle_event () at
>> /usr/local/lib/libgtk-3.so.0
>> #23 0x0000000800b35d9c in () at /usr/local/lib/libgtk-3.so.0
>> #24 0x0000000800b882c1 in () at /usr/local/lib/libgtk-3.so.0
>> #25 0x0000000800db2486 in () at /usr/local/lib/libgobject-2.0.so.0
>> #26 0x0000000800dc8488 in g_signal_emit_valist () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #27 0x0000000800dc8ee6 in g_signal_emit () at
>> /usr/local/lib/libgobject-2.0.so.0
>> #28 0x0000000800b35ad9 in () at /usr/local/lib/libgtk-3.so.0
>> #29 0x00000008009d1c5f in gtk_propagate_event () at
>> /usr/local/lib/libgtk-3.so.0
>> #30 0x00000008009d17ef in gtk_main_do_event () at
>> /usr/local/lib/libgtk-3.so.0
>> #31 0x00000008002e43a1 in () at /usr/local/lib/libgdk-3.so.0
>> #32 0x0000000800319877 in () at /usr/local/lib/libgdk-3.so.0
>> #33 0x0000000800eb9a7e in g_main_context_dispatch () at
>> /usr/local/lib/libglib-2.0.so.0
>> #34 0x0000000800eb9e24 in () at /usr/local/lib/libglib-2.0.so.0
>> #35 0x0000000800eba17a in g_main_loop_run () at
>> /usr/local/lib/libglib-2.0.so.0
>> #36 0x00000008009d111b in gtk_main () at /usr/local/lib/libgtk-3.so.0
>> #37 0x000000000020cb2d in main (argc=1, argv=0x7fffffffe660) at
>> main.c:1307
>
> In frame #1 (install_theme) we have:
>
>> static void
>> install_theme (GtkWidget *widget, gchar **uris, GtkBuilder *builder)
>> {
>> ...
>> for (i = 0; uris[i] != NULL; i++)
>> {
>> ...
>
> However in the caller (at frame #2, i.e.
> appearance_settings_install_theme_cb):
>
>> gchar **uris;
>> GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
>>
>> uris = g_new0 (gchar *, 1);
>> filename = gtk_file_chooser_get_filename (chooser);
>> uris[0] = g_filename_to_uri (filename, NULL, NULL);
>> install_theme (window, uris, builder);
>
>
> So what I think happens is that the loop processes uri[0], which holds
> the filename, but fails to find a NULL after it, since it was never
> allocated.
> Guess it should read:
>
> uris = g_new0 (gchar *, 2);
>
>
>
>
> Of course this should be fixed upstream, but in the meantime I'm
> attaching a patch that solves for me.
I need to take a better look to be sure, but yes, your patch looks
correct at first sight.
I'm going to test it and also submit upstream (with attribution, obviously!)
--
Guido Falsi <mad@madpilot.net>
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8b50516a-e248-2613-74d2-887f805d335c>
