XFCE upgraded to 4.16

Guido Falsi mad at madpilot.net
Sat Jan 9 21:44:45 UTC 2021


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 at madpilot.net>


More information about the freebsd-xfce mailing list