[GNC] GTK Inspector blowing up on Mint 20 (was Re: help increasing size of font in GnuCash?)

Adrien Monteleone adrien.monteleone at lusfiber.net
Tue Aug 18 21:52:00 EDT 2020


Thanks for saving me time finding the proper syntax on gdb, I was fixing 
to look that up. In this case, it looks like Mint dumped the stack 
anyway, but good to know though.

Regards,
Adrien

On 8/18/20 3:19 PM, John Ralls wrote:
> Two mistakes: When you start gdb you tell it the executable to run. Everything you add to the run command is passed as an argument to that executable and environment variables aren't arguments GnuCash understands. You need to do it this way:
> 
> $ gdb /usr/bin/gnucash
> gdb> set env GTK_DEBUG=interactive
> gdb> run
> 
> Ah, that blob of text in Crash with GTK Inspector blowing up on Mint 20 is a stack trace! That wasn't obvious, sorry.
> 
> So the crash is in setting a busy cursor. GnuCash gets the cursor to set with
>         cursor = gdk_cursor_new_for_display (gdk_window_get_display (win),
>                                               (GdkCursorType)type);
> 
> where for the busy cursor that's hard-coded to a probably obsolete GDK_WATCH. If the theme doesn't define that cursor type then a crash is inevitable. We can avoid the crash simply enough:
> 
> --- a/gnucash/gnome-utils/cursors.c
> +++ b/gnucash/gnome-utils/cursors.c
> @@ -53,6 +53,8 @@ gnc_ui_set_cursor (GdkWindow *win, GNCCursorType type, gboolean update_now)
>           cursor = gdk_cursor_new_for_display (gdk_window_get_display (win),
>                                                (GdkCursorType)type);
>   
> +    g_return_if_fail (cursor);
> +
>       gdk_window_set_cursor (win, cursor);
>   
>       if (update_now && type != GNC_CURSOR_NORMAL)
> 
> But it would be nicer to have a fallback for when the theme doesn't define GDK_WATCH.



More information about the gnucash-user mailing list