View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0006666 | ParaView | (No Category) | public | 2008-03-27 10:55 | 2009-05-13 13:47 | ||||
Reporter | Takuya OSHIMA | ||||||||
Assigned To | Zhanping Liu | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | 3.6 | Fixed in Version | |||||||
Summary | 0006666: vtkFunctionParser::OperatorWithinVariable() should search variable name until the location of idx | ||||||||
Description | I have a dataset which contains an array with the name say "A/B," which in turn contains a character that may be interpreted as a mathematical operator '/'. If I try to run Filter->Calculator and to evaluate an expression "A/B + A/B" over the dataset, I can't get the expected result (an array with all components doubled). The actual result depends on the expression (a parser error, an incorrect result array, etc.). | ||||||||
Additional Information | I think finding only the first occurrence of the array name within the given expression is not enough in vtkFunctionParser::OperatorWithinVariable(). At least the array name should be searched until the location of idx even if there was an occurrence prior to the location. The attached is a patch that worked for me. I know this is far from perfect as a fix (there are still many possible cases that can't be covered with this patch). Please take it just as a clarification of the solution that worked for me. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | patch1 [^] (1,927 bytes) 2008-03-27 10:55 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0013780) Zhanping Liu (developer) 2008-10-09 09:47 |
BUG: 0006666 has been fixed. The problem was due to the insufficient search, in this->Function, for a variable name containing a dumb operator. This incompleteness fails to capture such a variable name at index "idx" if there happens to be one or more occurrences (of the same variable name) preceding idx. As a consequence, vtkFunctionParser:: OperatorWithinVariable() --- (line1335 ~ line 1403) --- mistakenly reports 0. As suggested by 7islands, a greedy search scheme is now adopted to check through idx before reporting the result. The updated code allows for multiple occurrences of a varialbe name (containing a dumb operator) in this->Function and therefore leads to a more flexible function parser. Thanks, 7islands, for reporting the bug and the suggestions. new revision: 1.41; previous revision: 1.40 |
(0013929) Alan Scott (manager) 2008-10-24 20:04 |
No clue how to check this, assuming correct. Untested. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-03-27 10:55 | Takuya OSHIMA | New Issue | |
2008-03-27 10:55 | Takuya OSHIMA | File Added: patch1 | |
2008-04-10 17:44 | Ken Moreland | Category | 3.4 => 3.6 |
2008-09-23 11:21 | Berk Geveci | Status | backlog => tabled |
2008-09-23 11:21 | Berk Geveci | Assigned To | => Zhanping Liu |
2008-10-09 09:47 | Zhanping Liu | Note Added: 0013780 | |
2008-10-09 09:48 | Zhanping Liu | Status | tabled => @80@ |
2008-10-24 20:04 | Alan Scott | Note Added: 0013929 | |
2008-10-24 20:04 | Alan Scott | Status | @80@ => closed |
2008-10-24 20:04 | Alan Scott | Resolution | open => fixed |
2009-05-13 13:47 | Utkarsh Ayachit | Target Version | => 3.6 |
2011-06-16 13:10 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |