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 428133 - Stack overflow using --add-price-quotes
Stack overflow using --add-price-quotes
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Engine
git-master
Other Mac OS
: Normal major
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: 347575
 
 
Reported: 2007-04-10 04:54 UTC by Mike Alexander
Modified: 2018-06-29 21:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to increase stack size for add-price-quotes (449 bytes, patch)
2007-04-10 16:29 UTC, Mike Alexander
none Details | Review

Description Mike Alexander 2007-04-10 04:54:04 UTC
If I run GnuCash SVN version 15857 with the --add-price-quotes parameter I get a guile stack overflow on the call to scm_c_resolve_module("gnucash price-quotes") in inner_main_add_price_quotes.  This is happening in a build of unmodified R15857 on MacOSX 10.4 using Guile 1.6.8.  It doesn't matter what file I give it since it never gets far enough to try to open it.  Running it without any parameters then adding price quotes using the GUI works.
Comment 1 Derek Atkins 2007-04-10 12:06:35 UTC
Could you actually attach (or inline) the stack trace?
Comment 2 Mike Alexander 2007-04-10 15:48:28 UTC
Do you have any idea how to get a Scheme stack trace after a Scheme stack overflow?  The C stack trace isn't very interesting since this is a Scheme stack overflow, not a C stack overflow.  I tried adding 

      scm_c_eval_string("(debug-enable 'backtrace)");

to the front of inner_main_add_price_quotes, but that didn't seem to have any effect.
Comment 3 Derek Atkins 2007-04-10 15:52:28 UTC
Um, I thought it's usually just printed on the terminal.
Comment 4 Mike Alexander 2007-04-10 16:29:00 UTC
Created attachment 86119 [details] [review]
Patch to increase stack size for add-price-quotes

Yes, normally, but apparently not after a stack overflow.

However, this may just be a case of needing more than the default stack.  Adding

    scm_c_eval_string("(debug-set! stack 200000)");

to inner_main_add_price_quotes fixes the problem.  I see that main.scm contains a similar call, but it isn't executed in this case.  Putting this in some Scheme file sounds better, but it doesn't get far enough to execute any of our Scheme files.  The default stack is only 20000 which isn't much.

The attached patch makes this change.
Comment 5 Derek Atkins 2007-04-21 19:42:41 UTC
Fixed in trunk in r15966.
Awaiting backport.
Comment 6 Derek Atkins 2007-07-04 19:08:54 UTC
There's no more backporting, so I'm marking this as fixed.  This was fixed in 2.1.1.
Comment 7 John Ralls 2018-06-29 21:31:17 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=428133. Please update any external references or bookmarks.