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 742058 - Cannot obtain lock and when I open as read-only, dates are all wrong
Cannot obtain lock and when I open as read-only, dates are all wrong
Status: RESOLVED INCOMPLETE
Product: GnuCash
Classification: Other
Component: Windows
2.6.5
Other Windows
: Normal critical
: ---
Assigned To: gnucash-win-maint
gnucash-win-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-28 12:52 UTC by Jay
Modified: 2018-06-29 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash report (67.74 KB, image/png)
2014-12-28 12:52 UTC, Jay
Details
Bad dates in read-only open (6.77 KB, image/png)
2014-12-28 12:55 UTC, Jay
Details
Trace when running with --debug option. (5.70 KB, application/octet-stream)
2014-12-30 08:02 UTC, Jay
Details
Biggest trace I have (93.06 KB, application/octet-stream)
2014-12-30 17:13 UTC, Jay
Details

Description Jay 2014-12-28 12:52:41 UTC
Created attachment 293397 [details]
Crash report

System: Windows 7 64-bit, SP1, all non-language updates through 28/12/2014
CPU: Intel i7-3820
RAM: 64GB
HDD: 1 TB Samsung SSD

Recently updated to GnuCash 2.6.5 using the installer. Prior to installation, GnuCash was *not* running. Installer noticed older version of GnuCash and uninstalled it. Update installed successfully.

When I ran GnuCash, I received a notice that a lock could not be obtained. Because I knew that the file was not open, I checked the 'Open Anyway' option. I received a message that GnuCash had stopped working.

If I instead choose the 'Open Read Only' option, GnuCash opens and disaplys the data; however, the dates are way off. By that I mean that 201 dates show as xx/xx/2068, 2013 dates show as xx/xx/2067, 2012 dates show as xx/xx/2066, etc.
Comment 1 Jay 2014-12-28 12:55:35 UTC
Created attachment 293398 [details]
Bad dates in read-only open

This is a snip of one of the account registers showing the bad dates.
Comment 2 John Ralls 2014-12-28 17:23:48 UTC
Please attach the tracefiles (see http://wiki.gnucash.org/wiki/Tracefile) for the crash and a read-only start up.

If you create a new file are the dates borked on that too?

What locale and timezone is your PC set to?
Comment 3 Jay 2014-12-29 16:42:04 UTC
Hi - Thanks for the prompt response. To answer your questions:

1) I created a new file, and kept everything at the default, except currency was set to USD (was GBP). When I tried to open one of the accounts, I got the message gnucash.exe has stopped working.

2) My PC time zone is set to (UTC) Monrovia, Reykjavik, and the current location is United States. No changes here in over two years.

Got this when I started and opened the file as read-only:
* 22:31:10  WARN <gnc.app-utils> Could not spawn perl: Failed to execute child process (No such file or directory)

Got this when I opened the file and told it to open anyway:
* 22:33:55  WARN <gnc.app-utils> Could not spawn perl: Failed to execute child process (No such file or directory)

Don't know if it matters, but my data is saved locally in an XML file. Also, I opened as read-only and exported one account. Here is one of the records from that export:
10/12/2064,Groceries & Supplies,,Ingles,,,Jay,T,,N,$3.49,,3.49,,,
,,,,,,Groceries & Supplies,S,,N,$3.49,,3.49,,1.00,
,,,,,,Jay,S,,N,,-$3.49,,-3.49,,1.00
Comment 4 John Ralls 2014-12-29 22:59:32 UTC
Can you uncompress the original file and examine it in an editor? Search on "date-posted" and see what the date stamp looks like.

Please try running GnuCash from Start>Run... as 
c:\Program Files (x86)\gnucash\bin\gnucash --debug
then crash it again? The new file will be fine. Look at the end of the resulting trace file and see if it offers any clues to the crash.
Comment 5 Jay 2014-12-30 08:02:15 UTC
Created attachment 293464 [details]
Trace when running with --debug option.
Comment 6 Jay 2014-12-30 08:04:13 UTC
I ran as instructed with --debug. The resulting file output was over 110k, so I zipped it. I also opened my original file while GnuCash was running, and the dates appeared to be okay in the one account register I checked. I was thinking of trying the 'save as' option and see if I saved the file under a different name and then tried opening that.
Comment 7 John Ralls 2014-12-30 16:28:26 UTC
(In reply to comment #6)
> I ran as instructed with --debug. The resulting file output was over 110k,
> so I zipped it.

Thanks, but 110K isn't very big. It would have been OK to just upload it as-is.
Unfortunately there's nothing abnormal about it.

>  I also opened my original file while GnuCash was running, and the
> dates appeared to be okay in the one account register I checked.

Huh? You mean that after you start GnuCash, you can use File>Open or the recent list to open the file successfully? 

> I was thinking
> of trying the 'save as' option and see if I saved the file under a different
> name and then tried opening that.

OK, it's worth a try. You can also remove the .LCK file, or just copy the file to a different name in Windows Explorer.
Comment 8 Jay 2014-12-30 17:13:33 UTC
Created attachment 293486 [details]
Biggest trace I have
Comment 9 Jay 2014-12-30 17:16:13 UTC
Hi,

>Thanks, but 110K isn't very big. It would have been OK to just upload it as-is. Unfortunately there's nothing abnormal about it.

The 110K file was obtained from a new file with the default data set. Not that
I know what I am looking for in it; however, I didn't see anything unusual in
it either.

>Huh? You mean that after you start GnuCash, you can use File>Open or the >recent list to open the file successfully?

Yes, but only if I ran GnuCash with the --debug switch. If I run GnuCash any
other way, the app always crashes when I try to open my "good" data file.

>OK, it's worth a try. You can also remove the .LCK file, or just copy the file to a different name in Windows Explorer.

I removed the LCK file on my good file, and GnuCash crashes every time I try to
start it. If I execute with --debug switch, I can open my good file, which I
did, and saved it as another name. When I open it, GnuCash crashes every time,
just like with the original.

Any idea why the dates would be correct and the program does not crash when I
run it using --debug?

Thanks!
Comment 10 John Ralls 2014-12-30 18:29:18 UTC
(In reply to comment #9)
> Hi,
> 
> >Thanks, but 110K isn't very big. It would have been OK to just upload it as-is. Unfortunately there's nothing abnormal about it.
> 
> The 110K file was obtained from a new file with the default data set. Not that
> I know what I am looking for in it; however, I didn't see anything unusual in
> it either.
> 
> >Huh? You mean that after you start GnuCash, you can use File>Open or the >recent list to open the file successfully?
> 
> Yes, but only if I ran GnuCash with the --debug switch. If I run GnuCash any
> other way, the app always crashes when I try to open my "good" data file.
> 
> >OK, it's worth a try. You can also remove the .LCK file, or just copy the file to a different name in Windows Explorer.
> 
> I removed the LCK file on my good file, and GnuCash crashes every time I try to
> start it. If I execute with --debug switch, I can open my good file, which I
> did, and saved it as another name. When I open it, GnuCash crashes every time,
> just like with the original.
> 
> Any idea why the dates would be correct and the program does not crash when I
> run it using --debug?


Just to be clear, does it crash when you from the command window without the --debug switch, or have you tried that? What about if you change the shortcut, either on the Start menu or desktop, doesn't matter, to add --debug to the command line?
Comment 11 Geert Janssens 2015-12-08 16:36:37 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 12 John Ralls 2018-06-29 23:37:06 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=742058. Please update any external references or bookmarks.