This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Gargage collected top-level bindings?
- From: Dean Ferreyra <dferreyra at igc dot org>
- To: dominique dot boucher at nuecho dot com
- Cc: 'Kawa List' <kawa at sources dot redhat dot com>
- Date: Tue, 03 May 2005 13:43:52 -0700
- Subject: Re: Gargage collected top-level bindings?
- References: <200504291127.j3TBR2f4012711@bergman.nuecho.ad>
Hi Dominique,
I've seen this behavior when initializing and using Kawa modules from
Java directly, in threads that were created from Java but not with
(future ...). When the thread that has initialized the module ends,
some binding-related thread-local objects are garbage collected, the
symbols are unbound, and from then on the module's global bindings
give the UnboundLocationException exception.
Assuming that we're seeing the same problem, attached is my temporary
kludge around it.
Dean
Dominique Boucher wrote:
Hi,
I experienced a very strange thing in my Eclipse plugin recently. Some of my
keyboard actions call functions stored in the global environment. Once in a
while, I get a "unbound symbol" exception, even if the action worked fine 5
minutes before.
Can it be that bindings are garbage collected? That would explain this
behavior.
Thanks,
Dominique Boucher
Nü Écho Inc
www.nuecho.com
Index: gnu/mapping/ThreadLocation.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/mapping/ThreadLocation.java,v
retrieving revision 1.7
diff -a -u -r1.7 ThreadLocation.java
--- gnu/mapping/ThreadLocation.java 18 Apr 2005 21:59:30 -0000 1.7
+++ gnu/mapping/ThreadLocation.java 27 Apr 2005 22:54:53 -0000
@@ -34,7 +34,7 @@
{
this.name = name;
this.property = new String("(dynamic)");
- unlink = true;
+ // unlink = true;
}
public ThreadLocation (Symbol name, Object property, Location global)