Skip to content

Debugger raises "undefined method `prerelease?' for nil:NilClass (NoMethodError)" in CDP #472

Closed

Description

@ono-max

Your environment

  • ruby -v:
    ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
  • rdbg -v:

Describe the bug
A clear and concise description of what the bug is.
When I debug irb, debugger raised "undefined method `prerelease?' for nil:NilClass (NoMethodError)" as follows:

$ exe/rdbg -c irb --open=chrome
DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:52808)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
["DEBUGGER Exception: /Users/naotto/workspace/debug/lib/debug/thread_client.rb:986",
 #<NoMethodError: undefined method `prerelease?' for nil:NilClass>,
 ["/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:88:in `prerelease?'",
  "/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:75:in `inspect'",
  "/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:877:in `variable_'",
  "/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:922:in `variable'",
  "/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:791:in `process_cdp'",
  "/Users/naotto/workspace/debug/lib/debug/thread_client.rb:977:in `wait_next_action_'",
  "/Users/naotto/workspace/debug/lib/debug/thread_client.rb:676:in `wait_next_action'",
  "/Users/naotto/workspace/debug/lib/debug/thread_client.rb:284:in `suspend'",
  "/Users/naotto/workspace/debug/lib/debug/thread_client.rb:318:in `block in step_tp'",
  "/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:36:in `initialize'",
  "/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `new'",
  "/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `find_spec_for_exe'",
  "/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'",
  "/Users/naotto/.rbenv/versions/3.0.0/bin/irb:23:in `<main>'"]]
/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:88:in `prerelease?': undefined method `prerelease?' for nil:NilClass (NoMethodError)
	from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:75:in `inspect'
	from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:877:in `variable_'
	from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:922:in `variable'
	from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:791:in `process_cdp'
	from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:977:in `wait_next_action_'
	from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:676:in `wait_next_action'
	from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:284:in `suspend'
	from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:318:in `block in step_tp'
	from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:36:in `initialize'
	from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `new'
	from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `find_spec_for_exe'
	from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'
	from /Users/naotto/.rbenv/versions/3.0.0/bin/irb:23:in `<main>'

To Reproduce

exe/rdbg -c irb --open=chrome

Then, press "StepInto" button 25 times.

Expected behavior
It should not raise an error.

Additional context
Add any other context about the problem here.

Activity

  1. changed the title [-]Debugger raises `undefined method `prerelease?' for nil:NilClass (NoMethodError)` in CDP[/-] [+]Debugger raises "undefined method `prerelease?' for nil:NilClass (NoMethodError)" in CDP[/+] on Jan 1, 2022
  2. added 2 commits that reference this issue on Jan 1, 2022
    4003bb6
    71fa026
  3. added a commit that references this issue on Jan 4, 2022
    b36b1b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions