namgk / ambienttalk

Automatically exported from code.google.com/p/ambienttalk
0 stars 0 forks source link

Sometimes a public method is not found in a AT object wrapping a Java object. #61

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
The exception is difficult to reproduce, but it seems to happen when the system 
is busy and seems to be out of memory (reported by Dries).

What is the expected output? What do you see instead?

This what you see:

>>> Exception in actor 
<obj:598834505{debuggingState,debuggingS...}@[LocalManagerModule]>: Java method 
iterator is not accessible. caused by Class 
edu.vub.at.objects.symbiosis.Symbiosis can not access a member of class 
java.util.HashMap$KeySet with modifiers "public"
origin:
at self.jhashmap.keySet().iterator()  (103:43:hashMap.at)

Please use labels and text to provide additional information.

A theory of what happens is:
The symbiosis layer uses a method cache to speed up the look up of methods on a 
java. 
The cache uses weak references to JavaMethod instances.
The gc triggers and collects a reference to the JavaMethod, and next time you 
access it, the cache doesn't get correctly populated.

Original issue reported on code.google.com by egonzal...@gmail.com on 18 Apr 2012 at 1:24