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

John Ralls jralls at ceridwen.us
Tue Aug 18 16:19:27 EDT 2020


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.

Regards,
John Ralls

> On Aug 18, 2020, at 11:33 AM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
> 
> What I copied from syslog appears to look like a stack trace. If not quite, let me know and I'll see what I can do, but already this is proving elusive.
> 
> I've got debug symbols installed and I can do `gdb gnucash` then `run` but that won't produce the crash because the inspector isn't running.
> 
> If I try `run GTK_DEBUG=interactive /usr/bin/gnucash`, I get an error that:
> 
>  ~/.local/share/gnucash/data/-GTK_DEBUG=interactive cannot be found
> 
> and GnuCash opens with a blank file and no Inspector.
> 
> If I try to run the inspector directly via GTK_DEBUG=interactive and then attach the debugger, the crash happens too quickly to get the PID.
> 
> Regards,
> Adrien
> 
> On 8/18/20 1:17 PM, Adrien Monteleone wrote:
>> Sorry John, I thought I had split this off to a new topic, but I wasn’t successful. (still experimenting with gmane)
>> I managed to do so I think with a followup post using a similar subject line. I posted the syslog there. gnucash.trace was empty.
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list