Repository navigation
[HELP WANTED] Try to fix windows and external command bug - #734
Conversation
|
Seeing a load error and then with FIxed the line locally, and then tried a few things |
|
I just tried the script in #545 and can no longer reproduce the issue per the video. Seems great in my ad-hoc testing |
f7f2be7 to
5dc08c3
Compare
|
Thank you for testing 👍 Fixed the - call_with_console_handle(@SetConsoleCursorInfo.call, cursor_info)
+ call_with_console_handle(@SetConsoleCursorInfo, cursor_info)and removed this debug code - val = win32func.call(@hConsoleHandle, *args)
-
- # Remove this after confirming this patch fixed the issue
- 10.times { puts }
- puts "Retry with refreshed console handle #{val == 0 ? 'failed. This patch has no effect' : 'succeeded'}."
- 10.times { puts }
- val
+ win32func.call(@hConsoleHandle, *args) |
|
Just wanted to confirm again |
hogelog
left a comment
There was a problem hiding this comment.
I also confirmed that the issues #545 and #676 frequently occur with Ruby 3.3.4.
But the problem no longer reproduces when using this pull request.
I don't fully understand the technical details of the changes, but it seems to be a good fix.
Environment
Ruby version: 3.3.4
Ruby distribution: Ruby Installer 3.3.4-1 (x64) https://rubyinstaller.org/downloads/
OS: Windows 11 Home 64bit (10.0, Build 22631)
Terminal: cmd.exe, powershell.exe
st0012
left a comment
There was a problem hiding this comment.
I'm good with merging this with users' confirmation. Also, great job fixing a bug that you can't test yourself 👍
|
@andrewngo @hogelog Thank you both for confirming this patch 👍 |
This pull request tries to fix #545 and #676.
As described in #676,
@GetConsoleScreenBufferInfo.call(@hConsoleHandle, csbi)fails after executing some external command.I think console handle is somehow closed and invalidated by child process.
If that's true, (unconfirmed), we need to refresh
@hConsoleHandleand retry the failed call.Help Wanted
This patch is not tested. I don't have an environment to reproduce.