[jira] [Commented] (FOP-3172) image-loading configuration settings are not thread-safe

2024-04-02 Thread Peter Hull (Jira)


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

Peter Hull commented on FOP-3172:
-

That looks straightforward but someone who knows the codebase better will have 
to comment on whether it relies on having one single registry shared across all 
components (the two-arg constructor you mention says "for testing purposes" in 
the comments)

> image-loading configuration settings are not thread-safe
> 
>
> Key: FOP-3172
> URL: https://issues.apache.org/jira/browse/FOP-3172
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
>Reporter: Martin Leitner
>Priority: Major
> Attachments: fop_3172.zip
>
>
> As a workaround for FOP-3171 I added an  section to the config 
> and noticed that the settings will take effect on all subsequent renderings 
> in the same VM, even when they use a different config or none at all. When 
> running two or more rendering processes with different configs in parallel, 
> the result will basically be random.
> At the very least, this behaviour should be documented and warned about.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Build failed in Jenkins: XMLGraphics » xmlgraphics-fop #324

2024-04-02 Thread Apache Jenkins Server
See 


Changes:


--
[...truncated 1.36 MB...]
 [exec] [INFO] Copying batik-css-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-svg-dom-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying hamcrest-core-1.3.jar to 

 [exec] [INFO] Copying batik-util-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying xmlgraphics-commons-2.9.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-parser-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-xml-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying fop-util-2.9.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-bridge-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-anim-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-codec-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-i18n-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-svggen-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO]  
   
 [exec] [INFO] 

 [exec] [INFO] Building Apache FOP Servlet 2.9.0-SNAPSHOT
 [exec] [INFO] 

 [exec] [INFO] 
 [exec] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
fop-servlet ---
 [exec] [INFO] Deleting 

 [exec] [INFO] 
 [exec] [INFO] --- maven-dependency-plugin:2.8:copy-dependencies 
(default-cli) @ fop-servlet ---
 [exec] [INFO] Copying batik-dom-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-constants-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-ext-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-extension-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying batik-script-1.17.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying fop-events-2.9.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying commons-logging-1.3.0.jar to 

 [exec] [INFO] Copying fop-2.9.0-SNAPSHOT.jar to 

 [exec] [INFO] Copying fop-core-2.9.0-SNAPSHOT.jar to 

[jira] [Resolved] (FOP-3174) Allow sections which need security permissions to be run when AllPermission denied in caller code

2024-04-02 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3174.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/64846a5c4ccdf0d900058fef60c2232926dbd6ad

> Allow sections which need security permissions to be run when AllPermission 
> denied in caller code
> -
>
> Key: FOP-3174
> URL: https://issues.apache.org/jira/browse/FOP-3174
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
>
> See FOP-3038



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (FOP-3174) Allow sections which need security permissions to be run when AllPermission denied in caller code

2024-04-02 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3174:
--

 Summary: Allow sections which need security permissions to be run 
when AllPermission denied in caller code
 Key: FOP-3174
 URL: https://issues.apache.org/jira/browse/FOP-3174
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (FOP-3174) Allow sections which need security permissions to be run when AllPermission denied in caller code

2024-04-02 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3174:
---
Description: See FOP-3038

> Allow sections which need security permissions to be run when AllPermission 
> denied in caller code
> -
>
> Key: FOP-3174
> URL: https://issues.apache.org/jira/browse/FOP-3174
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
>
> See FOP-3038



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (FOP-3172) image-loading configuration settings are not thread-safe

2024-04-02 Thread Martin Leitner (Jira)


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

Martin Leitner edited comment on FOP-3172 at 4/2/24 6:20 AM:
-

Thanks [~peterhull90] for the analysis! I totally agree that this is what is 
going on.

I do not see why there would be no simple way to avoid that.

