GNOME Bugzilla – Bug 428133
Stack overflow using --add-price-quotes
Last modified: 2018-06-29 21:31:17 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.
Could you actually attach (or inline) the stack trace?
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.
Um, I thought it's usually just printed on the terminal.
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.
Fixed in trunk in r15966. Awaiting backport.
There's no more backporting, so I'm marking this as fixed. This was fixed in 2.1.1.
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.