You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <ji...@apache.org> on 2018/10/14 17:00:00 UTC
[jira] [Resolved] (VELOCITY-886) Loop causes OutOfMemoryError
exception
[ https://issues.apache.org/jira/browse/VELOCITY-886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson resolved VELOCITY-886.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.1
Fixed by commit 1843853.
> Loop causes OutOfMemoryError exception
> --------------------------------------
>
> Key: VELOCITY-886
> URL: https://issues.apache.org/jira/browse/VELOCITY-886
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.7
> Environment: Windows 7 OS. Java -Xms1024m -Xmx1024m
> Reporter: ventsy velev
> Assignee: Claude Brisson
> Priority: Major
> Labels: exception-handling, perfomance
> Fix For: 2.1
>
> Attachments: velocityError.png
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org