Re: [java-gnome-hackers] gnome.UIInfo array out of bound.
Brought to you by:
afcowie
From: Tom B. <Tom...@Su...> - 2002-12-27 00:29:45
|
On Thu, 2002-12-26 at 08:09, Mark Howard wrote: > It seems that kaffe's GetByteArrayRegion throws an exception if it has > nothing to do. To fix this, I've had to add an additional test: > > if (label_len != 0 ) (*env)->GetByteArrayRegion(env, label, 0, > label_len, (jbyte*)label_g); > > With this, the example will then be displayed, but unfortunately it > takes very little effort and there will be a segfault, with no output on > the console. I guess we still have a lot of work to do... Perhaps Kaffe needs to be fixed instead, although it's no problem for us to check for zero length arrays before fetching them (it's probably faster, too). As for chars versus bytes, UIInfo was using char arrays to store byte array information (xpm graphic data). This usually worked because graphic data tends to be word aligned, but its not very safe. Since GTK still uses 8-bit chars, I left everything string-related as byte arrays when it gets close to a native call. Tom |