[#14296] - Memory Leak when isPrintWhenDetailOverflows="true"

Category:
Bug report
Priority:
Urgent
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Issue: Memory Leak
After upgrading the jasperreports jar from 6.1.0 to 6.18.1 or higher, we came across a memory leak. Sample template is attached here. The templates we have in the system used jasperreports 6.1.1 to compile.

How to reproduce: The issue identified is when template has isPrintWhenDetailOverflows="true" on a detail band and the sub-report content is repeating exactly 2+4n times (specific for our template). This gets into a case where JRFillElementContainer.willOverFlow() becomes true indefinitely, and the isOverFlow flag is never set to false and executer gets into an infinite loop.

We were able to fix this issue by removing isPrintWhenDetailOverflows="true" attribute. But we cannot opt for this fix as we have hundreds of template that needs to be fixed and tested for this

Jrxml Files: attached (main-report.jrxml, sub-report.jrxml)
Jasper compiler version: jasperreports 6.1.1
Previous jasperreports.jar used: 6.1.0
Updated jasperreports.jar version - 6.18.1/6.19.0/6.19.1
Short term fix: Downgrade jasperreports version back to 6.1.0.

AttachmentSize
Binary Data main-report.jrxml27.85 KB
Binary Data sub-report.jrxml20.9 KB
Image icon jasperreports_memoryleak.png177.98 KB
v6.18
Engine util
remya.k's picture
Joined: Jun 23 2022 - 2:14am
Last seen: 1 month 4 weeks ago

2 Comments:

#1
  • Priority:High» Urgent
  • Severity:Major» Critical
#2
Feedback
randomness