Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341461

Summary: Page break between image and non image
Product: z_Archived Reporter: Mr X <christian.stoehr>
Component: BIRTAssignee: Gang Liu <hustlg>
Status: VERIFIED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier
Version: 2.6.2   
Target Milestone: 3.7.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
birt_bug_report.rptdesign
none
birt_bug_data.xml none

Description Mr X CLA 2011-03-31 06:55:05 EDT
Build Identifier: Birt 2.6.2

If you set a Page break between image and non image (for example between a chart and a table), you will get an exception:

 java.lang.ClassCastException:
org.eclipse.birt.report.engine.nLayout.area.impl.ImageArea cannot be cast to
org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea



Reproducible: Always
Comment 1 Mr X CLA 2011-03-31 06:59:27 EDT
full stacktrace:

Caused by: java.lang.ClassCastException: org.eclipse.birt.report.engine.nLayout.area.impl.ImageArea cannot be cast to org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockContainerArea.splitLines(BlockContainerArea.java:230)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockContainerArea._split(BlockContainerArea.java:462)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockContainerArea.split(BlockContainerArea.java:334)
	at org.eclipse.birt.report.engine.nLayout.area.impl.RootArea.autoPageBreak(RootArea.java:58)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.autoPageBreak(ContainerArea.java:136)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.autoPageBreak(ContainerArea.java:136)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.autoPageBreak(ContainerArea.java:136)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockTextArea.update(BlockTextArea.java:191)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockContainerArea.close(BlockContainerArea.java:126)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockTextArea.close(BlockTextArea.java:103)
	at org.eclipse.birt.report.engine.nLayout.area.impl.BlockTextArea.layout(BlockTextArea.java:74)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContent(LayoutEngine.java:488)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startText(ContentEmitterAdapter.java:147)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startLabel(ContentEmitterAdapter.java:153)
	at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startLabel(CompositeContentEmitter.java:282)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:65)
	at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startContent(HTMLTableLayoutEmitter.java:146)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startText(ContentEmitterAdapter.java:147)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startLabel(ContentEmitterAdapter.java:153)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:65)
	at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:116)
	at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287)
	at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
	... 42 more
Comment 2 Xiaoying Gu CLA 2011-03-31 23:06:42 EDT
(In reply to comment #0)
> Build Identifier: Birt 2.6.2
> 
> If you set a Page break between image and non image (for example between a
> chart and a table), you will get an exception:
> 
>  java.lang.ClassCastException:
> org.eclipse.birt.report.engine.nLayout.area.impl.ImageArea cannot be cast to
> org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea
> 
> 
> 
> Reproducible: Always

Would you please attache the report design?
I can not reproduce this issue with a normal chart+table.
Comment 3 Mr X CLA 2011-04-01 03:35:42 EDT
I sue Birt Report Engine Runtime 2.6.2 and generate a PDF.
Comment 4 Mr X CLA 2011-04-01 03:36:45 EDT
sorry: "use", not "sue"
Comment 5 Mr X CLA 2011-04-01 03:56:29 EDT
Created attachment 192337 [details]
birt_bug_report.rptdesign
Comment 6 Mr X CLA 2011-04-01 03:57:02 EDT
Created attachment 192338 [details]
birt_bug_data.xml
Comment 7 Gang Liu CLA 2011-04-12 22:36:24 EDT
fixed
Comment 8 Xiaoying Gu CLA 2011-04-12 22:43:08 EDT
Verified in daily build 3.7.0.v20110413-0630.