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.
Build: netbeans-hudson-trunk-2802-ruby.zip OS: Ubuntu 8.04 Hardy Heron When launching the debugger from the IDE *most* of the time I get a fast debugger timeout. The rest of the time it works perfectly.
I pretty sure this is related to using ruby-debug-ide version 0.2.0 which was required by this build of Netbeans. I reverted to an older build of Netbeans and was having the same problem (whilst debugging rake tasks) until I uninstalled ruby-debug-ide version 0.2.0 and used the older 0.1.10 version (which works with the older build of netbeans I'm now using)
Hi Richo, I've tried to reproduce, but debugger always started successfully for me. You might try to increase startup timeout: http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-TimeoutProblem but that's probably not the culprit. Then it would help if you reproduce with detailed logging as usual: http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-HowToFileABug Thanks.
Created attachment 64480 [details] message log from when debugging failed
Created attachment 64482 [details] message log from when debugging worked
Netbeans: netbeans-hudson-trunk-2824-ruby.zip I have attached 2 message logs. One from the debugger timing out and the other with the debugger working fine. When the debugger works it connects straight away without delay. When it times out it waits the full 15 seconds. The logs were grabbed using the following command line: ./netbeans -J-Dorg.netbeans.modules.ruby.level=300 -J-Dorg.netbeans.api.ruby.platform.level=300-J-Dorg.rubyforge.debugcommons.level=300 -J-Dorg.rubyforge.debugcommons.verbose=true In each case I just started Netbeans, selected the "Debug Main Project" toolbar button. Waited for it to either succeed or fail and then close netbeans. One the first run it failed, on the second run it succeeded.
Could you also provide the content of Output Window when it failed, as described step 3.2: http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-HowToFileABug Thanks.
PS: are you able to reproduce only with Rails application or also with Ruby non-rails applications?
Sorry, forgot to mention that the Output Window is completely blank when it fails.
Sorry, I missed the 'failed' log. So could you attach one more log with at least two more fails. To check whether the IOException there was RANDOM or not. Thanks.
Fails for plain ruby applications in the same way. (Just used the default "hello world" app that netbeans creates)
Created attachment 64485 [details] Plain ruby application failing numerous times to debug, and then finally succeeding
Did you try to run with fresh userdir? By exiting NetBeans and then start it again with passing: --userdir /tmp/nb001 or by: mv /home/anthony/.netbeans/dev /home/anthony/.netbeans/dev.mk1 and starting it again. Is it the same?
I'm pretty sure I had tried a fresh user dir, but to make sure I tried it again. Same problem unfortunately.
Strange, backend starts up correctly in all cases. NetBeans cannot connect for some reason. I'll try to add more logging. Martine, there are couple of debugger exception and warnings, like: WARNING [org.netbeans.modules.settings.convertors.XMLSettingsSupport]: Warning: unknown module code base: org.netbeans.modules.debugger.jpda.ui in MultiFileObject@8d23f9[Windows2Local/Components/sources.settings] or java.io.IOException: Top component sources could not be loaded, either owning module was disabled, has incompatible version or top components settings file format is broken. at o.n.c.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:550) at o.n.c.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:641) at o.n.c.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:422) at o.n.c.windows.WindowManagerImpl.getTopComponentForID(WindowManagerImpl.java:782) at o.n.c.windows.model.DefaultTopComponentGroupModel.getTopComponent(DefaultTopComponentGroupModel.java:287) at o.n.c.windows.model.DefaultTopComponentGroupModel.getTopComponents(DefaultTopComponentGroupModel.java:142) at o.n.c.windows.model.DefaultModel.getGroupTopComponents(DefaultModel.java:962) at o.n.c.windows.Central.getGroupTopComponents(Central.java:1500) at o.n.c.windows.TopComponentGroupImpl.getTopComponents(TopComponentGroupImpl.java:85) at o.n.c.windows.Central.openGroup(Central.java:1079) at o.n.c.windows.TopComponentGroupImpl.open(TopComponentGroupImpl.java:75) at org.netbeans.modules.debugger.ui.DebuggerManagerListener$2.run(DebuggerManagerListener.java:129) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) Cannot it be the reason of Ruby debugger failure? Do you want them to file separately or are those OK? Should we check for something somewhere? Thanks.
Could you evaluate (see my previous comment). Likely something else on our site, but for sanity check... Thanks.
Similar issue 140625 with similar log.
If the problem is "java.io.IOException: Top component sources could not be loaded...", then this is a duplicate of issue #139626, which is already fixed: http://hg.netbeans.org/main/rev/e1c3c4c44697 Can you please test whether that solves this problem? (And please remove also <user-dir>/config/Windows2Local/Components/sources.settings file for the fix to take effect). Thanks.
It does not look like the IOException broke any important thread, but issue #140625 contains the same exception, thus there seems to be some correlation. The exception is not thrown after the fix of issue #139626, so can you please test whether it has solved the problem?
Created attachment 65185 [details] Log with build netbeans-hudson-trunk-2954-ruby.zip
Netbeans: netbeans-hudson-trunk-2954-ruby.zip I have added a new log file updated_messages.log The exception in question does not seem to be appearing anymore, however the problem of debugger failing ot connect most the time still remains.
The debugger fails to connect 75% of the time when running under Ubuntu Hardy's default Sun Java SDK: java version "1.6.0_06" Java(TM) SE Runtime Environment (build 1.6.0_06-b02) Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing) The debugger only fails 33% of the time when running under a current beta of the JDK downloaded from Sun: java version "1.6.0_10-rc" Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b27) Java HotSpot(TM) Client VM (build 11.0-b14, mixed mode, sharing)
Likely you will recognize quickly when the debugger will timetout. So could you try after the unsuccessful start up (which you will recognize, since debugger does not connect immediately) to connect with telnet to the port, with: telnet localhost 36361 replacing '36361' with the number after '-p' argument logged in the "Running" line in the log. So we see whether it is problem in NetBeans that they cannot connect or in the server that it does not accept connection. Sanity check - you see 'lo' device when running 'ifconfig', right?
PS: you might increase timeout with to e.g. 120s -J-Dorg.netbeans.modules.ruby.debugger.timeout=120 to have enough time to take a look what port is used and conveniently try to connect with telnet.
Unfortunately the port number is not shown in the log/console until after the timeout has occurred. Just to confirm with the timeout increased to 120 seconds, the debugger still timesout.
Did you turn on logging _for debugger_ as described here? http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-HowToFileABug Then you should see something like: FINE [org.rubyforge.debugcommons.Util]: Running [basedir: /home/emdot/NetBeansProjects/RubyApplication4/lib]: "/space/ruby/ruby-current/bin/ruby -I/home/emdot/NetBeansProjects/RubyApplication4/lib /tmp/io-synchronizer21166.rb /space/ruby/gem-repo/bin/rdebug-ide _0.2.0_ -p 49175 -- /home/emdot/NetBeansProjects/RubyApplication4/lib/main.rb" Which shows port 49175.
Even with debugger logging on as per that wiki page I don't get any messages like you suggest. <snippet of message.log> <I start debugging> FINEST [org.netbeans.modules.ruby.debugger.Util]: Using timeout: 15s FINE [org.netbeans.modules.ruby.debugger.Util]: Running fast debugger... <wait for 20 seconds> SEVERE [org.rubyforge.debugcommons.Util]: Error Output: Waiting for connection on 'localhost:50019' Fast Debugger (ruby-debug-ide 0.2.0) listens on localhost:50019 <more log data>
That's strange. In first three logs you've attached, in all of them there are lines like: FINE [org.rubyforge.debugcommons.Util]: Running [basedir: /home/anthony/workspace/RubyApplication1/lib]: "/home/anthony/ruby/ruby-1.8.6/bin/ruby -I/home/anthony/workspace/RubyApplication1/lib -I/home/anthony/workspace/RubyApplication1/test -I/home/anthony/workspace/RubyApplication1/spec -r /tmp/io-synchronizer17904.rb /home/anthony/ruby/ruby-1.8.6/bin/rdebug-ide _0.2.0_ -p 52994 -d -- /home/anthony/workspace/RubyApplication1/lib/main.rb" In the latest log you've attached there is no such line, since you did a typo, that you've joined two switches in one: -Dorg.netbeans.api.ruby.platform.level=300-J-Dorg.rubyforge.debugcommons.level=300 so they were ignored in the last log. Is not this the reason also now?
Doh! OK, I can see the port now. Telnet connections are being refused as well, so it looks like a problem with the new ruby-debug-ide.
OK, pretty sure I have got to the bottom of this one. My hosts file was missing any IPv4 entries, most importantly 127.0.0.1 localhost I added this in and the problem seems to be fixed. I noticed in the code of 0.2 ruby-debug-ide there was code added to explicitly set the host to 'localhost' if it wasn't set to work around some IPv6 issue. Maybe that's why I didn't see the problem until I upgraded to 0.2. I'm not sure how these were removed. I checked my Ubuntu 7.10 install and the hosts file is fine there, and checked another Ubuntu 8.04 install which was also fine. I definitely have not edited the hosts file myself.
Great, it's clear now. Just a little bit strange, that it worked _sometime_. I'll update the wiki page (or you might if you want): http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-Troubleshooting The code that has change in ruby-debug-ide is: Modified: trunk/ruby-debug-ide/lib/ruby-debug.rb =================================================================== --- trunk/ruby-debug-ide/lib/ruby-debug.rb 2008-03-10 22:23:05 UTC (rev 395) +++ trunk/ruby-debug-ide/lib/ruby-debug.rb 2008-03-13 12:35:49 UTC (rev 396) @@ -100,6 +100,7 @@ raise "Debugger is not started" unless started? return if @control_thread @control_thread = DebugThread.new do + host ||= 'localhost' # nil does not seem to work for IPv6, localhost does Debugger.print_debug("Waiting for connection on '#{host}:#{port}'") server = TCPServer.new(host, port) while (session = server.accept) Probably there is a better way(?). Also related to: http://www.netbeans.org/issues/show_bug.cgi?id=104473 where one will be able to specify host and port. Thanks for great feedback as usually ;).