After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795276 - Invalid date on price stops file from being parsed.
Invalid date on price stops file from being parsed.
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
3.0
Other Mac OS
: Normal normal
: future
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2018-04-15 15:04 UTC by Subramanian
Modified: 2018-06-30 00:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GnuCash 3.0.1 (74.66 KB, text/plain)
2018-04-15 15:04 UTC, Subramanian
Details
GnuCash - Search - Date (187.54 KB, application/pdf)
2018-04-17 03:13 UTC, Subramanian
Details
Gnucash - Search (296.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-28 05:07 UTC, Subramanian
Details

Description Subramanian 2018-04-15 15:04:57 UTC
Created attachment 370962 [details]
GnuCash 3.0.1

This looks similar to 795031.

The same .gnucash file works in 2.6.19 but does not work in 3.0

Mac OS version 10.3.3

During installation, it crashed 3 times. Seemed to recover at the 4th time and is able to open other files .
Comment 1 John Ralls 2018-04-15 16:04:38 UTC
Please explain what "during installation, it crashed 3 times" means. Since "installation" consists of dragging GnuCash from the dmg to the Applications folder it doesn't make sense for anything to have crashed.

Do you mean that the first 3 times you tried to start GnuCash it crashed, but it opened the 4th time?

The uncaught exception sure looks like the invalid-date one. Unfortunately there aren't any good debug messages for bad data, the only way to get the details is to run in the debugger.
Comment 2 Subramanian 2018-04-17 03:13:47 UTC
Created attachment 371007 [details]
GnuCash - Search - Date
Comment 3 Subramanian 2018-04-17 03:15:26 UTC
You are correct. It did not crash during the installation. It crashed when I tried to start GnuCash for the first three times. It started to run properly for the 4th time.

Regards,
Subramanian V.
Comment 4 John Ralls 2018-04-17 03:24:56 UTC
Huh. Did you change anything between the three crashes and the fourth successful launch?

Do you have bills or invoices in your database? It's more likely that an invalid date would go into one of those: Entering an invalid posted date in a transaction would immediately send it to the top of the register and you'd notice that.
Comment 5 Subramanian 2018-04-17 03:55:51 UTC
Yes, I restarted the computer twice, but nothing else. 

Initially, I had GnuCash 2.6.19 and over that I installed Gnucash 3.0.1 - when I started GnuCash it would fail three times and the fourth time it would start properly.

I reinstalled GnuCash 2.6.19 and no crashes, everything ran smoothly.

I once again tried with GnuCash 3.0.1 and again the same issue. This could probably be the case because I tried to open my earlier .gnucash file. I will try again today / tomorrow and check.

In the attachments, you can clearly see that there is no date prior to 01-April-2009.

I do not use bills / invoices functionality as I use only for personal finance.

Regards,
Subramanian V.
Comment 6 Geert Janssens 2018-04-27 16:06:52 UTC
The search you capture in comment 2 was that started from an account register (like the "Radhika" tab) or from the account hierarchy ("Accounts" tab) ? Only the latter will search for all dates.
Comment 7 Subramanian 2018-04-28 05:06:55 UTC
I did from Accounts tab. I am attaching a new screenshot.

Regards,
Subramanian V.
Comment 8 Subramanian 2018-04-28 05:07:29 UTC
Created attachment 371483 [details]
Gnucash - Search
Comment 9 John Ralls 2018-04-28 17:26:14 UTC
Unfortunately the abort happens after the stack has already unwound to the C++ entry point so the stack trace is of no help in finding the source of the crash; that would require running GnuCash in the debugger with a breakpoint on the throw.

GnuCash 3.1 will catch that exception in the date constructor. We'll release it tomorrow. At this point we can only hope that it will resolve this crash.
Comment 10 Subramanian 2018-04-30 02:53:37 UTC
Hi,

I installed Gnucash 3.1 and it now gives me an error when I try to open my Gnucash file saying that "There was an error parsing the file". I checked in Console for any reports  but could not find one.

Regards,
Subramanian V.
Comment 11 John Ralls 2018-04-30 03:02:19 UTC
Well, that's an improvement over a hard crash.
Open /Applications/Utilities/Terminal and at the prompt run
  /Applications/Gnucash.app/Contents/MacOS/Gnucash --debug --extra
After it fails to load your file, quit.

Note any output to the Terminal. Attach the tracefile (https://wiki.gnucash.org/wikt/Tracefile) here.
Comment 12 Subramanian 2018-04-30 03:26:30 UTC
I found the gnucash.trace file and found a wrong date entry under price date. All the entries in the Accounts file were correct, but the issue was related to a price entry maintained for a stock incorrectly with date as 04/01/105. I rectified this and now it started working.

Thanks a million for all the help.

Regards,
Subramanian V.
Comment 13 John Ralls 2018-04-30 03:49:47 UTC
So another hole in the bad-date logic, changed the title accordingly. Thanks for the detective work.
Comment 14 John Ralls 2018-06-14 16:38:31 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Comment 15 John Ralls 2018-06-30 00:08:26 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=795276. Please update any external references or bookmarks.