Jump to content
We've recently updated our Privacy Statement, available here ×

mmastrangelo

Members
  • Posts

    5
  • Joined

  • Last visited

mmastrangelo's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Henry, I also identified that as the infinite while loop. This behavior has been very problematic for us as we allow users to customize their own reports in a production environment. To address this, I have created a forked version of JRVerticalFiller that implements a tolerance level of 100 max fill attempts. This seems to have greatly reduced the occurrences of the infinite loop. To implement this, the code snippet changes as follows: Code: while (band.willOverflow()) { fillPageBreak(false, evaluation, evaluation, true); printBand = band.fill(columnFooterOffsetY - offsetY - band.getHeight()); fillBand(printBand); offsetY += printBand.getHeight(); loopCount++; if (loopCount > MAX_FILL_ATTEMPTS) { throw new JRException("Max page band fill attempts exceeded"«»); } } Ultimately, it would be nice if this behavior was built into the JasperReports engine. The MAX_FILL_ATTEMPTS constant could become an optional parameter. Hope this helps.
  2. I haven't had a chance to post the tolerance level code yet. I'm hoping to have some time in the coming days to devote to this. I'm encouraged that users see this as a viable way to address the infinite looping problem.
  3. Hello, The tolerance level is a solution I implemented on my own by changing the source code. It is not part of JasperReports. I suggested this as a possible solution to prevent the infinite looping. I would be willing to share this code if Teodor thinks it could be useful. Matt Post edited by: mmastrangelo, at: 2006/10/10 15:07
  4. Teodor, Thanks for replying. We have addressed this issue by introducing a tolerance level in JRVerticalFiller. The tolerance level specifies the number of loops to allow; if it is exceeded, an exception is thrown. A possible solution could be to add a new attribute to the report design XML that allows users to specify such a tolerance level. This way it could be tailored to the needs of the report. Thanks, Matt
  5. For various reasons, it is possible for the JasperReports engine to enter into an infinite loop while filling a report. Within this infinite loop, memory is slowly consumed until an OutOfMemoryError occurs, thus rendering the JVM useless until is is restarted. This behavior has been documented many times on this forum, and the typical response is that a report design issue is to blame. In my opinion, this makes JasperReports a danger to run in a production environment. Our application allows users to create their own reports and run them on the system. If they make a "mistake" on the design, however, they can actually cause a memory-chewing infinite loop on the production system. Is this going to be addressed in a future release? Aside from this problem, JasperReports is a great product. This is definitely a huge concern for anyone wanting to integrate it into a mission critical application. Post edited by: mmastrangelo, at: 2006/09/28 15:35
×
×
  • Create New...