GnuCash
Contact   Instructions
Bug 798078 - Report 'Income Chart' prints stacktrace when end date before start date
Summary: Report 'Income Chart' prints stacktrace when end date before start date
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: 4.4
Hardware: PC Linux
: Normal trivial
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-04 16:20 EST by Martin
Modified: 2021-01-14 10:17 EST (History)
4 users (show)

See Also:


Attachments

Description Martin 2021-01-04 16:20:50 EST
Title.

Set start date to start of accounting period and end date to end of previous year and instead of a clear error message you get:

Report error

An error occurred while running the report.

In options.scm:
  2012:10 19 (run-callbacks)
In srfi/srfi-1.scm:
    640:9 18 (for-each #<procedure 7faa4b9ac940 at options.scm:2013:11 (elt)> …)
In unknown file:
          17 (gncp-option-invoke-callback #<swig-pointer GNCOptionChangeCal…> …)
In c-interface.scm:
     35:4 16 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
    829:9 15 (catch #t #<procedure 7faa4ba17c00 at c-interface.scm:36:6 ()> # …)
In c-interface.scm:
    40:37 14 (_)
In unknown file:
          13 (eval-string "(gnc:report-run 1)" #<undefined>)
In ice-9/boot-9.scm:
   2312:4 12 (save-module-excursion #<procedure 7faa4b9ac520 at ice-9/eval-s…>)
In ice-9/eval-string.scm:
     38:6 11 (read-and-eval #<input: string 7faa4c0a31c0> #:lang _)
In report-core.scm:
    772:4 10 (gnc:report-run _)
In c-interface.scm:
     77:2  9 (gnc:backtrace-if-exception _ . _)
     35:4  8 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
    829:9  7 (catch #t #<procedure 7faa4ba17b70 at c-interface.scm:36:6 ()> # …)
In c-interface.scm:
    39:40  6 (_)
In report-core.scm:
   774:29  5 (_)
   756:25  4 (gnc:report-render-html #<<report> type: "44f81bee049b4b3ea908…> …)
In standard/category-barchart.scm:
   474:13  3 (category-barchart-renderer #<<report> type: "44f81bee049b4b3e…> …)
In unknown file:
           2 (filter #<procedure 7faa4bd72110 at standard/category-barchart…> …)
In standard/category-barchart.scm:
   476:36  1 (_ _)
In ice-9/boot-9.scm:
    777:6  0 (throw "gnc:monetary+ expects 1 currency " "#null")

In procedure throw: Wrong type argument in position 1: gnc:monetary+ expects 1 currency
Comment 1 Christopher Lam 2021-01-04 21:08:42 EST
What should be the appropriate response?
Comment 2 John Ralls 2021-01-04 22:53:13 EST
The ideal fix would be to for the options dialog to display an error and refuse to close if the start-date > end-date.

The next best fix would be to display an html error message in the report's tab, similar to the one that comes up if there's no data.
Comment 3 Christopher Lam 2021-01-14 10:17:21 EST
Fixed in https://github.com/Gnucash/gnucash/commit/d009ba3d

Note You need to log in before you can comment on or make changes to this bug.