GnuCash
Contact   Instructions
Bug 796772 - Receivable Ageing Report invalid URL for Totals column
Summary: Receivable Ageing Report invalid URL for Totals column
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: 3.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
: 796780 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-19 16:46 EDT by Andrew
Modified: 2018-12-28 14:49 EST (History)
7 users (show)

See Also:


Attachments
Receivables Aging Bad URL error (6.61 KB, image/png)
2018-07-24 20:04 EDT, Paul
no flags Details
test datafile (5.35 KB, application/x-gnucash)
2018-07-25 21:26 EDT, Paul
no flags Details

Description Andrew 2018-07-19 16:46:24 EDT
Selecting a value in the Total column of the Receivable Ageing report used to give a list of the invoices but now generates an error Bad URL:owner=c:<long hex number>
Comment 1 Christopher Lam 2018-07-23 10:47:35 EDT
cannot reproduce on my end. perhaps you can export to html and send a bigger excerpt of the bad url?
Comment 2 Andrew 2018-07-23 17:31:33 EDT
The html looks like:

<td>
  <a href="gnc-ownerreport:owner=c:327da078acf442e897f03e4856f04f88&acct=d436e3c1cf0fdd2df40933198ee832fe#">£2,100.00</a>
</td>

I'm running on Manjaro Linux with Gnome 3 desktop.
Comment 3 Paul 2018-07-24 15:14:17 EDT
I have reported the same bug 796780
Comment 4 John Ralls 2018-07-24 16:41:29 EDT
*** Bug 796780 has been marked as a duplicate of this bug. ***
Comment 5 Christopher Lam 2018-07-24 19:48:44 EDT
still cannot reproduce. perhaps the owner or account guid is not valid anymore?
Comment 6 Paul 2018-07-24 20:04:28 EDT
Created attachment 372928 [details]
Receivables Aging Bad URL error
Comment 7 Paul 2018-07-24 20:06:12 EDT
I don't know what you are saying.  This error started when v3 finally started working.  The first two iterations did nothing but crash on opening.  Now the program works, but the Totals links on the Receivables Aging report are broken.  See the attachment.  This link used to open the specific customer report.  Now an error.  I am using the Windows version.
Comment 8 Andrew 2018-07-25 15:22:45 EDT
I agree with Paul. This only started when V3 rolled out. Prior to that the link opened a report to the outstanding invoices.

All the Totals in the table do not work, and all the accounts are still valid and work in all other aspects.

Is there some diagnostic command or log that can be checked?
Comment 9 Christopher Lam 2018-07-25 20:24:44 EDT
@Paul - every transaction/split/owner/invoice etc is internally identified by a unique ID string called the guid.

The receivable aging report is trying to link to the owner-report for the guid 327da078acf442e897f03e4856f04f88 and apparently this is failing.

Do the other aging reports (employee aging, payable aging) reports work well? If so, this suggests something unusual has happened with the customer with guid 327da078acf442e897f03e4856f04f88 so gnucash can't find it. Is this an old datafile? Does it happen on a newish datafile? If you can create a datafile with dummy data that errors out please put it here so we can try debug.
Comment 10 Paul 2018-07-25 21:25:20 EDT
Brand new test datafile.  Same error.
Comment 11 Paul 2018-07-25 21:26:15 EDT
Created attachment 372933 [details]
test datafile

See the Receivables Aging report and click on the Totals link for the test customer.  You should get an error.
Comment 12 Christopher Lam 2018-07-25 23:40:20 EDT
I actually don't get an error on a clean v3.2 build at all.

If you're on Linux I wonder if this is a dependency issue. This is beyond my knowledge. One of the core devs will be needed to debug this.
Comment 13 Paul 2018-07-26 07:05:53 EDT
Well I made it clear in my original report that I was using Windows.  When the bug reports were merged, I think that this detail was less clear.

Did the test file reproduce the bug for you?  Did you try it with the Windows version?
Comment 14 Christopher Lam 2018-07-26 07:22:57 EDT
Ah so it is Windows only.

I can confim bug exists on Windows Release 3.2, and on Windows Nightly dated 23-07-2018 - so unfortunately we'll need to recruit a core dev to look into it.

It affects both receivable aging and payable aging reports.
Comment 15 John Ralls 2018-07-26 10:19:48 EDT
*** Bug 796780 has been marked as a duplicate of this bug. ***
Comment 16 Johannes R 2018-08-22 16:50:54 EDT
This is due to a somewhat recent change in boost::uuid (therefore also not windows only). Commit https://github.com/boostorg/uuid/commit/07f68d3b9ce95bbde19b0212293f5110d363e050 introduces throwing an error if there is additional data after the UUID.

The error originates from https://github.com/Gnucash/gnucash/blob/274f0fd5857d521c3059c07987ac91cd6f55122c/gnucash/gnome/business-urls.c#L226

Since the URL for the report link looks like "owner=v:d571b44a4bb74957b40c72ec5c054d3c&acct=e3339ba953164b7388484aa335dc74bb#" and ownerreportCB only passes in a pointer to the start of the owner uuid boost will use strlen to find the end of the string which will also include the "&acct=...." part.
Comment 17 Geert Janssens 2018-10-01 07:25:55 EDT
Thanks for the analysis Johannes. This extra check appears to be introduced in boost 1.66. My system is still on boost 1.64 which is why I can't reproduce this. It does give enough information to implement a fix though.

I have pushed this to the maint branch.

For the Windows users following this bug, please install tomorrow's nightly build (or any future one) from https://code.gnucash.org/builds/win32/maint/ and report back here if the issue still happens for you with that test version.

Linux users comfortable with building gnucash from source are welcome to report back as well, presuming your system has at least boost 1.66.
Comment 18 Paul 2018-10-02 19:22:40 EDT
Geert, you did it.  This version, posted today, fixed the issue with the Receivables Aging report.  gnucash-3.3-2018-10-02-git-3.3-1-ge06836627+.setup.exe  Hopefully it will get pushed soon.  Thank you.
Comment 19 Geert Janssens 2018-12-28 14:49:13 EST
The fix will appear in gnucash 3.4

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