RJB 0.1.6 on 1.8.2

Z

Zach Dennis

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
 
Z

Zach Dennis

Zach said:
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top