Bug 448830 - fop crashes on the .fo file with included graphics
Summary: fop crashes on the .fo file with included graphics
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fop
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Lillian Angel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-28 21:36 UTC by Matěj Cepl
Modified: 2018-04-11 13:13 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-05-30 19:20:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
stdout/stderr from the command (6.33 KB, text/plain)
2008-05-28 21:36 UTC, Matěj Cepl
no flags Details
FOP file (61.75 KB, text/plain)
2008-05-28 21:37 UTC, Matěj Cepl
no flags Details
One image file (323 bytes, image/png)
2008-05-28 21:38 UTC, Matěj Cepl
no flags Details
Second image file (323 bytes, text/plain)
2008-05-28 21:38 UTC, Matěj Cepl
no flags Details
Second image file (6.36 KB, image/png)
2008-05-28 21:38 UTC, Matěj Cepl
no flags Details
fop.xsd from the above mentioned apache.org URL (224.82 KB, text/plain)
2008-05-29 15:21 UTC, Matěj Cepl
no flags Details
source XML document (848 bytes, text/plain)
2008-05-29 15:22 UTC, Matěj Cepl
no flags Details
XSLT stylesheet to generate FO file (1.71 KB, text/plain)
2008-05-29 15:23 UTC, Matěj Cepl
no flags Details
generated xsl-fo file (1.05 KB, text/plain)
2008-05-29 15:24 UTC, Matěj Cepl
no flags Details
stderr from fop -fo output.fo -pdf output.pdf (5.69 KB, text/plain)
2008-05-29 15:25 UTC, Matěj Cepl
no flags Details

Description Matěj Cepl 2008-05-28 21:36:50 UTC
Description of problem:
Running attached .fo files with two .png files crashes fop with the attached
backtrace.

Version-Release number of selected component (if applicable):
fop-0.95-0.2.beta1.noarch

How reproducible:
100%

Steps to Reproduce:
1.fop article.fo article.fop
2.
3.
  
Actual results:
collect backtrace

Expected results:
pdf

Additional info:

Comment 1 Matěj Cepl 2008-05-28 21:36:50 UTC
Created attachment 306989 [details]
stdout/stderr from the command

Comment 2 Matěj Cepl 2008-05-28 21:37:42 UTC
Created attachment 306990 [details]
FOP file

Comment 3 Matěj Cepl 2008-05-28 21:38:01 UTC
Created attachment 306991 [details]
One image file

Comment 4 Matěj Cepl 2008-05-28 21:38:13 UTC
Created attachment 306992 [details]
Second image file

Comment 5 Matěj Cepl 2008-05-28 21:38:27 UTC
Created attachment 306993 [details]
Second image file

Comment 6 Matěj Cepl 2008-05-29 11:51:39 UTC
yes I found out that attachment 306990 [details] is not valid XSL-FO, but it is said to
work with fop based on Sun JRE.

Comment 7 Matěj Cepl 2008-05-29 15:20:45 UTC
So, just to be sure that input is correct, I have remade my set to be good
XSL-FO to the best of my knowledge. I had a problem to be sure what actually is
a valid XSL-FO, so I have settled on XML Scheme from
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop.xsd?view=co
and I have fixed an example from
http://www.cafeconleche.org/books/bible2/chapters/ch18.html#d1e4318 to be valid
according to this scheme.

Comment 8 Matěj Cepl 2008-05-29 15:21:41 UTC
Created attachment 307088 [details]
fop.xsd from the above mentioned apache.org URL

Comment 9 Matěj Cepl 2008-05-29 15:22:21 UTC
Created attachment 307089 [details]
source XML document

Comment 10 Matěj Cepl 2008-05-29 15:23:40 UTC
Created attachment 307090 [details]
XSLT stylesheet to generate FO file

Comment 11 Matěj Cepl 2008-05-29 15:24:26 UTC
Created attachment 307091 [details]
generated xsl-fo file

Comment 12 Matěj Cepl 2008-05-29 15:25:27 UTC
Created attachment 307092 [details]
stderr from fop -fo output.fo -pdf output.pdf

Comment 13 Matěj Cepl 2008-05-29 15:40:58 UTC
I don't know what's the deal with region-before stuff. The original example from
cafeonleche.org had <fo:region-before .../> element before <fo:region-body/> and
xmllint broke on this. No idea, how is wrong -- whether apache's .xsd or our fop.

Comment 14 Lillian Angel 2008-05-29 17:37:53 UTC
What is the exact command you are running to reproduce this? All the attachments
have been saved as text/plain, and I am not sure what they should really be.

Comment 15 Matěj Cepl 2008-05-30 10:51:19 UTC
attachment 307091 [details] is generated by

xsltproc -o output.fo stylesheet.xsl testdoc.xml

where
   output.fo is attachment 307091 [details]
   stylesheet.xsl is attachment 307090 [details]
   testdoc.xml is attachment 307089 [details]

Checking of validity of XSL-FO file I used

   xmllint --schema fop.xsd --noout output.fo

where
   fop.xsd is attachment 307088 [details]

Generating of PDF I attempted with

   fop -fo output.fo -pdf output.pdf >output-log.txt 2>&1

where
   output-log.txt is attachment 307092 [details]

Is this clear now? Sorry, for such a mess.

Comment 16 Lillian Angel 2008-05-30 14:04:51 UTC
Yes thank you. I will look into it.

Comment 17 Lillian Angel 2008-05-30 19:20:41 UTC
This isn't actually a problem with fop. The stylesheet is incorrect- for each
flow-name must correspond to a region-name. The region's (region-body,
region-after) should have a region-name property which is the same as the
corresponding flow-name.

xmllint didn't catch this because the file technically does not have incorrect
xml, but it does not follow fop's rules.

Closing.


Note You need to log in before you can comment on or make changes to this bug.