I suggest to change line 420 in 
{color:#00}FopFactoryBuilder{color}$FopFactoryConfigImpl from
{code:java}
this.imageManager = new ImageManager(new ImageContextImpl(this));{code}
to

{code:java}
this.imageManager = new ImageManager(new ImageImplRegistry(), new 
ImageContextImpl(this));{code}
 


was (Author: martin.leit...@infinica.com):
Thanks [~peterhull90] for the analysis! I totally agree that this is what is 
going on.

I do not see why there would be no simple way to avoid that.

I suggest to change line 420 in 
{color:#00}{color:#00}FopFactoryBuilder{color}{color}${color:#00}{color:#00}FopFactoryConfigImpl{color}{color}
 from

{color:#00}{color:#7f0055}this{color}{color:#00}.{color}{color:#c0}imageManager{color}{color:#00}
 = {color}{color:#7f0055}new{color}{color:#00} 
ImageManager({color}{color:#7f0055}new{color}{color:#00} 
ImageContextImpl({color}{color:#7f0055}this{color}{color:#00}));{color}{color}

to

{color:#00}{color:#7f0055}this{color}{color:#00}.{color}{color:#c0}imageManager{color}{color:#00}
 = {color}{color:#7f0055}new{color}{color:#00} 
ImageManager({color:#00}{color:#7f0055}new{color} 
ImageImplRegistry(){color}, {color}{color:#7f0055}new{color}{color:#00} 
ImageContextImpl({color}{color:#7f0055}this{color}{color:#00}));{color}{color}

> image-loading configuration settings are not thread-safe
> 
>
> Key: FOP-3172
> URL: https://issues.apache.org/jira/browse/FOP-3172
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
>Reporter: Martin Leitner
>Priority: Major
> Attachments: fop_3172.zip
>
>
> As a workaround for FOP-3171 I added an  section to the config 
> and noticed that the settings will take effect on all subsequent renderings 
> in the same VM, even when they use a different config or none at all. When 
> running two or more rendering processes with different configs in parallel, 
> the result will basically be random.
> At the very least, this behaviour should be documented and warned about.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FOP-3172) image-loading configuration settings are not thread-safe

2024-04-02 Thread Martin Leitner (Jira)


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

Martin Leitner commented on FOP-3172:
-

Thanks [~peterhull90] for the analysis! I totally agree that this is what is 
going on.

I do not see why there would be no simple way to avoid that.

I suggest to change line 420 in 
{color:#00}{color:#00}FopFactoryBuilder{color}{color}${color:#00}{color:#00}FopFactoryConfigImpl{color}{color}
 from

{color:#00}{color:#7f0055}this{color}{color:#00}.{color}{color:#c0}imageManager{color}{color:#00}
 = {color}{color:#7f0055}new{color}{color:#00} 
ImageManager({color}{color:#7f0055}new{color}{color:#00} 
ImageContextImpl({color}{color:#7f0055}this{color}{color:#00}));{color}{color}

to

{color:#00}{color:#7f0055}this{color}{color:#00}.{color}{color:#c0}imageManager{color}{color:#00}
 = {color}{color:#7f0055}new{color}{color:#00} 
ImageManager({color:#00}{color:#7f0055}new{color} 
ImageImplRegistry(){color}, {color}{color:#7f0055}new{color}{color:#00} 
ImageContextImpl({color}{color:#7f0055}this{color}{color:#00}));{color}{color}

> image-loading configuration settings are not thread-safe
> 
>
> Key: FOP-3172
> URL: https://issues.apache.org/jira/browse/FOP-3172
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
>Reporter: Martin Leitner
>Priority: Major
> Attachments: fop_3172.zip
>
>
> As a workaround for FOP-3171 I added an  section to the config 
> and noticed that the settings will take effect on all subsequent renderings 
> in the same VM, even when they use a different config or none at all. When 
> running two or more rendering processes with different configs in parallel, 
> the result will basically be random.
> At the very least, this behaviour should be documented and warned about.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)