[GNC-dev] Debugging for Bug 797236 g_closure_invoke problem
Chris Good
goodchris96 at gmail.com
Wed Apr 1 00:29:33 EDT 2020
Hi Devs,
I'd appreciate some help if possible please.
In maint, in src/gnucash/gnome/reconcile-view.c
gnc_reconcile_view_refresh(), now:
void
gnc_reconcile_view_refresh (GNCReconcileView *view)
{
GNCQueryView *qview;
GtkTreePath *cursor_path=NULL;
GtkTreeViewColumn *cursor_col;
g_print("Start reconcile-view.c gnc_reconcile_view_refresh()\n");
g_return_if_fail (view != NULL);
g_return_if_fail (GNC_IS_RECONCILE_VIEW (view));
qview = GNC_QUERY_VIEW (view);
gtk_tree_view_get_cursor (GTK_TREE_VIEW (qview), &cursor_path,
&cursor_col);
gnc_query_view_refresh (qview);
if (cursor_path)
{
g_print("reconcile-view.c gnc_reconcile_view_refresh() "
"calling gtk_tree_view_scroll_to_cell()\n");
gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW (qview), cursor_path,
cursor_col, FALSE, 0.0, 0.0);
gtk_tree_path_free(cursor_path);
}
I added the call to gtk_tree_view_get_cursor () and the call to
gtk_tree_view_scroll_to_cell()
and this fixes the problem of the Reconcile window panel of debit splits
being repositioned to the first split
after using the Open button to open the register to add a new transaction.
However, it doesn't fix the problem if I use the Balance button to
automatically add a balancing transaction.
I'm trying to debug in Eclipse using the Balance button, because I can see
that refresh_handler() is also being called (same as using the Open button)
but the problem still exists when using the Balance button.
refresh_handler() calls recnRefresh() calls gnc_reconcile_view_refresh()
By adding breakpoints in refresh_handler and gnc_reconcile_view_refresh I
can see that gnc_reconcile_view_refresh() is being called 8 times (4 times
for each of the debits + credits panel) and only on the 2nd call for the
debit panel is cursor_path not NULL. I don't understand why only 1 of the 4
calls for the debit panel has a cursor path?
Up until now, the panel still displays on the 2nd page of splits where it
was before the Balance button was used.
Resuming after the 8th call, the debugger gets: No source available for
"g_closure_invoke() at (address)"
and I can only Resume.
I guess g_closure_invoke() is a gtk3 function and I need to install the gtk3
dev packages which are not stripped? How do I integrate them into my Eclipse
build?
If I Resume from here, the debits panel is now incorrectly updated to show
the top of the debits splits.
On another topic, I followed the instructions at
https://wiki.gnucash.org/wiki/Eclipse (thanks for these!) but don't see a
way to do a 'ninja install' from Eclipse. Is there a way or is that not
needed because we can either run or debug from Eclipse.
Regards,
Chris Good
More information about the gnucash-devel
mailing list