[jira] [Comment Edited] (FOP-2455) [Patch] Duplicated AFP resource objects

2015-11-26 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029103#comment-15029103
 ] 

Andreas L. Delmelle edited comment on FOP-2455 at 11/26/15 9:28 PM:


OK, done. Completely missed that the patch attached to the most recent mail was 
different... Sorry.

So, to make sure I understand correctly, the additional identity check is just 
to cover the case where both operands are null, right? 
(Obviously, in case they are truly one and the same instance, this change will 
even perform slightly better...)

EDIT - Note, just asking since, if this is not the reason, then maybe it is 
because one of the component fields does not have a proper implementation for 
equals, where it reverts to the default Object.equals() implementation, which 
produces unexpected results (?)


was (Author: adelmelle):
OK, done. Completely missed that the patch attached to the most recent mail was 
different... Sorry.

So, to make sure I understand correctly, the additional identity check is just 
to cover the case where both operands are null, right? 
(Obviously, in case they are truly one and the same instance, this change will 
even perform slightly better...)

> [Patch] Duplicated AFP resource objects
> ---
>
> Key: FOP-2455
> URL: https://issues.apache.org/jira/browse/FOP-2455
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/afp
>Affects Versions: trunk
>Reporter: Seifeddine Dridi
>  Labels: patch
> Fix For: trunk
>
> Attachments: CZARN00, T1001252, fop.xconf, patch-updated.diff, 
> patch.diff, test-fixed.afp, test.afp, test.fo
>
>
> When generating AFP documents, font resource objects are written as many 
> times as the number of formatting objects in which they were used.
> This regression was introduced after a commit made Glenn Adams to fix 
> FindBugs warnings (revision 1616590).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [AFP Renderer] Increased document size

2015-11-26 Thread Chris Bowditch


Thank you

On 25/11/2015 16:59, sdr...@iptech-group.com wrote:

Hi,

I already did that a long time ago
https://issues.apache.org/jira/browse/FOP-2455

-Message d'origine-
De : Chris Bowditch [mailto:bowditch_ch...@hotmail.com]
Envoyé : mercredi 25 novembre 2015 17:34
À : fop-dev@xmlgraphics.apache.org
Objet : Re: [AFP Renderer] Increased document size

Hi Seifeddine,

Can you log a bug in JIRA please so this issue is not forgotten?

Thanks,

Chris

On 20/11/2015 14:16, sdr...@iptech-group.com wrote:

Hello,

I’m using FOP Trunk in production and I noticed that the size of AFP
documents has substantially increased compared to FOP 1.1. After some
debugging, I found out that the issue is located in method equals
inside AFPResourceInfo.java; the current code does not handle the case
in which the two fields to be compared have null values. As far as I
know, two Java instances of the same type are considered equal if they
both have null values.

Attached to this email, you find all the files you need to reproduce
the afore mentioned issue.

Thanks,

Seifeddine DRIDI









[jira] [Resolved] (FOP-2455) [Patch] Duplicated AFP resource objects

