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
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
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.
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.
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.
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.
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.