Anonymous | Login | Signup for a new account | 2024-05-12 10:20 CEST |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000066 | openvibe-plugins | bug report | public | 2010-11-23 15:33 | 2013-11-08 15:44 | ||||
Reporter | lbonnet | ||||||||
Assigned To | jtlindgr | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | x86 | OS | Windows Seven | OS Version | 64b | ||||
Summary | 0000066: Simple DSP freezing with a "large" equation | ||||||||
Description | The equation tested is precisely: (3*sin(2*m_pi*x)) * (3*sin(2*m_pi*x)) A message is printed in the console: [ TRACE ] At time 0 (0x0)<Box algorithm::Simple DSP> Parsing equation [(3*sin(2*M_PI*x))*(3*sin(2*M_PI*x))]... And then it just freezes (I waited about 1 minute before hard-stop). When trying the equation (which is the same without unnecessary parenthesis): 3*sin(2*M_PI*x)*3*sin(2*M_PI*x) it works fine, I just have to wait few seconds. | ||||||||
Steps To Reproduce | Time signal + DSP with the equation, then signal display. | ||||||||
Additional Information | sample scenario provided | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | test.xml [^] (28,476 bytes) 2010-11-23 15:33 | ||||||||
Notes | |
(0001062) jtlindgr (administrator) 2013-01-21 16:56 |
Parsing the expression seems to lead to a hopelessly long recursive expansion inside boost. If we don't expect a bug in boost, I suspect there could be something fishy in the grammar specified in ovpCEquationParserGrammar.h. If rules for fun(expression) and (expression) are added to it, the example seems to work reasonably, but not being a grammar guru, I have no idea if this totally ruins the parsing for some other cases. The modded rules, function = (root_node_d[as_lower_d[unaryFunction_p]] >> no_node_d[ch_p('(')] >> expression >> no_node_d[ch_p(')')]) | (root_node_d[as_lower_d[unaryFunction_p]] >> no_node_d[ch_p('(')] >> ifthen >> no_node_d[ch_p(')')]) | (root_node_d[as_lower_d[binaryFunction_p]] >> no_node_d[ch_p('(')] >> infix_node_d[(ifthen >> ',' >> ifthen)] >> no_node_d[ch_p(')')]); factor = (function | constant | variable | real) | inner_node_d['(' >> expression >> ')'] | inner_node_d['(' >> ifthen >> ')'] | (root_node_d[ch_p('-')] >> factor) | (root_node_d[ch_p('+')] >> factor); |
(0001120) jtlindgr (administrator) 2013-11-08 15:44 |
After some testing, it appeared that adding inner_node_d['(' >> expression >> ')'] as a component of factor sufficed to address the issue. I also saw the same solution in some other parsers on the net. Preliminary tests did not indicate the mod to cause other problems, but it is challenging to test conclusively. Fixed in git #b98c1ebdc37568e5a7cd6b032785e247b261e779 |
Issue History | |||
Date Modified | Username | Field | Change |
2010-11-23 15:33 | lbonnet | New Issue | |
2010-11-23 15:33 | lbonnet | File Added: test.xml | |
2013-01-21 16:56 | jtlindgr | Note Added: 0001062 | |
2013-02-19 10:30 | jtlindgr | Status | new => acknowledged |
2013-02-19 10:31 | jtlindgr | Assigned To | => jtlindgr |
2013-02-19 10:31 | jtlindgr | Status | acknowledged => assigned |
2013-02-19 10:31 | jtlindgr | Status | assigned => confirmed |
2013-11-08 15:44 | jtlindgr | Note Added: 0001120 | |
2013-11-08 15:44 | jtlindgr | Status | confirmed => resolved |
2013-11-08 15:44 | jtlindgr | Resolution | open => fixed |
Copyright © 2000 - 2024 MantisBT Team |