Possible problem on mono

Hi

When I try to run the igem script on mono it always comes back with a
NullReferenceException.

igem list --debug --backtrace
ERROR: While executing gem … (System::NullReferenceException)
Object reference not set to an instance of an object
IronRuby.Libraries:0:in TryFlattenArray' :0:inflatten!’
mscorlib:0:in _stub_$2591' gem_runner.rb:25:inrun’
mscorlib:0:in `stub$2495’
igem:0

Is this known or should I add it to the bugs?

Could you try to narrow it down to a simple repro? What parameters are
passed to “flatten!” that make it fail? (You may want to run it with –D
to get full stack information, although it will be slower).

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Ivan Porto
Carrero
Sent: Friday, February 20, 2009 12:31 AM
To: ironruby-core
Subject: [Ironruby-core] possible problem on mono

Hi

When I try to run the igem script on mono it always comes back with a
NullReferenceException.

igem list --debug --backtrace
ERROR: While executing gem … (System::NullReferenceException)
Object reference not set to an instance of an object
IronRuby.Libraries:0:in TryFlattenArray' :0:in flatten!’
mscorlib:0:in _stub_$2591' gem_runner.rb:25:in run’
mscorlib:0:in `stub$2495’
igem:0

Is this known or should I add it to the bugs?

I’ll try but i’m just moving into a new flat so it may take a few days
before I get some actual pc time

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
GSM: +32.486.787.582
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim

On Fri, Feb 20, 2009 at 5:59 PM, Tomas M. <

Hi,

I’ve got the same error, but I’m just starting to use IronRuby. The igem
doesn’t work and it’s very hard to do anything useful without gems.

Cheers,
Rafael
www.rafaelrosafu.com

Hi,

Yes, I tried to build from source, but had a lot of problems and then I
found these builds. Calling igems gives the same error Ivan had
reported, here a fresh result:

~/Projetos : igem list --debug
ERROR: While executing gem … (System::NullReferenceException)
Object reference not set to an instance of an object
IronRuby.Libraries:0:in TryFlattenArray' :0:in flatten!’
mscorlib:0:in CallSite.Target' gem_runner.rb:25:in run’
mscorlib:0:in `CallSite.Target’
igem:0

If I try to call just “igem” it shows the help, no problem, but if I try
to run “igem list” or “igem install any_gem” it shows the error above
adding the --debug directive, and shows just the first two lines of the
error if run without it.

Hope it helps.

Cheers,
Rafael
www.rafaelrosafu.com

Which same error? Is anyone else having problems with igem on Mono? Have
you grabbed the build from here:
http://github.com/casualjim/ironruby-mono-builds ?

~js

You can get the same behaviour by requiring rubygems I believe.

When I get back from work tonight I’ll try to track down why this is
happening. I had it on my to-do list for a while now.

I’m using it with mono head… I’ll try when I’ve done my 8 hours of
mercenary time.

Hey,

On 3/4/09, Rafael R. [email protected] wrote:

If I try to call just “igem” it shows the help, no problem, but if I try
to run “igem list” or “igem install any_gem” it shows the error above
adding the --debug directive, and shows just the first two lines of the
error if run without it.

Which version of Mono are you using? It works fine on Mono HEAD and
Mono 2.4. If you’re interested in running IronRuby on Mono, I suggest
you use a (very) recent Mono anyway, as the DLR and IronRuby sometimes
kick Mono’s tires hard.

On 3/4/09, Ivan Porto C. [email protected] wrote:

I’m using it with mono head… I’ll try when I’ve done my 8 hours of
mercenary time.

Then it’s either a difference caused by gmcs or in the branch, as I’m
still building origin with csc.

On 3/4/09, Jb Evain [email protected] wrote:

On 3/4/09, Ivan Porto C. [email protected] wrote:

I’m using it with mono head… I’ll try when I’ve done my 8 hours of
mercenary time.

Then it’s either a difference caused by gmcs or in the branch, as I’m
still building origin with csc.

It’s indeed an issue with gmcs which miscompiles the using in
TryFlattenArray.

I’m using Mono 2.2, I’ll try to install the trunk version. I read
somewhere that this version would work with 2,2. I’ll inform you guys if
it worked or not.

Thanks

On 3/4/09, Jb Evain [email protected] wrote:

It’s indeed an issue with gmcs which miscompiles the using in TryFlattenArray.

This issue is fixed in Mono’ HEAD. The fix is not going to be
backported to 2.4 though. Attached is a diff for the Mono branch which
work arounds the particular problem.

Great :smiley:

I downloaded the the latest ironruby-mono-builds and the problem with
TryFlattenArray is gone, now “igem list” works, but when I tried to
install a gem I got the following error:

~ : igem install rspec --debug
ERROR: While executing gem … (URI::InvalidComponentError)
bad component(expected absolute path component): latest_specs.4.8
mscorlib:0:in CallSite.Target': undefined methodjoin’ for
nil:NilClass (NoMethodError)
from gem_runner.rb:25:in run' from mscorlib:0:inCallSite.Target’
from igem:0

And “iirb” isn’t working:

~ : iirb --debug
Microsoft.Scripting.Core:0:in Reference': variable '$exception' of type 'System.Exception' referenced from scope 'â„‘â„œ;suspend_input_method;irb.rb;213;', but it is not defined (TypeError) from Microsoft.Scripting.Core:0:inVisitParameter’
from Microsoft.Scripting.Core:0:in Accept' from Microsoft.Scripting.Core:0:inVisit’
from Microsoft.Scripting.Core:0:in VisitBinary' from Microsoft.Scripting.Core:0:inAccept’

I’ll try to build a latest Mono version and see what happens.

Cheers.

rename your .gemrc (hidden in your home folder) file and try again

Hey,

On 3/5/09, Rafael R. [email protected] wrote:

And “iirb” isn’t working:

I can reproduce that. It’s another issue that is either in gmcs or in
the branch. I’ll investigate.

Thanks, I tought it was a related problem. More google, less complaining
:slight_smile:

I’m taking a look at it now, I have .NET people meeting this weekend and
I want to show them IronRuby.

Cheers

On 3/5/09, Jb Evain [email protected] wrote:

On 3/5/09, Rafael R. [email protected] wrote:

And “iirb” isn’t working:

I can reproduce that. It’s another issue that is either in gmcs or in
the branch. I’ll investigate.

That’s an issue with the branch, as IronRuby compiled from origin with
rake compile mono=1 doesn’t exhibit this behavior.