This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gargage collected top-level bindings?


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]