Hi,
When pasting a long formula with syntax error into my UltraCalcManager, the application crashes. In order to reproduce the issue, a similiar formula to the below can be used:
IF(MONTH([[T_TRADEDATE]]) = 1, "(01) January",IF(MONTH([[T_TRADEDATE]]) = 2, "(02) February",IF(MONTH([[T_TRADEDATE]]) = 3, "(03) March",IF(MONTH([[T_TRADEDATE]]) = 4, "(04) April",IF(MONTH([[T_TRADEDATE]]) = 5, "(05) May",IF(MONTH([[T_TRADEDATE]]) = 6, "(06) June",IF(MONTH([[T_TRADEDATE]]) = 7, "(07) July",IF(MONTH([[T_TRADEDATE]]) = 8, "(08) August",IF(MONTH([[T_TRADEDATE]]) = 9, "(09) September",IF(MONTH([[T_TRADEDATE]]) = 10, "(10) October",IF(MONTH([[T_TRADEDATE]]) = 11, "(11) November",IF(MONTH([[T_TRADEDATE]]) = 12, "(12) December",”ERROR”))))))))))))
If I replace " with ', there is no syntax error and the application works good. I have tried debugging this and my thoughts are that, somehow, maybe due to all the syntax errors, the code is stuck in the recursive function that compiles the formula.
Any ideas why could this happen?
Thank you
Finally, we have found the solution: The problem seems to be locate in a function that performs formula parsing, it keeps trying to parse a token indefinitely once an error has been thrown. Proposed solution is to avoid processing the same token several times.
In this case the problematic token is the double quote for ERROR, which are not the regular ones.
Hi Hector,
I tried to reproduce this issue and I used a similar formula in my sample application. I got a syntax error saying it couldn’t compile the formula but my application did not crash. We are glad you were able to find a work around for this issue but we would like to identify the root cause. Can you please provide us additional details? When you are saying your application crashed, is it your designer that’s crashing? or is it your Winforms application that’s crashing?
Sincerely,
Sahaja Kokkalagadda
Associate Software Developer, Windows Forms
http://ko.infragistics.com/