Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe navigate when attempting to compare paths #759

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Conversation

rbclark
Copy link
Contributor

@rbclark rbclark commented Sep 22, 2022

Description

I have been experiencing an issue where compare path is causing my vscode debugger to be unable to attach. Safe navigating the downcase function seems to have stabilized the issue for me so I figured I would contribute the change back. Without this change I get the following error over and over when attempting to attach to my rails server until I restart the rails server.

14:58:51 web.1    | DEBUGGER: Connected.
14:58:51 web.1    | DEBUGGER: ReaderThreadError: undefined method `downcase' for nil:NilClass
14:58:51 web.1    | ["/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:2232:in `compare_path'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:1384:in `block in clear_line_breakpoints'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:1374:in `block in clear_breakpoints'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:1373:in `delete_if'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:1373:in `clear_breakpoints'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/session.rb:1383:in `clear_line_breakpoints'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server_dap.rb:300:in `process'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:73:in `block (3 levels) in activate'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:269:in `setup_interrupt'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:71:in `block (2 levels) in activate'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:501:in `block in accept'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:810:in `block (2 levels) in accept_loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:807:in `each'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:807:in `block in accept_loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:805:in `loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:805:in `accept_loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:1165:in `block in unix_server_loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:1119:in `unix_server_socket'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:1164:in `unix_server_loop'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:497:in `accept'",
14:58:51 web.1    |  "/Users/rbclark/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2/lib/debug/server.rb:49:in `block in activate'"]
14:58:51 web.1    | DEBUGGER: Disconnected.

I have been experiencing an issue where compare path is causing my vscode debugger to be unable to attach. Safe navigating the downcase function seems to have stabilized the issue for me so I figured I would contribute the change back.
@rbclark rbclark changed the title Save navigate when attempting to compare paths Safe navigate when attempting to compare paths Sep 22, 2022
@ko1 ko1 added the bug Something isn't working label Oct 4, 2022
@ko1 ko1 merged commit 9de5d28 into ruby:master Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants