This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 133249 - debugging is terminated when object's to_s method raises an exception
Summary: debugging is terminated when object's to_s method raises an exception
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-19 00:21 UTC by kotique
Modified: 2008-09-10 19:34 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
messages.log file (62.64 KB, text/plain)
2008-04-19 00:33 UTC, kotique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kotique 2008-04-19 00:21:33 UTC
The problem occurs when I'm using watches or local variables window, inspecting variables. If variable's to_s method
raises an exception, netbeans debugging session is terminated and ruby debug process is left running in the background.
I can't TERMinate it, only KILL helps.
Comment 1 kotique 2008-04-19 00:32:31 UTC
This one is an interesting issue, as I can't reproduce it using simple test case, it's occurring only in my
not-so-simple code. 

Here's what I get in output window:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

$ ps axwwl |grep rdebu
0  1000 22376     1  20   0  49712 46340 -      S    ?          0:03 /usr/bin/ruby -r /tmp/io-synchronizer55878.rb
/usr/bin/rdebug-ide -p 52116 -- script/server -e development --port 3000

Comment 2 kotique 2008-04-19 00:33:39 UTC
Created attachment 60445 [details]
messages.log file
Comment 3 Martin Krauskopf 2008-04-21 11:49:08 UTC
Hi. I can easily reproduced with the following example. Will try to fix for next release (or update). Thanks for the
feedback.

=============
class A
  def to_s
    raise 'hey'
  end
end

a = A.new

puts 'Putting breakpoint here and showning Local Variables will blow up the session'
=============
Comment 4 Martin Krauskopf 2008-08-12 17:17:03 UTC
This was bug in the backend. I've fixed it there:

  http://rubyforge.org/pipermail/debug-commons-commits/2008-August/000241.html

You might build trunk version of ruby-debug-ide gem (let me know if you need a help) until ruby-debug-ide 0.2.2 is
released. NetBeans is forward compatible so it will detect a new version.
Leaving this open as a TASK. I'll notify that ruby-debug-ide 0.2.2 was released by closing this.
Comment 5 Martin Krauskopf 2008-09-10 19:34:47 UTC
New backends were released. Closing.