Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Profiler bug in 1.8.2?

Reply
Thread Tools

Profiler bug in 1.8.2?

 
 
DaZoner
Guest
Posts: n/a
 
      01-07-2005

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


 
Reply With Quote
 
 
 
 
DaZoner
Guest
Posts: n/a
 
      01-07-2005
Just to clarify (in case I'm misusing the profiler), this program causes the
same error:

require 'profile'

a = 5
print a


 
Reply With Quote
 
 
 
 
Yukihiro Matsumoto
Guest
Posts: n/a
 
      01-08-2005
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


 
Reply With Quote
 
Florian Gross
Guest
Posts: n/a
 
      01-09-2005
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]
 
Reply With Quote
 
Matt Mower
Guest
Posts: n/a
 
      01-09-2005
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/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Profiler - Compile-time profiler for C++ potatosoftware C++ 0 11-04-2009 04:46 PM
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
Bug in Perl Profiler? it_says_BALLS_on_your forehead Perl Misc 6 07-28-2006 01:23 PM
RE: CLR Profiler Steven Cheng[MSFT] ASP .Net 1 05-31-2004 11:36 AM
Pssible Bug in Python Profiler Christoph Becker-Freyseng Python 0 08-13-2003 09:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57