xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Kumar V <vijay.vad...@gmail.com>
Subject Re: Deadlock in batik
Date Tue, 01 Feb 2005 13:40:58 GMT
Hi Thomas,

Thanks for your quick response. Should i download the source 
code again to get this patch or should i just copy the 
below synchronized code and replace it in cleared() method
of SoftRefKey class.?

Thank you,
Vijay



On Tue, 01 Feb 2005 08:24:50 -0500, Thomas DeWeese
<Thomas.DeWeese@kodak.com> wrote:
> Hi Vijay,
> 
>   I think the following patch will fix the problem.  Please
> report back if it does!  This would be a very odd case to happen
> but if your server was very busy I could see it happening.
> 
> Index: sources/org/apache/batik/util/SoftReferenceCache.java
> ===================================================================
> RCS file:
> /home/cvs/xml-batik/sources/org/apache/batik/util/SoftReferenceCache.java,v
> retrieving revision 1.8
> diff -w -u -r1.8 SoftReferenceCache.java
> --- sources/org/apache/batik/util/SoftReferenceCache.java       18 Aug
> 2004 07:15:50 -0000      1.8
> +++ sources/org/apache/batik/util/SoftReferenceCache.java       1 Feb
> 2005 12:36:38 -0000
> @@ -174,11 +174,17 @@
>              if (cache == null) return; // Can't really happen.
>              synchronized (cache) {
>                  Object o = cache.map.remove(key);
> -                if (this != o)
> +                if (this == o) {
> +                    // Notify other threads that they may have
> +                    // to provide this resource now.
> +                    cache.notifyAll();
> +                } else {
>                      // Must not have been ours put it back...
>                      // Can happen if a clear is done.
>                      cache.map.put(key, o);
>              }
> +
> +            }
>          }
>      }
>  }
> 
> Vijay Kumar V wrote:
> 
> > We are using batik api to generate images from svg content.
> > However, when we issue a multi threaded request to generate the
> > images, it is getting blocked in
> >
> > org.apache.batik.util.SoftReferenceCache.requestImpl method ( According
> > to the stack trace)
> >
> > Im attaching the stack trace with this email...
> >
> > Please let me know what needs to be done.
> >
> > Im using batik 1.5.1 on windows 2000 machine.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message