Bug in TXF Report? Gnucash 2.3.8 and 2.3.9

J. Alex Aycinena alex.aycinena at gmail.com
Tue Feb 9 18:59:04 EST 2010


Hi marc,

See my comments below.

On Sun, Feb 7, 2010 at 6:11 PM, Marc Ronell <mronell at verizon.net> wrote:
>
> Hi Alex,
>
> Given the season  (ie US Tax), I  find it hard to believe  this bug is
> both real  and unreported,  but I  am not finding  any mention  of it.
> Just  in case  it is  real, enclosed  is the  debug info.   I  did try
> downloading the latest version of tax.scm, but its the same as the one
> with the 2.3.9 distribution.
>
> In GNUCash version 2.3.8 and 2.3.9, the Tax Schedule Report/TXF Export
> is giving  a "Report  error".  Compiled on  Debian testing on  an i386
> box.
> Linux cadence 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux
>
> Let me know if I can provide any other info, or if I am missing
> something obvious in this debug trace output.
>
> Thanks,
>
> marc
>
> ----
>
> gnucash.trace:
>
> * 20:29:47  WARN <gnc.engine> failed to load gncmod-backend-dbi from /usr/local/lib/gnucash
> * 20:29:47  CRIT <gnc.engine> required library gncmod-backend-dbi not found.
> * 20:29:58  WARN <gnc.gui> [PrintAmountInternal()] Bad numeric.
> * 20:29:58  WARN <gnc.gui> [PrintAmountInternal()] Bad numeric.
> * 20:30:09  WARN <gnc.scm> In /usr/local/share/gnucash/scm/report.scm:
>  669: 14* [gnc:report-render-html # #t]
>  632: 15  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) ...)
>  640: 16  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
>  643: 17* (set! doc (if template (let* (# # # ...) (if # # ...) ...) ...))
>  643: 18* (if template (let* (# # # ...) (if # # ...) ...) ...)
>  644: 19  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
>  646: 20* [#<procedure #f #> #]
> In /usr/local/share/gnucash/guile-modules/gnucash/report/taxtxf.scm:
> 2878: 21  [generate-tax-schedule "Taxable Income/Deductible Expenses" ...]
> In unknown file:
>    ...
>   ?: 22  (letrec (#) (set! selected-accounts-sorted-by-form-line-acct #) ...)
> In /usr/local/share/gnucash/guile-modules/gnucash/report/taxtxf.scm:
> 2460: 23* [make-form-line-acct-list (# # # #) "2009"]
> 1386: 24  [map #<procedure #f (account)> (# # # #)]
> In unknown file:
>    ...
>   ?: 25  (let ((ret (list #))) (letrec ((lp #)) (lp (cdr ls) ret)))
>   ?: 26* [list ...
>   ?: 27*  [#<procedure #f (account)> #<swig-pointer Account * 8835020>]
> In /usr/local/share/gnucash/guile-modules/gnucash/report/taxtxf.scm:
> 1387: 28   (let* (# # # ...) (if # # ...) ...)
> 1393: 29*  [get-acct-txf-info form 9 #{}#]
>  255: 30   (let ((tax-entity-type #)) (cond (# #) (# #) (# #) ...))
> In unknown file:
>     ...
>   ?: 31   [gnc:txf-get-code-info (# # # # ...) #{}# 1 ...]
> In /usr/local/share/gnucash/scm/txf.scm:
>  81: 32   (let* (# #) (and category #))
>  81: 33*  [cdr #f]
> /usr/local/share/gnucash/scm/txf.scm:81:28: In procedure cdr in expression (cdr (assv # categories)):
> /usr/local/share/gnucash/scm/txf.scm:81:28: Wrong type argument in position 1: #f
> * 20:30:11  WARN <GLib-GObject> instance of invalid non-instantiatable type `(null)'
> * 20:30:11  CRIT <GLib-GObject> g_signal_handlers_destroy: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
> * 20:30:11  CRIT <GLib-GObject> g_object_unref: assertion `G_IS_OBJECT (object)' failed
>

I was able to reproduce this behaviour and get almost the exact same
gnucash.trace output. I will prepare a patch to fix this and submit it
shortly.

I suspect that you are using a gnucash file from an earlier version
(say 2.2.9) that already had tax codes assigned to accounts and tried
to run the Tax Report with the latest development version without
first going into Edit->Income Tax Options and selecting a 'Tax Entity
Type'. That is how I reproduced the problem. This version of the
report needs to have that specified but should handle the case where
it is not more gracefully.

If you still haven't gone to Edit->Income Tax Options with this file,
can you save a copy of your data file as it is now to open later with
the conditions you have right now when the patch is available to
verify that it solves the problem?

After having saved that backup, you should be able to work around the
problem for now by opening your file, going to Edit->Income Tax
Options, selecting the 'Edit' button at the top, under 'Income Tax
Identity', and selecting a 'Tax Entity Type' (e.g., Individual,
partnership, etc.). Then run the report and it should work. Let me
know if it doesn't.

When I've prepared the revised 'taxtxf.scm' report file, I can send it
to you with instructions as to how you can test it with your saved
data file to validate that my patch actually solves the problem you
ran into.

Thanks for calling that problem to my attention.

Regards,

Alex


More information about the gnucash-devel mailing list