[kaffe] Assertion fails in JNI access to Weak references.

Tim Bevan tim.bevan at laser-scan.com
Mon Sep 25 05:30:44 PDT 2006


I can reduce my real problem to the attached class and native metbod.

We are simply creating a weak reference to the class then releasing it
once we have finished with it. Deleting the weak reference aborts the
program!


Hello, world from java first
Got weak reference
kaffe-bin: jni-refs.c:290: KaffeJNI_DeleteWeakGlobalRef: Assertion 
`((main_collector)->ops->getObjectIndex)((Collector*)(main_collector), ( 
ref)) == KGC_ALLOC_VMWEAKREF' failed.

Program received signal SIGABRT, Aborted.


kaffe -version
java full version "kaffe-1.4.2"

kaffe VM "1.1.7"

Engine: Just-in-time v3   Version: 1.1.7   Java Version: 1.4
Heap defaults: minimum size: 5 MB, maximum size: unlimited
Stack default size: 256 KB

Compiled under

gcc --version
gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)


NB we have fixed bug 60 locally.

-- 
Tim Bevan,
Principal Software Engineer, Laser-Scan.
+44 (0)1223 420 414
http://www.laser-scan.com


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: HelloWorldNative.java
Url: http://kaffe.org/pipermail/kaffe/attachments/20060925/c79b8566/attachment-0001.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorldNative.c
Type: text/x-csrc
Size: 530 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20060925/c79b8566/attachment-0001.c 


More information about the kaffe mailing list