Ruby Forum IronRuby > Information on Hosting Ruby.Console?

Posted by Josh Charles (Guest)
on 09.08.2008 21:09
(Received via mailing list)
I'm working on a project where I would like to host the IronRuby
console, and I'm getting some stack overflow exceptions.  I've met the
end of my own knowledge, so I'm wondering if there is more information
available anywhere about doing something like this?

I was just modifying my copy of the Ruby.Console project in the
IronRuby source, but I would really like to break this into a separate
project.  I started with a blank console app, and straight code copy
over, and it builds, and even starts, but anything typed into the
console causes the exception.  I thought it might have been because I
had targeted the wrong .Net version, but I fixed that.

Any ideas?

-Josh
Posted by Tomas Matousek (Guest)
on 09.08.2008 22:52
(Received via mailing list)
Can you provide more details? Where did it stack overflow?

Tomas
Posted by Josh Charles (Guest)
on 11.08.2008 16:19
(Received via mailing list)
Tomas,

Thanks for your reply.  Information inline.

On Sat, Aug 9, 2008 at 3:37 PM, Tomas Matousek
<Tomas.Matousek@microsoft.com> wrote:
> Can you provide more details? Where did it stack overflow?

The exact exception is:

"An unhandled exception of type 'System.StackOverflowException'
occurred in mscorlib.dll"

The debugger points to line line 53 in matchmaker.cs:

                if (method != null) {
-this line-->    method = method.MakeGenericMethod(args);
                    return (T)(object)Delegate.CreateDelegate(target,
this, method);
                }

The specific message is:

"Cannot evaluate expression because the current thread is in a stack
overflow state."

I thought it may have been a permissions issue, because the only way I
could get IronRuby to compile was by running as Administrator, but
this did not fix the problem either.
Posted by Tomas Matousek (Guest)
on 11.08.2008 18:32
(Received via mailing list)
Could you sent full stack trace and the command you are executing on the 
command line?

Tomas
Posted by Curt Hagenlocher (Guest)
on 13.08.2008 12:19
(Received via mailing list)
Including IronLibrary.Libraries.dll into your project will make it work. 
And you should probably file a bug on RubyForge -- we should give a more 
reasonable error message when this module is missing instead of 
overflowing the stack.
Posted by Josh Charles (Guest)
on 13.08.2008 13:39
(Received via mailing list)
Curt,

You rock my socks off.  Why didn't I catch that!  Thanks for the tip,
and I've entered the bug report at RubyForge.

Josh

On Tue, Aug 12, 2008 at 12:14 PM, Curt Hagenlocher <curth@microsoft.com> 
wrote:
> Including IronLibrary.Libraries.dll into your project will make it work.  And you should probably file a bug on RubyForge -- we should give a more reasonable error message when this module is missing instead of overflowing the stack.
<snip>