2015-11-26 Thread Andreas L. Delmelle (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas L. Delmelle resolved FOP-2455.
--
Resolution: Fixed

Fixed in trunk - see http://svn.apache.org/viewvc?rev=1716732=rev

Thanks for the patch, and apologies for the rather long delay... :(

> [Patch] Duplicated AFP resource objects
> ---
>
> Key: FOP-2455
> URL: https://issues.apache.org/jira/browse/FOP-2455
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/afp
>Affects Versions: trunk
>Reporter: Seifeddine Dridi
>  Labels: patch
> Fix For: trunk
>
> Attachments: CZARN00, T1001252, fop.xconf, patch.diff, 
> test-fixed.afp, test.afp, test.fo
>
>
> When generating AFP documents, font resource objects are written as many 
> times as the number of formatting objects in which they were used.
> This regression was introduced after a commit made Glenn Adams to fix 
> FindBugs warnings (revision 1616590).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2455) [Patch] Duplicated AFP resource objects

2015-11-26 Thread Seifeddine Dridi (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Seifeddine Dridi updated FOP-2455:
--
Attachment: patch-updated.diff

Thanks for applying the patch, however if you run the FO example that I have 
attached in my email, you could see that the output AFP document is still big. 
To fix that,we need to compare every field in AFPResourceInfo with the target 
object (see patch-updated.diff)

Thanks,

Seifeddine Dridi

> [Patch] Duplicated AFP resource objects
> ---
>
> Key: FOP-2455
> URL: https://issues.apache.org/jira/browse/FOP-2455
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/afp
>Affects Versions: trunk
>Reporter: Seifeddine Dridi
>  Labels: patch
> Fix For: trunk
>
> Attachments: CZARN00, T1001252, fop.xconf, patch-updated.diff, 
> patch.diff, test-fixed.afp, test.afp, test.fo
>
>
> When generating AFP documents, font resource objects are written as many 
> times as the number of formatting objects in which they were used.
> This regression was introduced after a commit made Glenn Adams to fix 
> FindBugs warnings (revision 1616590).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2455) [Patch] Duplicated AFP resource objects

2015-11-26 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029103#comment-15029103
 ] 

Andreas L. Delmelle commented on FOP-2455:
--

OK, done. Completely missed that the patch attached to the most recent mail was 
different... Sorry.

So, to make sure I understand correctly, the additional identity check is just 
to cover the case where both operands are null, right? 
(Obviously, in case they are truly one and the same instance, this change will 
even perform slightly better...)

> [Patch] Duplicated AFP resource objects
> ---
>
> Key: FOP-2455
> URL: https://issues.apache.org/jira/browse/FOP-2455
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/afp
>Affects Versions: trunk
>Reporter: Seifeddine Dridi
>  Labels: patch
> Fix For: trunk
>
> Attachments: CZARN00, T1001252, fop.xconf, patch-updated.diff, 
> patch.diff, test-fixed.afp, test.afp, test.fo
>
>
> When generating AFP documents, font resource objects are written as many 
> times as the number of formatting objects in which they were used.
> This regression was introduced after a commit made Glenn Adams to fix 
> FindBugs warnings (revision 1616590).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-11-26 Thread Matthias Reischenbacher (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029190#comment-15029190
 ] 

Matthias Reischenbacher commented on FOP-2512:
--

Fixed in http://svn.apache.org/viewvc?view=revision=1716758

It's interesting to see how much bug reports are out there in the web about 
this same issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692556
https://github.com/dita-ot/dita-ot/issues/1822
http://jira.xwiki.org/browse/XWIKI-8274

My fix avoids to create an alpha raster, if the ColorModel implementation 
doesn't return one. This issue seems to affect only transparent PNGs with 
indexed color model. The alpha raster is used for the SMask entry in PDF. 
Transparency works in PDF even without SMask (any only with Mask) entry. Please 
let me know if there is anything wrong with my approach.

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
> Attachments: 16x16.png, 19x13.png, 22x22.png
>
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2455) [Patch] Duplicated AFP resource objects

2015-11-26 Thread Seifeddine Dridi (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029577#comment-15029577
 ] 

Seifeddine Dridi commented on FOP-2455:
---

The reason is simply that two objects should be considered equal if they are 
both null. If we only check if an object is different from null before invoking 
method equals(), then the two objects would be evaluated as different when they 
are both null.

> [Patch] Duplicated AFP resource objects
> ---
>
> Key: FOP-2455
> URL: https://issues.apache.org/jira/browse/FOP-2455
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/afp
>Affects Versions: trunk
>Reporter: Seifeddine Dridi
>  Labels: patch
> Fix For: trunk
>
> Attachments: CZARN00, T1001252, fop.xconf, patch-updated.diff, 
> patch.diff, test-fixed.afp, test.afp, test.fo
>
>
> When generating AFP documents, font resource objects are written as many 
> times as the number of formatting objects in which they were used.
> This regression was introduced after a commit made Glenn Adams to fix 
> FindBugs warnings (revision 1616590).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)