Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3320

Nested @ref bindings in Shadow elements with same variable name cause Stack overflow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.3
    • Fix Version/s: 8.5.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.0.4 S2

      Description

      steps to reproduce

      http://zkfiddle.org/sample/1a1kgnt/1-NestedAtRefBindingStackOverflow
      Run fiddle (code attached to ticket)

      actual result

      Stack overflow

      Sep 08, 2016 6:41:24 PM org.zkoss.zk.ui.impl.UiEngineImpl handleError
      SEVERE: 
      java.lang.StackOverflowError
      	at org.zkoss.zk.ui.ext.Scopes.getImplicit(Scopes.java:138)
      	at org.zkoss.zk.scripting.util.GenericInterpreter.getImplicit(GenericInterpreter.java:308)
      	at org.zkoss.zk.scripting.bsh.BSHInterpreter.access$400(BSHInterpreter.java:86)
      	at org.zkoss.zk.scripting.bsh.BSHInterpreter$GlobalNS.getFromScope(BSHInterpreter.java:450)
      	at org.zkoss.zk.scripting.bsh.BSHInterpreter$AbstractNS.getVariableImpl(BSHInterpreter.java:402)
      	at bsh.NameSpace.getVariable(NameSpace.java:726)
      	at bsh.Name.resolveThisFieldReference(Name.java:589)
      	at bsh.Name.consumeNextObjectField(Name.java:236)
      	at bsh.Name.toObject(Name.java:196)
      	at bsh.Name.toObject(Name.java:179)
      	at bsh.NameSpace.get(NameSpace.java:233)
      	at bsh.Interpreter.get(Interpreter.java:841)
      	at org.zkoss.zk.scripting.bsh.BSHInterpreter.get(BSHInterpreter.java:166)
      	at org.zkoss.zk.scripting.bsh.BSHInterpreter.get(BSHInterpreter.java:185)
      	at org.zkoss.zk.scripting.util.GenericInterpreter.getVariable(GenericInterpreter.java:436)
      	at org.zkoss.zk.ui.impl.PageImpl.getZScriptVariable(PageImpl.java:624)
      	at org.zkoss.zk.xel.impl.ExecutionResolver.resolveVariable(ExecutionResolver.java:160)
      	at org.zkoss.zk.xel.impl.ExecutionResolver.resolveVariable(ExecutionResolver.java:72)
      	at org.zkoss.bind.impl.BindEvaluatorXImpl$1.resolveVariable(BindEvaluatorXImpl.java:123)
      	at org.zkoss.xel.zel.XelELResolver.resolve(XelELResolver.java:123)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:109)
      	at org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:83)
      	at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
      	at org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.getValue(ValueExpressionImplEx.java:52)
      	at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
      	at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.evaluate(BindEvaluatorXImplEx.java:124)
      	at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:46)
      	at org.zkoss.bind.impl.ReferenceBindingImpl.load(ReferenceBindingImpl.java:91)
      	at org.zkoss.bind.impl.ReferenceBindingImpl.getValue(ReferenceBindingImpl.java:62)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:143)
      	at org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:83)
      	at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
      	at org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.getValue(ValueExpressionImplEx.java:52)
      	at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
      	at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.evaluate(BindEvaluatorXImplEx.java:124)
      	at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:46)
      	at org.zkoss.bind.impl.ReferenceBindingImpl.load(ReferenceBindingImpl.java:91)
      	at org.zkoss.bind.impl.ReferenceBindingImpl.getValue(ReferenceBindingImpl.java:62)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:143)
      	at org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:83)
      

      expected result

      No error / handled error "duplicated name 'myParam' in..."

      debug info

      root cause

      Workaround

        Attachments

          Activity

            People

            Assignee:
            wenninghsu wenninghsu
            Reporter:
            MDuchemin MDuchemin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h