Closed aswerlein511 closed 6 years ago
It's hard to say what it causing it. Does it also happen with the latest version of ffi? If not, then try one version before that and so on until you've tried at least 3-5 versions. After that, try different Ruby version.
Not sure that this is even RAutomation's issue, but it probably lies in FFI instead. Closing it until further information.
@jarmo : I was able to version lock the ffi gem to version 1.9.18 and that worked for me. Thanks for the advice
I have looked into this issue before and found similar bugs raised for this issue. I found solutions that did not work for me. This library used to work for me, and then suddenly it stopped working.
OS - windows 7 ruby -v 2.3.3 rautomation -v 0.17.0 ffi -v 1.9.23
First possible solution: lock ffi gem to version 1.9.0
Doing that causes different issues with failing to execute the second command 'window =' with failing to require 'ffic'
Here is the code I am trying to execute:
require 'rautomation'
window = RAutomation::Window.new(title: /cmd/i)
window.title
Here is the stack trace that follows:
C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/functions.rb:298: [BUG] Illegal instruction ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
-- Control frame information ----------------------------------------------- c:0029 p:---- s:0117 e:000116 CFUNC :enum_windows c:0028 p:0068 s:0112 E:0021ac METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/adapter/win_32/functions.rb:298 c:0027 p:0011 s:0104 E:00007c METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/adapter/win_32/functions.rb:140 c:0026 p:0031 s:0100 e:000099 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/adapter/win_32/window.rb:48 c:0025 p:0008 s:0097 e:000096 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/adapter/win_32/window.rb:90 c:0024 p:0010 s:0093 e:000092 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/window.rb:138 c:0023 p:0008 s:0090 e:000089 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/window.rb:155 c:0022 p:0008 s:0087 e:000086 BLOCK C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/window.rb:224 c:0021 p:0049 s:0085 e:000084 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/wait_helper.rb:15 c:0020 p:0015 s:0078 E:001408 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/window.rb:224 c:0019 p:0008 s:0075 e:000074 METHOD C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomat ion-0.17.0/lib/rautomation/window.rb:105 c:0018 p:0007 s:0072 e:000071 EVAL (irb):4 [FINISH] c:0017 p:---- s:0070 e:000069 CFUNC :eval c:0016 p:0025 s:0063 e:000062 METHOD C:/Ruby23/lib/ruby/2.3.0/irb/workspace.rb:8 7 c:0015 p:0027 s:0056 e:000054 METHOD C:/Ruby23/lib/ruby/2.3.0/irb/context.rb:380
c:0014 p:0024 s:0050 e:000049 BLOCK C:/Ruby23/lib/ruby/2.3.0/irb.rb:489 c:0013 p:0041 s:0042 e:000041 METHOD C:/Ruby23/lib/ruby/2.3.0/irb.rb:623 c:0012 p:0011 s:0037 e:000036 BLOCK C:/Ruby23/lib/ruby/2.3.0/irb.rb:486 c:0011 p:0128 s:0033 e:000032 BLOCK C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:24 6 [FINISH] c:0010 p:---- s:0030 e:000029 CFUNC :loop c:0009 p:0009 s:0027 e:000026 BLOCK C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:23 2 [FINISH] c:0008 p:---- s:0025 e:000024 CFUNC :catch c:0007 p:0018 s:0021 e:000020 METHOD C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:23 1 c:0006 p:0037 s:0018 E:000e28 METHOD C:/Ruby23/lib/ruby/2.3.0/irb.rb:485 c:0005 p:0009 s:0015 e:000014 BLOCK C:/Ruby23/lib/ruby/2.3.0/irb.rb:395 [FINISH ] c:0004 p:---- s:0013 e:000012 CFUNC :catch c:0003 p:0174 s:0009 E:001fa0 METHOD C:/Ruby23/lib/ruby/2.3.0/irb.rb:394 c:0002 p:0023 s:0004 E:000cf0 EVAL C:/Ruby23/bin/irb.cmd:19 [FINISH] c:0001 p:0000 s:0002 E:000720 (none) [FINISH]
-- Ruby level backtrace information ---------------------------------------- C:/Ruby23/bin/irb.cmd:19:in
<main>' C:/Ruby23/lib/ruby/2.3.0/irb.rb:394:in
start' C:/Ruby23/lib/ruby/2.3.0/irb.rb:394:incatch' C:/Ruby23/lib/ruby/2.3.0/irb.rb:395:in
block in start' C:/Ruby23/lib/ruby/2.3.0/irb.rb:485:ineval_input' C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:231:in
each_top_level_statement' C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:231:incatch' C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:232:in
block in each_top_level_stateme nt' C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:232:inloop' C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb:246:in
block (2 levels) in each_top_le vel_statement' C:/Ruby23/lib/ruby/2.3.0/irb.rb:486:inblock in eval_input' C:/Ruby23/lib/ruby/2.3.0/irb.rb:623:in
signal_status' C:/Ruby23/lib/ruby/2.3.0/irb.rb:489:inblock (2 levels) in eval_input' C:/Ruby23/lib/ruby/2.3.0/irb/context.rb:380:in
evaluate' C:/Ruby23/lib/ruby/2.3.0/irb/workspace.rb:87:inevaluate' C:/Ruby23/lib/ruby/2.3.0/irb/workspace.rb:87:in
eval' (irb):4:inirb_binding' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/window.rb: 105:in
title' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/window.rb: 224:inwait_until_present' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/wait_helpe r.rb:15:in
wait_until' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/window.rb: 224:inblock in wait_until_present' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/window.rb: 155:in
present?' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/window.rb: 138:inexists?' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/window.rb:90:in
exists?' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/window.rb:48:inhwnd' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/functions.rb:140:in
window_hwnd' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/functions.rb:298:infind_hwnd' C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adapter/wi n_32/functions.rb:298:in
enum_windows'-- C level backtrace information ------------------------------------------- C:\WINDOWS\SysWOW64\ntdll.dll(NtWaitForSingleObject+0x15) [0x77A5F901] C:\WINDOWS\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x76E91194] C:\WINDOWS\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x76E91148] C:\Ruby23\bin\msvcrt-ruby230.dll(rb_vm_bugreport+0xaa) [0x6305F9EA] C:\Ruby23\bin\msvcrt-ruby230.dll(rb_bug_context+0x49) [0x62F06209] C:\Ruby23\bin\msvcrt-ruby230.dll(rb_check_safe_obj+0x139) [0x62FD0539] [0x00401834] C:\WINDOWS\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x77AB50D7]
-- Other runtime information -----------------------------------------------
Loaded script: irb.cmd
Loaded features:
0 enumerator.so 1 thread.rb 2 rational.so 3 complex.so 4 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/enc/encdb.so 5 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/enc/trans/transdb.so 6 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/enc/windows_1252.so 7 C:/Ruby23/lib/ruby/2.3.0/unicode_normalize.rb 8 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/rbconfig.rb 9 C:/Ruby23/lib/ruby/2.3.0/rubygems/compatibility.rb 10 C:/Ruby23/lib/ruby/2.3.0/rubygems/defaults.rb 11 C:/Ruby23/lib/ruby/2.3.0/rubygems/deprecate.rb 12 C:/Ruby23/lib/ruby/2.3.0/rubygems/errors.rb 13 C:/Ruby23/lib/ruby/2.3.0/rubygems/version.rb 14 C:/Ruby23/lib/ruby/2.3.0/rubygems/requirement.rb 15 C:/Ruby23/lib/ruby/2.3.0/rubygems/platform.rb 16 C:/Ruby23/lib/ruby/2.3.0/rubygems/basic_specification.rb 17 C:/Ruby23/lib/ruby/2.3.0/rubygems/stub_specification.rb 18 C:/Ruby23/lib/ruby/2.3.0/rubygems/util/list.rb 19 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/stringio.so 20 C:/Ruby23/lib/ruby/2.3.0/rubygems/specification.rb 21 C:/Ruby23/lib/ruby/2.3.0/rubygems/exceptions.rb 22 C:/Ruby23/lib/ruby/2.3.0/rubygems/defaults/operating_system.rb 23 C:/Ruby23/lib/ruby/2.3.0/rubygems/dependency.rb 24 C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb 25 C:/Ruby23/lib/ruby/2.3.0/monitor.rb 26 C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb 27 C:/Ruby23/lib/ruby/2.3.0/rubygems.rb 28 C:/Ruby23/lib/ruby/2.3.0/rubygems/path_support.rb 29 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/ver sion.rb 30 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/cor e_ext/name_error.rb 31 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/lev enshtein.rb 32 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jar o_winkler.rb 33 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkable.rb 34 C:/Ruby23/lib/ruby/2.3.0/delegate.rb 35 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkers/name_error_checkers/class_name_checker.rb 36 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkers/name_error_checkers/variable_name_checker.rb 37 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkers/name_error_checkers.rb 38 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkers/method_name_checker.rb 39 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spe ll_checkers/null_checker.rb 40 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/for matter.rb 41 C:/Ruby23/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.rb 42 C:/Ruby23/lib/ruby/2.3.0/e2mmap.rb 43 C:/Ruby23/lib/ruby/2.3.0/irb/init.rb 44 C:/Ruby23/lib/ruby/2.3.0/irb/workspace.rb 45 C:/Ruby23/lib/ruby/2.3.0/irb/inspector.rb 46 C:/Ruby23/lib/ruby/2.3.0/irb/context.rb 47 C:/Ruby23/lib/ruby/2.3.0/irb/extend-command.rb 48 C:/Ruby23/lib/ruby/2.3.0/irb/output-method.rb 49 C:/Ruby23/lib/ruby/2.3.0/irb/notifier.rb 50 C:/Ruby23/lib/ruby/2.3.0/irb/slex.rb 51 C:/Ruby23/lib/ruby/2.3.0/irb/ruby-token.rb 52 C:/Ruby23/lib/ruby/2.3.0/irb/ruby-lex.rb 53 C:/Ruby23/lib/ruby/2.3.0/irb/src_encoding.rb 54 C:/Ruby23/lib/ruby/2.3.0/irb/magic-file.rb 55 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/enc/euc_jp.so 56 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/enc/windows_31j.so 57 C:/Ruby23/lib/ruby/site_ruby/2.3.0/rbreadline/version.rb 58 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/etc.so 59 C:/Ruby23/lib/ruby/2.3.0/i386-mingw32/fiddle.so 60 C:/Ruby23/lib/ruby/2.3.0/fiddle/function.rb 61 C:/Ruby23/lib/ruby/2.3.0/fiddle/closure.rb 62 C:/Ruby23/lib/ruby/2.3.0/fiddle.rb 63 C:/Ruby23/lib/ruby/site_ruby/2.3.0/rbreadline.rb 64 C:/Ruby23/lib/ruby/site_ruby/2.3.0/readline.rb 65 C:/Ruby23/lib/ruby/2.3.0/irb/input-method.rb 66 C:/Ruby23/lib/ruby/2.3.0/irb/locale.rb 67 C:/Ruby23/lib/ruby/2.3.0/irb.rb 68 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/wait _helper.rb 69 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/helper.rb 70 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/butt on.rb 71 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/text _field.rb 72 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/elem ent_collections.rb 73 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/wind ow.rb 74 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation.rb 75 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/2.3/ffi_c.so
76 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/platform .rb 77 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/types.rb
78 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/library. rb 79 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/errno.rb
80 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/pointer. rb 81 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/memorypo inter.rb 82 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/struct_l ayout_builder.rb 83 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/struct.r b 84 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/union.rb
85 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/manageds truct.rb 86 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/callback .rb 87 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/io.rb 88 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/autopoin ter.rb 89 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/variadic .rb 90 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/enum.rb 91 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi/ffi.rb 92 C:/Ruby23/lib/ruby/gems/2.3.0/gems/ffi-1.9.23-x86-mingw32/lib/ffi.rb 93 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/constants.rb 94 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/keys.rb 95 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/functions.rb 96 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/locators.rb 97 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/window.rb 98 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/button_helper.rb 99 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/control.rb 100 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/button.rb 101 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/checkbox.rb 102 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/radio.rb 103 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/text_field.rb 104 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/select_list.rb 105 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/table.rb 106 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/label.rb 107 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/list_box.rb 108 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/mouse.rb 109 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32/password_field.rb 110 C:/Ruby23/lib/ruby/gems/2.3.0/gems/rautomation-0.17.0/lib/rautomation/adap ter/win_32.rb
[NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.