I have downloaded the Ruby Java Bridge (RJB) from http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge
It installs and compiles fine on my windows 2000 machines. Does anyone have success running this on Ruby 1.8.2. Because it doesn't load properly.
···
-------------
requre 'rjb'
Rjb::load #This causes a segmentation fault.
-------------
Also, I do not read Japanese so I can't decipher any of the posts about RJB. Perhaps there is a English/Japanese capable reader who could cross post this to the Japanese ruby list for me? Thanks,
Zach
Zach Dennis wrote:
I have downloaded the Ruby Java Bridge (RJB) from http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge
It installs and compiles fine on my windows 2000 machines. Does anyone have success running this on Ruby 1.8.2. Because it doesn't load properly.
-------------
requre 'rjb'
Rjb::load #This causes a segmentation fault.
-------------
Ok I found where the segfault occurred, and I fixed it, but I don't know why it is fixed. The problem is on line 152 of the load.c file.
It involves a call to close a FILE stream, *fclose(f)*. It segfaulted here, and when I commented this out, it seems to run fine.
Any C guys out there that know why fclose does that sometimes, The FILE stream f is not null. The block of code is:
//buff is a pointer to a char *array[8192]
f = fopen(bridge, "rb");
if (f == NULL)
{
return -1;
}
len = fread(buff, 1, sizeof(buff), f);
fclose(f);
Zach