xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Attempting to use text causes lock up
Date Tue, 12 Aug 2008 10:24:23 GMT
Hi Ryan,

"Ryan Wilson" <ryan.wilson@ayokasystems.com> wrote on 08/10/2008 02:29:19 
AM:

> I have been attempting to add text to an svg document while it is 
> being displayed by SVGCanvas.However, every time the code reaches 
> the append(text) call the whole program locks up. Am I missing a step?

   I don't see anything that would cause the lockup in the code posted.
Obviously we have done the same basic thing many times so I suspect
that it has something to do with the rest of your code.  There is
at least one obvious bug but I don't think it's the cause of the
lockup:

> text.setAttributeNS(svgNS, "fill", "red");
> text.setAttributeNS(svgNS, "x", "0");
> text.setAttributeNS(svgNS, "y", "0");

    These should all use 'null' for the namespace.
Attributes (except primarily 'xlink') should use the
null namespace.

> This code is being executed from within a object being fed to the 
> updaterunnablequeue. The two other appends work without complaint, 
> only the text rendering is causing problems.

   Are you using invokeAndWait from the Swing thread?
That can cause lockups if the rendering engine needs to query
the UserAgent about anything (and text might query something
from the UserAgent).


Mime
View raw message