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 626910 - Error parsing file at startup
Error parsing file at startup
Status: RESOLVED DUPLICATE of bug 611853
Product: GnuCash
Classification: Other
Component: Backend - XML
2.3.x
Other Windows
: Normal major
: ---
Assigned To: Andreas Köhler
Andreas Köhler
Depends on:
Blocks:
 
 
Reported: 2010-08-14 07:45 UTC by Jack Prime
Modified: 2018-06-29 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GnuCash data file (2.51 KB, application/x-gzip-compressed)
2010-08-14 07:45 UTC, Jack Prime
Details
tracefile 3 (510 bytes, application/octet-stream)
2010-08-27 20:27 UTC, Roger
Details
tracefile 2 (326 bytes, application/octet-stream)
2010-08-27 20:28 UTC, Roger
Details
tracefile 1 (206 bytes, application/octet-stream)
2010-08-27 20:29 UTC, Roger
Details

Description Jack Prime 2010-08-14 07:45:46 UTC
Created attachment 167856 [details]
GnuCash data file

Hi,

I've just started using GnuCash and created my first accounts & transactions yesterday. I saved the file with no problem using the filename MyMoney (with no file extension) on my Z: drive (a network-attached hard disk). However when I tried to re-start GnuCash to add further transactions and accounts (I'm migrating from MS Money 99 (!), I get the error message 'There was an error parsing the file Z:\Money\MyMoney.' - the file isn't opened but GnuCash starts with a blank screen.

I've attached my data file.

I hope you can offer a solution.

Regards

Jack
Comment 1 Christian Stimming 2010-08-16 06:57:44 UTC
Can you also check with the latest development versions 2.3.14 or 2.3.15? Also, can you check the trace file http://wiki.gnucash.org/wiki/Tracefile whether there are any error messages when the loading fails? Thanks for the test data file anyway!
Comment 2 Roger 2010-08-27 20:09:18 UTC
I am getting this also - same version & platform.
Any new file created & saved can't be re-opened once it has been closed.
It seems independent of save location or file name.


The tracefile has some info:
*   WARN <qof.engine> [guid_init()] only got 2237 bytes.
The identifiers might not be very random.
*   WARN <gnc.app-util> Could not spawn perl: Failed to execute child process (No such file or directory)
*   CRIT <gnc.io> [dom_tree_handlers_all_gotten_p()] Not defined and it should be: trn:date-posted
*   CRIT <gnc.io> [dom_tree_generic_parse()] didn't find all of the expected tags in the input
*   CRIT <gnc.io> [dom_tree_handlers_all_gotten_p()] Not defined and it should be: trn:date-posted
*   CRIT <gnc.io> [dom_tree_generic_parse()] didn't find all of the expected tags in the input

