Bug 798313 - "File/Import/Import Transactions From CSV" crashes Gnucash.

Don't shutdown and re-initialize the expression parser after every parse,
doing so overflows the Guile garbage collector's memory-region array.

It also forces the expression parser to load the user expressions-2.0
for every parse which is extremely expensive.
This commit is contained in:
John Ralls 2021-10-16 16:20:20 -07:00
parent 09b3ce2382
commit fbf828476f

View File

@ -223,7 +223,6 @@ static GncNumeric parse_price (const std::string &str)
char *endptr;
auto success = gnc_exp_parser_parse (str.c_str(), &val, &endptr);
gnc_exp_parser_shutdown();
if (!success)
throw std::invalid_argument (_("Price can't be parsed into a number."));