GnuCash
Contact   Instructions
Bug 796759 - --add-price-quotes <sql file> leaves a lock on the file
Summary: --add-price-quotes <sql file> leaves a lock on the file
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: General (show other bugs)
Version: 3.2
Hardware: PC Mac OS
: Normal blocker
Target Milestone: ---
Assignee: general
QA Contact: general
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-14 10:14 EDT by Eric
Modified: 2018-07-15 15:13 EDT (History)
3 users (show)

See Also:


Attachments
tracefile from case where gnucash retrieves the prices and leaves the db locked (114.46 KB, text/plain)
2018-07-15 15:05 EDT, Eric
no flags Details

Description Eric 2018-07-14 10:14:05 EDT
Running /Applications/Gnucash.app/Contents/MacOS/Gnucash --add-price-quotes twice fails on the second (and subsequent) run because the database file is locked. I run this via an automator script each day to update prices. I don't know if the lock is also held on other OS's (eg Windows or linux)
Comment 1 John Ralls 2018-07-14 10:49:46 EDT
Are you sure GnuCash isn't crashing? Check the User Reports tab in /Applications/Utilities/Console for reports beginning with GnuCash.
Comment 2 Eric 2018-07-14 11:27:34 EDT
(In reply to John Ralls from comment #1)
> Are you sure GnuCash isn't crashing? Check the User Reports tab in
> /Applications/Utilities/Console for reports beginning with GnuCash.

Nothing related to GnuCash in the Console User Reports tab. AFAIK all prices are updated by the --add-price-quotes provided the database is not locked.  The app appears to end normally when run in a terminal session but terminates immediately if run a second time. Opening it interactively reveals that the database is locked.
Comment 3 John Ralls 2018-07-14 14:56:59 EDT
Hmm, when I try it I get a bunch of errors in the tracefile... I also don't get any prices. Can you run it by hand (after clearing the lock) and attach the resulting tracefile? https://wiki.gnucash.org/wiki/Tracefile.
Comment 4 John Ralls 2018-07-14 20:02:57 EDT
I found several issues and fixed them so that I can now retrieve prices into a SQLite3 db from the command line. The fix will be in 3.3.
Comment 5 Eric 2018-07-15 15:05:58 EDT
Created attachment 372919 [details]
tracefile from case where gnucash retrieves the prices and leaves the db locked


Thanks for your quick response, John.  I definitely get the prices, but can only do it once as it leaves the db locked.  Here's the tracefile in case you want to take a look. I ran it with --debug --extra.  If you want to make a binary available for me to test then please let me know.
Comment 6 John Ralls 2018-07-15 15:13:20 EDT
Comment on attachment 372919 [details]
tracefile from case where gnucash retrieves the prices and leaves the db locked

Didn't need --debug, the errors I'm looking for are all of the CRIT at the end of the trace. Yes, that's one of the problems I fixed, so all should be well.

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