Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-886

Loop causes OutOfMemoryError exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.1
    • Component/s: Engine
    • Environment:
      Windows 7 OS. Java -Xms1024m -Xmx1024m

      Description

      The following template will cause an out of memory exception.

      #foreach($i in [0..67000000])
      #if($i == 0)
      hi
      #end
      #end

      I'm not sure why this happens as it's only a loop that only produces output on the first iteration.
      The same loop works fine if I reduce the number of iterations by 1 order of magnitude.

      The engine fails hard and no output is produced.

        Attachments

        1. velocityError.png
          33 kB
          ventsy velev

          Activity

            People

            • Assignee:
              cbrisson Claude Brisson
              Reporter:
              ventsyv ventsy velev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: