Jump to content
Changes to the Jaspersoft community edition download ×

100% CPU Usage generating a PDF


fxjr

Recommended Posts

Hi all,

 

I`m facing an strange problem here...

 

One of our reports is using 100% of cpu. I don`t know why it is doing that. Here is the stack trace:

 

My Jasper version is 0.5.0.

ibm jdk 1.5.0 (happens also with sun jdk 1.5 or 1.6)

CentosOS 5.0 64-bits

Jboss

 

sun.font.SunLayoutEngine.nativeLayout(Native Method)

sun.font.SunLayoutEngine.layout(SunLayoutEngine.java:154)

sun.font.GlyphLayout$EngineRecord.layout(GlyphLayout.java:580)

sun.font.GlyphLayout.layout(GlyphLayout.java:401)

sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:284)

sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:269)

sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:180)

sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:102)

java.awt.font.TextLine.init(TextLine.java:270)

java.awt.font.TextLine.(TextLine.java:124)

java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:492)

java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:623)

java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:449)

java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:417)

dori.jasper.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:428)

dori.jasper.engine.fill.JRFillStaticText.prepare(JRFillStaticText.java:236)

dori.jasper.engine.fill.JRFillBand.prepareElements(JRFillBand.java:562)

dori.jasper.engine.fill.JRFillBand.fill(JRFillBand.java:479)

dori.jasper.engine.fill.JRFillBand.fill(JRFillBand.java:450)

dori.jasper.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1148)

dori.jasper.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:649)

dori.jasper.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:274)

dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:182)

dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:524)

dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:159)

dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)

dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:337)

 

 

I know this is from a previous version of Jasper, but I tested with a newer version and the problem persists. I will try to generate a stack trace from a newer version.

 

Do you have any idea of why this may be happening?

 

Maybe is some weird font in centos? or maybe some missing font?

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi all!

 

This is the stack trace using newer jasper reports:

 

sun.font.FileFontStrike.getGlyphMetrics(FileFontStrike.java:578)

sun.font.SunLayoutEngine.nativeLayout(Native Method)

sun.font.SunLayoutEngine.layout(SunLayoutEngine.java:154)

sun.font.GlyphLayout$EngineRecord.layout(GlyphLayout.java:580)

sun.font.GlyphLayout.layout(GlyphLayout.java:401)

sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:284)

sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:269)

sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:180)

sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:102)

java.awt.font.TextLine.init(TextLine.java:270)

java.awt.font.TextLine.(TextLine.java:124)

java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:492)

java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:623)

java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:449)

java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:417)

net.sf.jasperreports.engine.fill.TextMeasurer.renderParagraph(TextMeasurer.java:275)

net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:230)

net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:528)

net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:529)

net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343)

net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:323)

net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:282)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1348)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:662)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:252)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)

net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:763)

net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:688)

net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:526)

net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)

net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209)

java.lang.Thread.run(Thread.java:803)

 

 

 

I hope it helps.

Link to comment
Share on other sites

  • 1 month later...

I have a similar problem with jaspereports 1.3.4 using a custom report size.

It appears to be due to one or more text fields with setStretchWithOverflow(true) overflowing.

This triggers an infinite 'overflow to the next page' loop, until the jvm runs out of memory.

 

In any case, the problem was resolved by changing the text fields to setStretchWithOverflow(false).

 

If I get time, I'll try and create a test case to reproduce.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...