There is also a prior tracefile from 2 mins ealier that has something different.
*   WARN <qof.engine> [guid_init()] only got 2237 bytes.
The identifiers might not be very random.
*   WARN <gnc.app-util> Could not spawn perl: Failed to execute child process (No such file or directory)
*   WARN <gnc.backend.file> The example account file should declared a ROOT account before declaring any other accounts.
*   CRIT <Gtk> shortcuts_add_bookmark_from_file: assertion `G_IS_FILE (file)' failed

Prior failures with the same issue have created 2 tracefiles each. They contain the same wording, although sometimes the lines have been repeated more times.
Comment 3 Roger 2010-08-27 20:27:55 UTC
Created attachment 168924 [details]
tracefile 3
Comment 4 Roger 2010-08-27 20:28:52 UTC
Created attachment 168925 [details]
tracefile 2
Comment 5 Roger 2010-08-27 20:29:42 UTC
Created attachment 168926 [details]
tracefile 1
Comment 6 Roger 2010-08-27 20:39:33 UTC
Apologies for creating so many comments rather than a single one - new to this!

I have installed 2.3.15 svn r19437 and re-created the issue.

Sequence was:
Start up gnucash 2.3.15
File->New->New File
Walk through wizard accepting default GBP currency, adding "Home Morgage Loan" & "Homeowner Expenses" to the standard accounts.
At end of wizard save as xml in new sub dir of "My Documents"
Add 2 new accounts under Assets:Current Assets both having starting balances & both of type Bank.
Save again
Close program
Reopen
Error message recieved "There was an error parsing the file file://C:\Documents and Settings\Roger\My Documents\Personal Finance\test2\test_accs.gnucash."

The 3 tracefiles in the preceeding comments were created around the time of the sequence & are from the 2.3.15 failure described here.

Hope this is of use.
Regards
Roger
Comment 7 Geert Janssens 2011-01-25 11:22:48 UTC
(In reply to comment #6)
> Sequence was:
> Start up gnucash 2.3.15
> File->New->New File
> Walk through wizard accepting default GBP currency, adding "Home Morgage Loan"
> & "Homeowner Expenses" to the standard accounts.
> At end of wizard save as xml in new sub dir of "My Documents"
> Add 2 new accounts under Assets:Current Assets both having starting balances &
> both of type Bank.
I presume you used the Opening Balance tab to set the starting balances. There is a known bug in this tab (bug 611853) that if you only enter two-digit years the opening date won't be stored in the data file and you will get parsing errors on subsequent opening of the file.

Can you check if this is the same problem please ?

Here's how:
- create a new file
- add an account, and use the Opening Balance tab to set an opening balance
- be sure to enter 4 digits for the year in the date field (or use the calendar popup to select a date)
- save and close the file
- reopen the file
=> this should produce no error
- add another account and use the Opening Balance tab to set the opening balance. This time, only enter two digits for the date's year.
- save and close the file
- reopen the file
=> you should now have the parsing error you had before.
Comment 8 Geert Janssens 2011-01-25 16:04:19 UTC
(In reply to comment #0)
> Created an attachment (id=167856) [details]
> GnuCash data file
> 
> Hi,
> 
> I've just started using GnuCash and created my first accounts & transactions
> yesterday. I saved the file with no problem using the filename MyMoney (with no
> file extension) on my Z: drive (a network-attached hard disk). However when I
> tried to re-start GnuCash to add further transactions and accounts (I'm
> migrating from MS Money 99 (!), I get the error message 'There was an error
> parsing the file Z:\Money\MyMoney.' - the file isn't opened but GnuCash starts
> with a blank screen.
> 
> I've attached my data file.
> 
> I hope you can offer a solution.
> 
> Regards
> 
> Jack

@Jack:
I have looked at the data file you have added in attachment. It has the same symptoms: it is missing a date-posted field for one of the transactions in the Opening Balances account. Did you also create a new account and entered an opening balance via the Opening balance tab of the account window ?
Comment 9 Christian Stimming 2011-02-15 09:19:23 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 10 Roger 2011-02-20 20:39:48 UTC
(In reply to comment #9)
> Closing this bug report as no further information has been provided. Please
> feel free to reopen this bug if you can provide the information asked for.
> Thanks!

Hi Geert/Christian,
I have replicated the error as you describe, I guess I could have been creating the balance using 2 digit dates, however I thought I had used the calendar rather than typing, I dont have any notes one way or another.
Comment 11 Geert Janssens 2011-02-25 11:08:21 UTC
(In reply to comment #10)
> Hi Geert/Christian,
> I have replicated the error as you describe, I guess I could have been creating
> the balance using 2 digit dates, however I thought I had used the calendar
> rather than typing, I dont have any notes one way or another.

Roger, would you mind just running a test to verify if you get the problem also if you use the calendar instead of typing a date ? That might be yet another variant of the problem.
To test,
* make a copy of your data file,
* open that copy with GnuCash
* Add a new account, and set the opening balance date using the calendar widget.
* Save and close the file, then reopen it and see if you get the parsing error.
Comment 12 Sergei Z. 2011-02-28 06:38:37 UTC
This may be related (Windows Vista 64-bit, US locale)

1. This morning (2/27/11) I downloaded GnuCash v2.4.2 knowing it couldn't do sqlite. So while working with xml I ran into "file parsing" error a few times.

2. Just now I noticed v.2.4.3, downloaded it, saved my file to sqlite format. Continued working and ran into a crash (the "Problem signature" as provided by Windows will be pasted below.)

3. The problem is reproducible when creating a new account AND entering a non-zero opening balance AND (indicating a date using two digits OR using a calendar AFTER entering two digits (which will result in something like 2/11/1910, if entered 2/11/10), OR just entering 2/11/1910).

So, it looks like gnucash doesn't like those early years. I didn't investigate at which point (what year) this problem would disappear.

Here's the problem signature:
##################################
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	gnucash.exe
  Application Version:	0.0.0.0
  Application Timestamp:	4d6a24d3
  Fault Module Name:	libgnc-backend-sql-0.dll
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	4d6a1f4c
  Exception Code:	c0000005
  Exception Offset:	00005722
  OS Version:	6.0.6002.2.2.0.256.6
  Locale ID:	1033
  Additional Information 1:	fd00
  Additional Information 2:	ea6f5fe8924aaa756324d57f87834160
  Additional Information 3:	fd00
  Additional Information 4:	ea6f5fe8924aaa756324d57f87834160

Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
##################################
Comment 13 Roger 2011-03-03 21:21:43 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Hi Geert/Christian,
> > I have replicated the error as you describe, I guess I could have been creating
> > the balance using 2 digit dates, however I thought I had used the calendar
> > rather than typing, I dont have any notes one way or another.
> 
> Roger, would you mind just running a test to verify if you get the problem also
> if you use the calendar instead of typing a date ? That might be yet another
> variant of the problem.
> To test,
> * make a copy of your data file,
> * open that copy with GnuCash
> * Add a new account, and set the opening balance date using the calendar
> widget.
> * Save and close the file, then reopen it and see if you get the parsing error.

Geert
No parsing error when following your test procedure.
Think I am happy to accept it was due to me typing the date.
Regards
Roger
Comment 14 Geert Janssens 2011-03-03 21:42:04 UTC
(In reply to comment #12)
> This may be related (Windows Vista 64-bit, US locale)
> 
> 1. This morning (2/27/11) I downloaded GnuCash v2.4.2 knowing it couldn't do
> sqlite. So while working with xml I ran into "file parsing" error a few times.
> 
> 2. Just now I noticed v.2.4.3, downloaded it, saved my file to sqlite format.
> Continued working and ran into a crash (the "Problem signature" as provided by
> Windows will be pasted below.)
> 
> 3. The problem is reproducible when creating a new account AND entering a
> non-zero opening balance AND (indicating a date using two digits OR using a
> calendar AFTER entering two digits (which will result in something like
> 2/11/1910, if entered 2/11/10), OR just entering 2/11/1910).
> 
> So, it looks like gnucash doesn't like those early years. I didn't investigate
> at which point (what year) this problem would disappear.
> 
GnuCash will only work with dates starting at 1/1/1970 (Windows) or 1/1/1969 (Linux). Older dates are not supported in some parts of the current code. I believe the date widget used on the opening balance tab is one of these parts. I'm not sure about other parts.

I think in general it would be good if GnuCash did at least do some more date validation checks.
Comment 15 Geert Janssens 2011-03-03 21:44:17 UTC
(In reply to comment #13)
> 
> Geert
> No parsing error when following your test procedure.
> Think I am happy to accept it was due to me typing the date.
> Regards
> Roger

Ok, thank you for checking that.

I will mark this report as a duplicate then of bug 611853.

*** This bug has been marked as a duplicate of bug 611853 ***
Comment 16 John Ralls 2018-06-29 22:43:02 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=626910. Please update any external references or bookmarks.