Closed systestrjr closed 9 years ago
Can you try using the latest version of ffi
? There were some issues with ffi
that have since been fixed. That is most likely what you are running into.
C:\Temp\uia>gem list |grep uia uia (0.5) C:\Temp\uia>gem list |grep ffi ffi (1.9.6) C:\Temp\uia>gem list |grep require_all require_all (1.3.2) C:\Temp\uia>ruby -v ruby 1.9.3p550 (2014-10-27) [i386-mingw32]
C:\Temp\uia>irb
irb(main):001:0> require 'uia'
Gem::LoadError: Could not find ffi (= 1.9.0) amongst [bigdecimal-1.1.0, ffi-1.9.6, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-0.9.2.2, rautomation-0.17.0,
rdoc-3.9.5, require_all-1.3.2, uia-0.5]
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in to_specs' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:778:in
block in activate_dependencies'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in each' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in
activate_dependencies'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in activate' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in
rescue in try_activate'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in try_activate' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in
rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in require' from (irb):1 from C:/Ruby193/bin/irb:12:in
I forgot that uia
is currently locked at 1.9.0
(see here).
To get it working for you now, you'll have to gem install ffi -v 1.9.0
.
but it doesnt work either with 1.9.0 (see original posting on top)...seg fault occurs during Uia.find_element
I just loosened the dependency to ~> 1.9.4
since that's when they fixed that issue. Try updating to 0.6
of uia
to see if that fixes your issue.
@systestrjr did this work for you? I'm going to close this out if I don't hear back from you.
yes v0.6 seemed to have fixed the reported issue.
You may close this one.
Thanks
C:\Temp\uia>gem list |grep uia uia (0.5) C:\Temp\uia>gem list |grep ffi ffi (1.9.0) C:\Temp\uia>gem list |grep require_all require_all (1.3.2) C:\Temp\uia>ruby -v ruby 1.9.3p550 (2014-10-27) [i386-mingw32]
C:\Temp\uia>irb irb(main):001:0> require 'uia' => true irb(main):002:0> mw = Uia.find_element(title: /Paint/) C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/win32.rb:31: [BUG] Segmentation fault ruby 1.9.3p550 (2014-10-27) [i386-mingw32]
-- Control frame information ----------------------------------------------- c:0028 p:---- s:0110 b:0110 l:000109 d:000109 CFUNC :enum_child_windows c:0027 p:0057 s:0104 b:0104 l:001d64 d:001d64 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/win32. c:0026 p:0023 s:0097 b:0097 l:001d88 d:001d88 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/finder.rb:80 c:0025 p:0192 s:0091 b:0091 l:000090 d:000090 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/finder.rb:25 c:0024 p:0013 s:0087 b:0087 l:000086 d:000086 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia.rb:20 c:0023 p:0021 s:0083 b:0083 l:00218c d:000b38 EVAL (irb):2 c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :eval c:0020 p:0028 s:0071 b:0071 l:000070 d:000070 METHOD C:/Ruby193/lib/ruby/1.9.1/irb/workspace.rb:80 c:0019 p:0033 s:0064 b:0063 l:000062 d:000062 METHOD C:/Ruby193/lib/ruby/1.9.1/irb/context.rb:254 c:0018 p:0031 s:0058 b:0058 l:000484 d:000057 BLOCK C:/Ruby193/lib/ruby/1.9.1/irb.rb:159 c:0017 p:0042 s:0050 b:0050 l:000049 d:000049 METHOD C:/Ruby193/lib/ruby/1.9.1/irb.rb:273 c:0016 p:0011 s:0045 b:0045 l:000484 d:000044 BLOCK C:/Ruby193/lib/ruby/1.9.1/irb.rb:156 c:0015 p:0144 s:0041 b:0041 l:000024 d:000040 BLOCK C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:243 c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:229 c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:228 c:0008 p:0046 s:0022 b:0022 l:000484 d:000484 METHOD C:/Ruby193/lib/ruby/1.9.1/irb.rb:155 c:0007 p:0011 s:0019 b:0019 l:000c24 d:000018 BLOCK C:/Ruby193/lib/ruby/1.9.1/irb.rb:70 c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch c:0004 p:0183 s:0011 b:0011 l:000c24 d:000c24 METHOD C:/Ruby193/lib/ruby/1.9.1/irb.rb:69 c:0003 p:0039 s:0006 b:0006 l:00019c d:0018ec EVAL C:/Ruby193/bin/irb:12 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:00019c d:00019c TOP
-- Ruby level backtrace information ---------------------------------------- C:/Ruby193/bin/irb:12:in
<main>' C:/Ruby193/lib/ruby/1.9.1/irb.rb:69:in
start' C:/Ruby193/lib/ruby/1.9.1/irb.rb:69:incatch' C:/Ruby193/lib/ruby/1.9.1/irb.rb:70:in
block in start' C:/Ruby193/lib/ruby/1.9.1/irb.rb:155:ineval_input' C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
each_top_level_statement' C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:228:incatch' C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
block in each_top_level_statement' C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:229:inloop' C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in
block (2 levels) in each_top_level_statement' C:/Ruby193/lib/ruby/1.9.1/irb.rb:156:inblock in eval_input' C:/Ruby193/lib/ruby/1.9.1/irb.rb:273:in
signal_status' C:/Ruby193/lib/ruby/1.9.1/irb.rb:159:inblock (2 levels) in eval_input' C:/Ruby193/lib/ruby/1.9.1/irb/context.rb:254:in
evaluate' C:/Ruby193/lib/ruby/1.9.1/irb/workspace.rb:80:inevaluate' C:/Ruby193/lib/ruby/1.9.1/irb/workspace.rb:80:in
eval' (irb):2:inirb_binding' C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia.rb:20:in
find_element' C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/finder.rb:25:infind_from_root' C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/finder.rb:80:in
find_by_title' C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/win32.rb:31:infind_window' C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/win32.rb:31:in
enum_child_windows'-- C level backtrace information ------------------------------------------- C:\Windows\SysWOW64\ntdll.dll(ZwWaitForSingleObject+0x15) [0x77d7f8b1] C:\Windows\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x758f1194] C:\Windows\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x758f1148] C:\Ruby193\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e7c9d9] C:\Ruby193\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new+0x186) [0x62d41436] C:\Ruby193\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d4229f] C:\Ruby193\bin\msvcrt-ruby191.dll(rb_check_safe_str+0x1f0) [0x62e04220] [0x004011e6] C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll(GetXMLElementAttribute+0x3d70) [0x74495767] C:\Windows\syswow64\kernel32.dll(GetProfileStringW+0x12d67) [0x75930303] C:\Windows\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x77dd74df]
-- Other runtime information -----------------------------------------------
Loaded features:
0 enumerator.so 1 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/encdb.so 2 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/iso_8859_1.so 3 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/transdb.so 4 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb 5 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/rbconfig.rb 6 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb 7 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb 8 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults/operating_system.rb 9 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb 10 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb 11 C:/Ruby193/lib/ruby/1.9.1/e2mmap.rb 12 C:/Ruby193/lib/ruby/1.9.1/irb/init.rb 13 C:/Ruby193/lib/ruby/1.9.1/irb/workspace.rb 14 C:/Ruby193/lib/ruby/1.9.1/irb/inspector.rb 15 C:/Ruby193/lib/ruby/1.9.1/irb/context.rb 16 C:/Ruby193/lib/ruby/1.9.1/irb/extend-command.rb 17 C:/Ruby193/lib/ruby/1.9.1/irb/output-method.rb 18 C:/Ruby193/lib/ruby/1.9.1/irb/notifier.rb 19 C:/Ruby193/lib/ruby/1.9.1/irb/slex.rb 20 C:/Ruby193/lib/ruby/1.9.1/irb/ruby-token.rb 21 C:/Ruby193/lib/ruby/1.9.1/irb/ruby-lex.rb 22 C:/Ruby193/lib/ruby/1.9.1/irb/src_encoding.rb 23 C:/Ruby193/lib/ruby/1.9.1/irb/magic-file.rb 24 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/euc_jp.so 25 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/shift_jis.so 26 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/etc.so 27 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/dl.so 28 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/fiddle.so 29 C:/Ruby193/lib/ruby/1.9.1/fiddle/function.rb 30 C:/Ruby193/lib/ruby/1.9.1/fiddle/closure.rb 31 C:/Ruby193/lib/ruby/1.9.1/fiddle.rb 32 C:/Ruby193/lib/ruby/1.9.1/dl.rb 33 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rbreadline.rb 34 C:/Ruby193/lib/ruby/site_ruby/1.9.1/readline.rb 35 C:/Ruby193/lib/ruby/1.9.1/irb/input-method.rb 36 C:/Ruby193/lib/ruby/1.9.1/irb/locale.rb 37 C:/Ruby193/lib/ruby/1.9.1/irb.rb 38 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/utf_16le.so 39 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/single_byte.so 40 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/utf_16_32.so 41 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/version.rb 42 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb 43 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb 44 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb 45 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb 46 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb 47 C:/Ruby193/lib/ruby/gems/1.9.1/gems/require_all-1.3.2/lib/require_all.rb 48 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/version.rb 49 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi_c.so 50 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/platform.rb 51 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/types.rb 52 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb 53 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/errno.rb 54 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/pointer.rb 55 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/memorypointer.rb 56 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/struct_layout_builder.rb 57 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/struct.rb 58 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/union.rb 59 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/managedstruct.rb 60 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/callback.rb 61 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/io.rb 62 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/autopointer.rb 63 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/variadic.rb 64 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/enum.rb 65 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/ffi.rb 66 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi.rb 67 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/struct_attributes.rb 68 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/element_structs.rb 69 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/pattern_structs.rb 70 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library.rb 71 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/constants.rb 72 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/win32.rb 73 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/finder.rb 74 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/element_attributes.rb 75 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/library/pattern_info_attributes.rb 76 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/keys.rb 77 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/element.rb 78 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/expand_collapse.rb 79 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/invoke.rb 80 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/range_value.rb 81 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/selection.rb 82 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/selection_item.rb 83 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/table.rb 84 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/table_item.rb 85 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/text.rb 86 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/toggle.rb 87 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/value.rb 88 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/patterns/window.rb 89 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia/control_types/menu_item.rb 90 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/core_ext/array.rb 91 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/core_ext/module.rb 92 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/core_ext/string.rb 93 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/core_ext/symbol.rb 94 C:/Ruby193/lib/ruby/gems/1.9.1/gems/uia-0.5/lib/uia.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.