[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Eval Lockup
From:       "Robert Klemme" <bob.news () gmx ! net>
Date:       2004-06-30 6:42:54
Message-ID: 2kf5mnF1k458U1 () uni-berlin ! de
[Download RAW message or body]


"stevetuckner" <stevetuckner@usfamily.net> schrieb im Newsbeitrag
news:40E1D350.8060804@usfamily.net...
> Hello all,
>
> I am currently modifying Instiki to allow code to be put on wiki pages
> between <% %> tags. It seems to work fine, but now I have run into an
> issue that I am not sure what to do about.  With particular Wiki
> contents, if the eval causes an exception, the exception object that is
> caught is broken somehow. When it do e.message, ruby locks up by going
> into some infiniite loop and sucks all my computer's resources down with
> it (it is worse on Linux than on Windows). I have tried it with the
> latest CVS version of ruby and it still occurs. Does any one have any
> ideas on how to debug this problem. If anyone is interested in trying
> it, I can send them a tar of the instiki directory with my data and code
> mods.

Maybe you get into an infinite loop.  Tracing via #set_trace_func could
help.  You can put something like this into a module that you require:

$trace = File.open("/c/temp/ruby/trace.log", "w")
$trace.sync = true

set_trace_func proc {|*args|
  if /(call|return)$/ =~ args[0]
    $trace.puts args.inspect
  end
}

Note: performance will be awful.... :-)

    robert


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic