SVGSalamander and threading #100
marcoNeologica
started this conversation in
General
Replies: 1 comment 1 reply
-
It looks like something is going wrong with the Apache SAX parser. I did some web searching and most of the posts I found related this talked about calling XPath related classes from multiple threads: The internal SAX parser is something provided by the JRE and not something SVGSalamander directly controls. I'd recommend doing all your loading in a single thread or using synchronization to make sure two different SVG documents are not loaded simultaneously. This issue also seems to have been fixed in JDK 9 and later, you so might want to check if you're using a recent JDK. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I am using SVGSalamander to load SVGIcons for the Swing GUI in my Java-based application, as well as to load other SVG images to be used in my application's code.
All .SVG files are stored as resources inside my application's JAR file, and they are normally loaded through SVGIcon.setSvgURI().
When my application starts up, I sometimes (quite rarely, actually) get errors looking like this:
==================
==================
Since the .SVG files are OK, and since I only get this exception sometimes, I am inclined to think that it may be a threading issue in my code.
It may be a basic question (sorry about that), but are there specific threading rules I should respect / be aware of when using SVGsalamander?
The exceptions above have been generated using an older version of svgSalamander (not sure which exact version). Now I have just got version 1.1.4, and I will test with that one, but still I would like to know more about eventual threading rules I should respect.
Thanks in advance for your input.
Best regards,
Marco Sambin
Beta Was this translation helpful? Give feedback.
All reactions