Gnucash crashing on startup

Sahib Jakhar sahib.jakhar at gmail.com
Sat Mar 4 07:38:54 EST 2017


Hi,

I did try debugging the issue. What I found was that there was an
entry in transactions table that was causing it to fail:

MariaDB [gnucash]> select * from transactions where guid =
'2a5091520315311f4d96ba2931b1b5ac';
+----------------------------------+----------------------------------+-----+---------------------+---------------------+-------------+
| guid                             | currency_guid
| num | post_date           | enter_date          | description |
+----------------------------------+----------------------------------+-----+---------------------+---------------------+-------------+
| 2a5091520315311f4d96ba2931b1b5ac | ff62a21de84fce905528e791e7c0ef47
|     | 0000-00-00 00:00:00 | 2017-03-01 19:14:28 |             |
+----------------------------------+----------------------------------+-----+---------------------+---------------------+-------------+

As can be seen post_date is just empty. I don't know how this entry
came into this table, but this was what was causing the failure.
Corresponding to the above there was a single entry in splits table, as follows:

MariaDB [gnucash]> select * from splits where tx_guid =
'2a5091520315311f4d96ba2931b1b5ac';
+----------------------------------+----------------------------------+----------------------------------+------+--------+-----------------+----------------+-----------+-------------+--------------+----------------+----------+
| guid                             | tx_guid
| account_guid                     | memo | action | reconcile_state |
reconcile_date | value_num | value_denom | quantity_num |
quantity_denom | lot_guid |
+----------------------------------+----------------------------------+----------------------------------+------+--------+-----------------+----------------+-----------+-------------+--------------+----------------+----------+
| 5b08b3a7c49968ef179db44a8a79a2dd | 2a5091520315311f4d96ba2931b1b5ac
| 488162a766324a340feec656f7e1b0f6 |      |        | n               |
NULL           |         0 |         100 |            0 |
100 | NULL     |
+----------------------------------+----------------------------------+----------------------------------+------+--------+-----------------+----------------+-----------+-------------+----

I deleted both of the above two and now it is working. I don't know
how much help the above information would be, but stack trace follows:


#0  0x00007ffff2e3104f in raise () at /usr/lib/libc.so.6
#1  0x00007ffff2e3247a in abort () at /usr/lib/libc.so.6
#2  0x00007ffff3c33345 in g_assertion_message () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff3c333da in g_assertion_message_expr () at
/usr/lib/libglib-2.0.so.0
#4  0x00007ffff67b2311 in timespec_to_gdate (ts=...) at gnc-date.c:1670
#5  0x00007ffff6e5c667 in xaccTransGetDatePostedGDate
(trans=0x2805190) at Transaction.c:2268
#6  0x00007ffff6e4eb4c in xaccTransScrubPostedDate (trans=0x2805190)
at Scrub.c:1407
#7  0x00007fffcb3dc6f9 in query_transactions (be=0x22ae060,
stmt=0x2585a10) at gnc-transaction-sql.c:380
#8  0x00007fffcb3dd7b5 in gnc_sql_transaction_load_all_tx
(be=0x22ae060) at gnc-transaction-sql.c:848
#9  0x00007fffcb3c535c in initial_load_cb (type=0x7fffcb3e4755
"Trans", data_p=0x7fffcb5ef680 <be_data_tx>, be_p=0x22ae060) at
gnc-backend-sql.c:209
#10 0x00007ffff67c2dca in foreach_backend (key=0x7fffcb3e4755,
be_item=0x7fffcb5ef680 <be_data_tx>, arg=0x7fffffffe070) at
qofobject.c:421
Python Exception <class 'gdb.error'> There is no member named keys.:
#11 0x00007ffff67ce4cc in g_hash_table_foreach_sorted
(hash_table=0x7596a0, func=0x7ffff67c2d59 <foreach_backend>,
user_data=0x7fffffffe070, compare_func=0x7ffff2e8d280
<__strcmp_sse2_unaligned>) at qofutil.c:47
#12 0x00007ffff67c2e48 in qof_object_foreach_backend
(backend_name=0x7fffcb3dfa60 "gnc:sql:1", cb=0x7fffcb3c51ec
<initial_load_cb>, user_data=0x22ae060) at qofobject.c:441
#13 0x00007fffcb3c563b in gnc_sql_load (be=0x22ae060, book=0x2246140,
loadType=LOAD_TYPE_INITIAL_LOAD) at gnc-backend-sql.c:272
#14 0x00007fffcb5f6c92 in gnc_dbi_load (qbe=0x22ae060, book=0x2246140,
loadType=LOAD_TYPE_INITIAL_LOAD) at gnc-backend-dbi.c:1568
#15 0x00007ffff67cd314 in qof_session_load (session=0x2238800,
percentage_func=0x7ffff747099c <gnc_window_show_progress>) at
qofsession.c:576
#16 0x00007ffff7403725 in gnc_post_file_open (filename=0x2239350
"mysql://gnucashuser:kBqThli9l30nCQe5kr8CyBHSu/Rh9+84j9aXHZ1exiQ=@mysql-server/gnucash",
is_readonly=0) at gnc-file.c:875
#17 0x00007ffff7403bae in gnc_file_open_file (newfile=0x2239350
"mysql://gnucashuser:kBqThli9l30nCQe5kr8CyBHSu/Rh9+84j9aXHZ1exiQ=@mysql-server/gnucash",
open_readonly=0) at gnc-file.c:1065
#18 0x0000000000405572 in inner_main (closure=0x0, argc=1,
argv=0x7fffffffe7c8) at gnucash-bin.c:656
#19 0x00007ffff628ab5d in  () at /usr/lib/libguile-2.0.so.22
#20 0x00007ffff626323a in  () at /usr/lib/libguile-2.0.so.22
#21 0x00007ffff62fcdb6 in  () at /usr/lib/libguile-2.0.so.22
#22 0x00007ffff626d033 in scm_call_4 () at /usr/lib/libguile-2.0.so.22
#23 0x00007ffff62639e1 in  () at /usr/lib/libguile-2.0.so.22
#24 0x00007ffff6263ac5 in scm_c_with_continuation_barrier () at
/usr/lib/libguile-2.0.so.22
#25 0x00007ffff62e421c in  () at /usr/lib/libguile-2.0.so.22
#26 0x00007ffff5fb39f2 in GC_call_with_stack_base () at /usr/lib/libgc.so.1
#27 0x00007ffff62e4648 in scm_with_guile () at /usr/lib/libguile-2.0.so.22
#28 0x00007ffff628ad52 in scm_boot_guile () at /usr/lib/libguile-2.0.so.22
#29 0x0000000000405a06 in main (argc=1, argv=0x7fffffffe7c8) at
gnucash-bin.c:826


