> On Apr 28, 2019, at 10:20 AM, Jeff Abrahamson <j...@p27.eu> wrote:
> 
> On 27/04/2019 23:44, John Ralls wrote:
>>> On Apr 27, 2019, at 10:00 AM, Jeff Abrahamson <j...@p27.eu> wrote:
>>> 
>>> I opened a gnucash file (sqlite, gnucash v2.6.19, built from version
>>> c1b5e6c8d+) and saw a stream of errors in /tmp/gnucash.trace
>>> 
>>>   * 18:36:09  CRIT <gnc.engine> xaccAccountGetName: assertion
>>>   'GNC_IS_ACCOUNT(acc)' failed
>>> 
>>> I presume this means some bit of corruption in the sqlite file, but
>>> googling isn't helping me know what to do about it.  Something gnucash
>>> specific?  Use sqlite tools directly?  Other?
>> Don't leap to conclusions. First run GnuCash with the --debug option. That 
>> will provide a great deal more information that should help resolve where 
>> the error is coming from.
>> 
>> If it does prove to be a database problem next run gnucash with --log 
>> gnc.backend.dbi=debug which will print out all of the SQL queries. If it's 
>> really corrupt data then the errors will be interleaved with the queries. 
>> That should provide you enough information to query the database with the 
>> sqlite3 command-line tool and figure out exactly what's wrong.
> 
> Thanks, and fair enough.  I was overly distracted by the CRIT.
> 
> Anyway, even with backend logging, I'm not seeing anything clear in the
> stream of messages that suggests a pattern, certainly not against
> specific SQL statements.  I'll watch it more closely and on a couple
> different gnucash files and report back.  Perhaps this always happens
> and I've just never noticed.

It's entirely possible that it's normal. What passes for a type system in 
GObject is managed entirely at run time and all of the type checks raise a 
critical error like that when they fail. When the engine was rewritten to use 
GObject 15 years ago the implementors didn't really understand the intricacies 
and did some things that work but aren't the best way to do it. Fixing that is 
one of the motivations for converting engine to C++: The type system is 
compile-time so it's much faster and the compiler enforces type safety so the 
programmer doesn't have to.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
gnucash-user@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.

Reply via email to