* [ruby-core:89163] [Ruby trunk Bug#15159] Some options of win32screenshot gem not working with Ruby 2.5.1.
[not found] <redmine.issue-15159.20180925150516@ruby-lang.org>
@ 2018-09-25 15:05 ` d_lyles
2019-06-20 15:34 ` [ruby-core:93277] " merch-redmine
1 sibling, 0 replies; 2+ messages in thread
From: d_lyles @ 2018-09-25 15:05 UTC (permalink / raw
To: ruby-core
Issue #15159 has been reported by d_lyles (Damien Lyles).
----------------------------------------
Bug #15159: Some options of win32screenshot gem not working with Ruby 2.5.1.
https://bugs.ruby-lang.org/issues/15159
* Author: d_lyles (Damien Lyles)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [i386-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Hello,
The following options are not working for the win32screenshot gem (or possibly rautomation) in Ruby 2.5.1. The error I get is below. I have attached a log as well. The code works in Ruby 2.4.4.
C:/Selenium_Ruby/runtime/lib/ruby/gems/2.5.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/functions.rb:298: [BUG] Segmentation fault
Sample code...
filename_and_path="c:\\myscreenshot.png"
puts "Attepting to take screenshot of foreground using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:foreground).write(filename_and_path)
puts "Attepting to take screenshot of window with title #{window_title} using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:window, :title => /#{window_title}/i).write(filename_and_path) #Another option
puts "Attepting to take screenshot of desktop using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:desktop).write(filename_and_path)
---Files--------------------------------
win32screenshot_errors.txt (84.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:93277] [Ruby trunk Bug#15159] Some options of win32screenshot gem not working with Ruby 2.5.1.
[not found] <redmine.issue-15159.20180925150516@ruby-lang.org>
2018-09-25 15:05 ` [ruby-core:89163] [Ruby trunk Bug#15159] Some options of win32screenshot gem not working with Ruby 2.5.1 d_lyles
@ 2019-06-20 15:34 ` merch-redmine
1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-06-20 15:34 UTC (permalink / raw
To: ruby-core
Issue #15159 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Open to Third Party's Issue
The segfault is in a external gem (rautomation) that uses FFI: https://github.com/jarmo/RAutomation/blob/7314a7e6f8bbba797d276ca1950abde0cba6897a/lib/rautomation/adapter/win_32/functions.rb#L18-L19
It looks very similar to a bug report on their bug tracker: https://github.com/jarmo/RAutomation/issues/122
Please work with the rautomation developers to resolve this issue.
----------------------------------------
Bug #15159: Some options of win32screenshot gem not working with Ruby 2.5.1.
https://bugs.ruby-lang.org/issues/15159#change-78736
* Author: d_lyles (Damien Lyles)
* Status: Third Party's Issue
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [i386-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Hello,
The following options are not working for the win32screenshot gem (or possibly rautomation) in Ruby 2.5.1. The error I get is below. I have attached a log as well. The code works in Ruby 2.4.4.
C:/Selenium_Ruby/runtime/lib/ruby/gems/2.5.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/functions.rb:298: [BUG] Segmentation fault
Sample code...
filename_and_path="c:\\myscreenshot.png"
puts "Attepting to take screenshot of foreground using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:foreground).write(filename_and_path)
puts "Attepting to take screenshot of window with title #{window_title} using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:window, :title => /#{window_title}/i).write(filename_and_path) #Another option
puts "Attepting to take screenshot of desktop using Win32screenshot gem...\n\n"
Win32::Screenshot::Take.of(:desktop).write(filename_and_path)
---Files--------------------------------
win32screenshot_errors.txt (84.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-20 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-15159.20180925150516@ruby-lang.org>
2018-09-25 15:05 ` [ruby-core:89163] [Ruby trunk Bug#15159] Some options of win32screenshot gem not working with Ruby 2.5.1 d_lyles
2019-06-20 15:34 ` [ruby-core:93277] " merch-redmine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).