Fatal exception in DebugThread loop: wrong number of arguments (4 for 3)

Completed

Trying to run the debugger against some old Rails (2.3.18) tests.  Every time I run a debug against a rails unit test I get the above exception.  I expect it is some dependency issue but the stacktrace is not very helpful.  Running

RubyMine 2018.1.3
Build #RM-181.4892.67, built on May 16, 2018
JRE: 1.8.0_152-release-1136-b38 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.4:

 

Testing started at 16:10 ...
/Users/owain/.rbenv/shims/bundle exec ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Itest /Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.7.0.beta4/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --evaluation-control --time-limit 100 --memory-limit 0 --rubymine-protocol-extensions --port 57991 --host 0.0.0.0 --dispatcher-port 57992 -- /Users/owain/dev/i4/test/lib/unit/pricing_logic_test.rb
/Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.7.0.beta4/lib/ruby-debug-ide.rb:7: warning: already initialized constant FRONT_END
Evaluation memory limit is ineffective in JRuby and MRI < 2.0
Fatal exception in DebugThread loop: wrong number of arguments (4 for 3)
Backtrace:
/Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.6.1/lib/ruby-debug-ide/greeter.rb:13:in `print_greeting_msg'
from: /Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.7.0.beta4/lib/ruby-debug-ide.rb:124:in `block (2 levels) in start_control'
from: /Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.7.0.beta4/lib/ruby-debug-ide.rb:158:in `notify_dispatcher_if_needed'
from: /Users/owain/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.7.0.beta4/lib/ruby-debug-ide.rb:122:in `block in start_control'

Process finished with exit code 2

1
2 comments
Avatar
Permanently deleted user

Fixed by doing the following.

  • removed the JOPT from the run config.  That removed the memory limit message
  • cleaned out  all the rbenv gems - I had multiple versions of some of them, this then allowed me to execute the command line from the command line without the bundle exec part (you have to put ' ' around the -e option
  • then tried it with bundle exec and it complained cannot load such file -- ruby-debug-ide/greeter (LoadError)
  • added gem 'ruby-debug-ide', '~> 0.7.0.beta4' to Gemfile.  
  • Rubymine debugger now works again!

I think all of this was caused by doing a bundle update a few days ago.

 

0
Avatar
Permanently deleted user

Owain, thank you.  I can now spend a little bit less time in my "85% of my time is spent configuring systems"; your key was adding the ruby-debug-ide gem to Gemfile.  I don't know why RubyMine doesn't succeed w/o this, but doesn't matter now.

 

0

Please sign in to leave a comment.