Josh Cheek wrote:
> On Wed, Feb 24, 2010 at 12:02 AM, Robert Gleeson <rob / flowof.info> 
> wrote:
> 
>> Rob
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>>
> Hi, Robert. I seem to be having difficulty. I tried to hello world, but 
> I'm
> getting a NullPointerError
> 
> http://img341.imageshack.us/img341/3522/picture12nc.png
> 
> I'm using RVM, and tried it with 1.8.6 and 7, and 1.9.1
> I'm on OS X 10.5.6
> 
> When I run it in TextMate, it gives this backtrace
> FFI::NullPointerError: invalid memory read at address=0x0
> method get_string    in pointer.rb at line 57
> method read_string    in pointer.rb at line 57
> method run    in sandbox.rb at line 58
> method fork    in sandbox.rb at line 56
> method run    in sandbox.rb at line 56
> at top level    in test1.rb at line 7
> 
> 

Hmm, I haven't seen that before but I think I know what it is. I think a 
call to sandbox_init() fails, and then we call #read_string on a NULL 
pointer. It may be the hard-coded value passed as the second argument to 
sandbox_init() causing this. It should be SANDBOX_NAMED.

I'll work on a patch in the next hour or so(only waking up here), and 
get back to you.

Sorry for the inconvenience.

Rob

-- 
Posted via http://www.ruby-forum.com/.