Still problems with ThreadGroup

Godmar Back gback at cs.utah.edu
Fri May 15 15:57:59 PDT 1998


> 
>   The classes.zip comes from the kaffe-0.9.2 release. Tim suggested that
> I uses the klasses.zip coming from the distribution, however it still fails:
> 
> ---------
> ~/opera/LINUX-ELF -> export CLASSPATH=.:/u/veillard/opera/classes/klasses.zip:\
> /u/veillard/opera/classes/classes.zip
> ~/opera/LINUX-ELF -> bin/kaffe foo
> java.lang.ArrayIndexOutOfBoundsException
>         at java/lang/ThreadGroup.add(line unknown, pc 0x81b09e9)
>         at java/lang/ThreadGroup.<init>(line unknown, pc 0x81ba33c)
>         at java/lang/ThreadGroup.<init>(line unknown, pc 0x81b9579)
>         at foo.main(3)
> ~/opera/LINUX-ELF -> 
> ---------
> 

Change thread.c as follows:

Index: thread.c
===================================================================
RCS file: /home/cvspublic/kaffe/kaffe/kaffevm/thread.c,v
retrieving revision 1.3
diff -r1.3 thread.c
78c78
<       unhand(standardGroup)->groups = (HArrayOfObject*)newArray(ThreadGroupClass, 0);
---
>       unhand(standardGroup)->groups = 0;

Basically, it seems as though the ThreadGroup.add method checks for
groups being zero as opposed to groups.length being zero.

	- Godmar



More information about the kaffe mailing list