Error on exit

Robert Fewell 14ubobit at gmail.com
Tue Sep 27 10:45:12 EDT 2016


Hi,

I am getting these errors in the trace file on my Linux VM when I close
Gnucash, just wondering if others are getting them...

* 15:25:11  CRIT <gnc.core-utils> gnc_uri_get_components: assertion 'uri !=
NULL && strlen (uri) > 0' failed
* 15:25:11  CRIT <GLib> g_ascii_strcasecmp: assertion 's1 != NULL' failed
* 15:25:11  CRIT <gnc.core-utils> gnc_uri_get_components: assertion 'uri !=
NULL && strlen (uri) > 0' failed
* 15:25:11  CRIT <gnc.core-utils> gnc_uri_create_uri: assertion 'path != 0'
failed

while using gdb, the following backtrace is obtained...

#0  0x00007ffff5fcfb08 in g_logv () from /usr/lib64/libglib-2.0.so.0
#1  0x00007ffff5fcfd3f in g_log () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff6ea5aa0 in gnc_uri_get_protocol (uri=uri at entry=0xac4738 "")
at gnc-uri-utils.c:205
#3  0x00007ffff6ea5afa in gnc_uri_is_file_uri (uri=uri at entry=0xac4738 "")
at gnc-uri-utils.c:73
#4  0x00007ffff78949d0 in gnc_main_window_generate_title
(window=window at entry=0x66eec0) at gnc-main-window.c:1493
#5  0x00007ffff7894bb6 in gnc_main_window_update_title (window=0x66eec0) at
gnc-main-window.c:1551
#6  0x00007ffff5fc514d in g_list_foreach () from /usr/lib64/libglib-2.0.so.0
#7  0x00007ffff7893558 in gnc_main_window_update_all_titles () at
gnc-main-window.c:1559
#8  gnc_main_window_book_dirty_cb (book=0xa81930, dirty=1,
user_data=<optimized out>) at gnc-main-window.c:1569
#9  0x00007ffff6c69bd2 in qof_commit_edit_part2 (inst=0xac4970,
on_error=0x7ffff7314550 <commit_err>, on_done=0x7ffff7314530 <noop>,
    on_free=0x7ffff7317a60 <comm_free>) at qofinstance.cpp:1011
#10 0x00007ffff73159ac in ns_helper (key=0x9540b0, value=<optimized out>,
user_data=<optimized out>) at gnc-commodity.c:2301
#11 0x00007ffff5fb6e80 in g_hash_table_foreach_remove_or_steal () from
/usr/lib64/libglib-2.0.so.0
#12 0x00007ffff7318801 in gnc_commodity_table_delete_namespace
(table=0xac5dd0, name_space=0x9540b0 "template") at gnc-commodity.c:2325
#13 0x00007ffff7318bdb in gnc_commodity_table_destroy (t=0xac5dd0) at
gnc-commodity.c:2402
#14 0x00007ffff6c6b719 in qof_object_book_end (book=0xa81930) at
qofobject.cpp:132
#15 0x00007ffff6c634dc in qof_book_destroy (book=0xa81930) at
qofbook.cpp:440
#16 0x00007ffff6c72b44 in QofSessionImpl::~QofSessionImpl (this=0xa983d0,
__in_chrg=<optimized out>) at qofsession.cpp:137
#17 0x00007ffff6c72cbe in qof_session_destroy (session=0xa983d0) at
qofsession.cpp:145
#18 0x00007ffff732e3cf in gnc_clear_current_session () at gnc-session.c:65
#19 0x00007ffff788c27e in gnc_file_quit () at gnc-file.c:1609

It looks like the window title is trying to be updated with an empty
book_id, this can be fixed if I change line 1489 of gnc-main-window.c
from...

    if (!book_id)

to...

    if (!book_id || g_strcmp0 (book_id, "") == 0)

Is this a valid fix or should the update not be called when closing.

Robert


More information about the gnucash-devel mailing list