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 166232 - [67cat] [ruby] Mouseover the code while debugging kills debugger
Summary: [67cat] [ruby] Mouseover the code while debugging kills debugger
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-29 07:42 UTC by esmithbss
Modified: 2009-06-12 10:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file with extra ruby debugging enabled. (690.26 KB, text/plain)
2009-05-29 07:44 UTC, esmithbss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-05-29 07:42:16 UTC
[ BUILD # : 200905281401 ]
[ JDK VERSION : 1.6.* ]

When I'm debugging my rails application, if I am stopped at a
breakpoint, and hold my mouse over a variable or other part of code
which will attempt to show the object value, the debugger crashes.

This appears to be consistent for every rails project I am currently
working on under Linux.
Comment 1 esmithbss 2009-05-29 07:44:33 UTC
Created attachment 82957 [details]
Log file with extra ruby debugging enabled.
Comment 2 Martin Entlicher 2009-05-29 07:52:23 UTC
What does it mean "debugger crashes"? Please evaluate in ruby...
Comment 3 Erno Mononen 2009-05-29 08:19:32 UTC
I'll have a look. Seems to work for me though (I'm also on Linux). Can you reproduce this from scratch with a plain 
Ruby app, or with a newly created Rails app? Are you able to recall when you run into this for the first time? Also, I 
noticed you're using rdebug 0.4.6, could you try with 0.4.5 (i.e. the version bundled with the IDE) instead? Although I 
doubt that it would help, but worth trying I guess.
Comment 4 esmithbss 2009-05-29 09:45:22 UTC
I need to run this app under MRI and not JRuby due to some gem issues with native code so I can't run directly with the
built-in 1.2.0 JRuby.

It appears to work using the older version of ruby-debug-ide.  Reducing priority because a workaround exists, but I'm
setting it at P2 because the workaround may not be usable by some developers (eg.:  My work box's gems are strictly
controlled and 0.4.6 is the corporate standard and locked down by the sysadmins so it cannot be backed out).
Comment 5 esmithbss 2009-05-29 09:59:30 UTC
It appears to be a bit trickier than I thought.  Under 0.4.5 I did a mouse over and it generated a set of 4 deadlock
messages:

deadlock 0xb7c7a1ac: sleep:- (main) - /usr/lib/ruby/1.8/webrick/server.rb:91
deadlock 0bx5b90920: sleep:- - /var/lib/gems/ruby-debug-ide-0.4.5/lib/ruby-debug/event_processsor.rb:58
deadlock 0xb5ba82e4: sleep:- - /usr/lib/ruby/1.8/webrick/httpserver.rb:53
deadlock 0xb5f522a0: sleep:- - /usr/lib/ruby/1.8/webrick/httpserver.rb:51
Comment 6 Erno Mononen 2009-05-29 10:02:58 UTC
Is there any difference if you run under Mongrel instead of Webrick?
Comment 7 esmithbss 2009-05-29 10:04:55 UTC
I just switched to mongrel 1.1.5 from webrick and it appears to work with 0.4.5 under mongrel.  It may be a combination
of webrick and gems that is causing it.

Comment 8 esmithbss 2009-05-29 10:08:34 UTC
While Mongrel allows the system to view the single variable in the pop-up hint, attempting to load the Variables pane
caused the debugger process to terminate.

From what I can see in the log, it has to deal with the END_DOCUMENT event from the debugcommons.Util.

Once the END_DOCUMENT is received, the debugger terminates.
Comment 9 Erno Mononen 2009-05-29 10:36:46 UTC
I see, this one might prove to be difficult to track down. Are you familiar with debugging from the command line? That 
way we could first make sure it is not a bug in ruby-debug-base or in MRI itself. See e.g. http://www.datanoise.com/
articles/2006/7/12/tutorial-on-ruby-debug for a tutorial - any chance you could try that with your app? When you hit a 
breakpoint, try inspecting the problematic variable, and listing all global and local variables using the ruby-debug 
commands listed in the tutorial (you can also see the commands from the IDE log file). I know this is quite a lot to 
ask, but as I can't reproduce this I think it would be the fastest way to make progress on this.
Comment 10 Erno Mononen 2009-05-29 13:07:31 UTC
Some observations from the looking at the log:

The "v inspect reservations" command, which the IDE sends to the backend when evaluating an expression (e.g. when 
hovering the mouse over a variable) seems to cause the problem; it doesn't throw any exceptions, but the response is 
just:

<variables></variables> followed by END_DOCUMENT 

This leads me to think the problem is either in ruby-debug-ide or ruby-debug-base. Unfortunately I haven't yet found a 
place where I could add logging to help track this down, I'll continue investigating. 
 
Comment 11 Erno Mononen 2009-06-09 11:08:53 UTC
It occurred to me that this might be related to issue 164366, could you please try whether this is still reproducible 
in RC2 or in the latest daily? Thanks.
Comment 12 Erno Mononen 2009-06-12 10:47:30 UTC
The issue seems fixed as per our email discussion with the reporter, indicating that the root cause was the same as in 
issue 164366. I'm therefore closing this as fixed in 6.7 - Eric, please reopen if you run into this again. Thanks.