Profiler bug in 1.8.2?

Discussion in 'Ruby' started by DaZoner, Jan 7, 2005.

  1. DaZoner

    DaZoner Guest

    I'm getting an exception when I profile an application of mine. It profiled
    just fine under 1.8.1 but I just upgraded to 1.8.2 on Windows.

    Below is the output from the run of my app. Note that CLUI.rb is the main
    script for the app and line 1 is blank in the file.

    % cumulative self self total
    time seconds seconds calls ms/call ms/call name
    150.00 0.01 0.01 1 15.00 15.00
    Profiler__.start_profile
    0.00 0.01 0.00 1 0.00 10.00 #toplevel
    0.00 0.01 0.00 1 0.00 15.00 Kernel.require
    c:/ruby/lib/ruby/1.8/profiler.rb:30: undefined method `[]' for nil:NilClass
    (NoMethodError)
    from c:/ruby/lib/ruby/1.8/profiler.rb:5:in `require'
    from u:/ian/rubyversion/CLUI.rb:2:in `require'
    from u:/ian/rubyversion/CLUI.rb:2
     
    DaZoner, Jan 7, 2005
    #1
    1. Advertising

  2. DaZoner

    DaZoner Guest

    Just to clarify (in case I'm misusing the profiler), this program causes the
    same error:

    require 'profile'

    a = 5
    print a
     
    DaZoner, Jan 7, 2005
    #2
    1. Advertising

  3. Hi,

    It didn't reproduce on my Linux machine. Does anyone else get same
    error? Windows specific problem maybe?

    matz.

    In message "Re: Profiler bug in 1.8.2?"
    on Sat, 8 Jan 2005 04:46:30 +0900, "DaZoner" <> writes:

    |I'm getting an exception when I profile an application of mine. It profiled
    |just fine under 1.8.1 but I just upgraded to 1.8.2 on Windows.
    |
    |Below is the output from the run of my app. Note that CLUI.rb is the main
    |script for the app and line 1 is blank in the file.
    |
    | % cumulative self self total
    | time seconds seconds calls ms/call ms/call name
    |150.00 0.01 0.01 1 15.00 15.00
    |Profiler__.start_profile
    | 0.00 0.01 0.00 1 0.00 10.00 #toplevel
    | 0.00 0.01 0.00 1 0.00 15.00 Kernel.require
    |c:/ruby/lib/ruby/1.8/profiler.rb:30: undefined method `[]' for nil:NilClass
    |(NoMethodError)
    | from c:/ruby/lib/ruby/1.8/profiler.rb:5:in `require'
    | from u:/ian/rubyversion/CLUI.rb:2:in `require'
    | from u:/ian/rubyversion/CLUI.rb:2
     
    Yukihiro Matsumoto, Jan 8, 2005
    #3
  4. Yukihiro Matsumoto wrote:

    > It didn't reproduce on my Linux machine. Does anyone else get same
    > error? Windows specific problem maybe?


    I'm able to reproduce it when RUBYOPT is set to 'rubygems' which is the
    case by default on the one-click installer.

    It happens for

    ruby -e "require 'profile'; a = 5; print a"

    but not for

    ruby -r profile -e "a = 5; print a"

    It seems to be caused by other libraries getting loaded before the
    profile library.

    I'm on ruby 1.8.2 (2004-12-25) [i386-mswin32]
     
    Florian Gross, Jan 9, 2005
    #4
  5. DaZoner

    Matt Mower Guest

    On Sun, 9 Jan 2005 17:21:23 +0900, Florian Gross <> wrote:
    > It seems to be caused by other libraries getting loaded before the
    > profile library.
    >


    It makes using the debugger a pain as well since you don't drop into
    your own code but into the gems code.

    M

    --
    Matt Mower :: http://matt.blogs.it/
     
    Matt Mower, Jan 9, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Cheng[MSFT]

    RE: CLR Profiler

    Steven Cheng[MSFT], May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    525
    =?Utf-8?B?TWFyayBGb3g=?=
    May 31, 2004
  2. Carl San

    CLR Profiler....

    Carl San, Mar 26, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    583
    Matt Berther
    Mar 26, 2005
  3. Christoph Becker-Freyseng

    Pssible Bug in Python Profiler

    Christoph Becker-Freyseng, Aug 13, 2003, in forum: Python
    Replies:
    0
    Views:
    282
    Christoph Becker-Freyseng
    Aug 13, 2003
  4. potatosoftware
    Replies:
    0
    Views:
    676
    potatosoftware
    Nov 4, 2009
  5. it_says_BALLS_on_your forehead

    Bug in Perl Profiler?

    it_says_BALLS_on_your forehead, Jul 27, 2006, in forum: Perl Misc
    Replies:
    6
    Views:
    113
    it_says_BALLS_on_your forehead
    Jul 28, 2006
Loading...

Share This Page