-Sahib



On Thu, Mar 2, 2017 at 8:03 AM, ppssupport at hotmail.com
<ppssupport at hotmail.com> wrote:
>
>
> On 03/01/2017 10:12 PM, John Ralls wrote:
>>>
>>> On Mar 1, 2017, at 12:12 PM, Sahib Jakhar <sahib.jakhar at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I was entering data into gnucash, and suddenly it crashed. Ever since
>>> its crashing, it is crashing on startup. I am using mysql to store
>>> data on Linux.
>>>
>>> I also deleted manually the entries in splits and transactions table
>>> corresponding to the last transaction I was entering, but to no avail.
>>>
>>> The following gets printed on the command prompt:
>>>
>>> libsqlite.so.0: cannot open shared object file: No such file or directory
>>> libdbi: Failed to load driver: /usr/lib/dbd/libdbdsqlite.so
>>> Found Finance::Quote version 1.38
>>> **
>>> qof:ERROR:gnc-date.c:1669:timespec_to_gdate: assertion failed:
>>> (g_date_valid (&result))
>>> Aborted (core dumped)
>>>
>>>
>>> Also, some (possibly relevant) stuff from /tmp/gnucash.trace is as
>>> follows:
>>>
>>> 9104 * 01:16:12  INFO <gnc.engine> [xaccTransSetDateInternal]
>>> addr=0x35f5a30 set date to 1422815400.000000000 Mon Feb  2 00:00:00
>>> 2015
>>> 9105 * 01:16:12  INFO <gnc.engine> [xaccTransSetDateInternal]
>>> addr=0x35f5a30 set date to 1422895503.000000000 Mon Feb  2 22:15:03
>>> 2015
>>> 9106 * 01:16:12  INFO <gnc.engine> [xaccTransSetDateInternal]
>>> addr=0x35f5a30 set date to 1422874740.000000000 Mon Feb  2 16:29:00
>>> 2015
>>> 9107 * 01:16:12  INFO <gnc.translog> [xaccOpenLog] Attempt to open
>>> disabled transaction log
>>> 9108 * 01:16:12  INFO <gnc.translog> [xaccTransWriteLog] Attempt to
>>> write disabled transaction log
>>> 9109 * 01:16:12  CRIT <GLib> g_date_time_format: assertion 'datetime
>>> != NULL' failed
>>> 9110 * 01:16:12  CRIT <GLib> g_date_time_unref: assertion 'datetime !=
>>> NULL' failed
>>> 9111 * 01:16:12  INFO <gnc.engine> [xaccTransSetDateInternal]
>>> addr=0x35f5bd0 set date to 18446744011539567616.000000000 (null)
>>> 9112 * 01:16:12  INFO <gnc.engine> [xaccTransSetDateInternal]
>>> addr=0x35f5bd0 set date to 1488395668.000000000 Thu Mar  2 00:44:28
>>> 2017
>>> 9113 * 01:16:12  CRIT <qof> gnc_localtime_r: assertion 'gdt != NULL'
>>> failed
>>> 9114 * 01:16:12  CRIT <GLib> g_date_set_dmy: assertion
>>> 'g_date_valid_dmy (day, m, y)' failed
>>>
>>>
>>> Can somebody kindly help me, as I use gnucash for storing all my
>>> financial transactions and it has 5+ years of data?
>>
>> Please get a stack trace (http://wiki.gnucash.org/wiki/Stack_Trace
>> <http://wiki.gnucash.org/wiki/Stack_Trace>) of the crash and file a bug
>> report with the stack trace attached.
>>
>> Regards,
>> John Ralls
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>> .
>>
> Try a system reboot first
>
> Jeffrey
>
>


More information about the gnucash-user mailing list