"Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on 
10/21/2005 09:18:18 AM:

> I know, I?m running the whole list today!  I have another issue.  I?m 
trying 
> to resize the document by setting width and height attributes:
> 
> public void setSize(String width, String height) {
>     svgDocument.getDocumentElement().setAttribute(SVGConstants.
> SVG_WIDTH_ATTRIBUTE, width);
>     svgDocument.getDocumentElement().setAttribute(SVGConstants.
> SVG_HEIGHT_ATTRIBUTE, height);
> }
> 
> I execute the above code in the run() method of a Runnable class which I 
then 
> execute in the UpdateManager.  More often than not, it causes the entire 

> application to hang. 

  I would guess that you are calling invokeAndWait on the RunnableQueue?
And you are doing this from the Swing thread?  If so this is a known 
issue,
basically in some cases Batik needs to get info from Swing in which case 
it
needs to call into the Swing Thread if you are sitting in it then it 
causes
a deadlock.  In this case you will need to either switch to invokeLater, 
or
move your call to invokeAndWait out of the Swing thread (into a third 
party
thread you control).

> No button response.  No CPU spike.  No error message. 
> Just locks up.  With System.out, I?ve determined that the code never 
exits 
> from the above setSize() method.  Does anyone have any tips on why this 
would 
> happen?  Is there some kind of deadlock with running a Runnable in the 
> UpdateManager?  All my other operations; add element, remove element, 
set the 
> background element, etc. run without issue.

  You can get a thread dump in windows by running the 
application from the command line and pressing ctrl-break in
the DOS Window, from Unix you can use 'kill -QUIT <java processes id>'.
This should make it clear what the problem is.


> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to