Forum: Ruby-core [ruby-trunk - Bug #9149][Open] rb-appscript crash

E8b33ebe27d336e676cceb5f06616e4c?d=identicon&s=25 unbewusst (Yvon Thoraval) (Guest)
on 2013-11-25 02:50
(Received via mailing list)
Issue #9149 has been reported by unbewusst (Yvon Thoraval).

----------------------------------------
Bug #9149: rb-appscript crash
https://bugs.ruby-lang.org/issues/9149

Author: unbewusst (Yvon Thoraval)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784)
[x86_64-darwin13.0.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


a simple script as :
#! /usr/bin/env ruby
# encoding: utf-8

require 'rubygems'
require 'appscript'
include Appscript

selected = app('Finder').selection.get(:result_type => :alias)
selected.each do |file|
  puts file.to_s
end

crashed with :
-- Control frame information
-----------------------------------------------
c:0013 p:-17575293241584 s:0058 e:000057 TOP    [FINISH]
c:0012 p:---- s:0056 e:000055 CFUNC  :require
c:0011 p:0115 s:0052 e:000051 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0010 p:0009 s:0042 e:000041 CLASS
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12
c:0009 p:0009 s:0040 e:000039 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7
[FINISH]
c:0008 p:---- s:0038 e:000037 CFUNC  :require
c:0007 p:0115 s:0034 e:000033 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0006 p:0007 s:0024 e:000023 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8
[FINISH]
c:0005 p:---- s:0022 e:000021 CFUNC  :require
c:0004 p:0073 s:0018 e:000017 BLOCK
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135
c:0003 p:0444 s:0015 e:000014 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144
c:0002 p:0015 s:0005 E:001fa0 EVAL   ./finder_selected.rb:5 [FINISH]
c:0001 p:0000 s:0002 E:0005a8 TOP    [FINISH]

./finder_selected.rb:5:in `<main>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`rescue in require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8:in
`<top (required)>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7:in
`<top (required)>'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12:in
`<module:MacTypes>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
F1d6cc2b735bfd82c8773172da2aeab9?d=identicon&s=25 Nobuyoshi Nakada (nobu)
on 2013-11-26 06:18
(Received via mailing list)
Issue #9149 has been updated by nobu (Nobuyoshi Nakada).


I think I've seen very similar report in these days, but I can't find it
now...

7   libruby.2.0.0.dylib             0x00000001027af9ca
st_init_strcasetable + 16
8   libruby.2.0.0.dylib             0x00000001026eb9a5 rb_enc_init + 29
9   libruby.2.0.0.dylib             0x00000001026ec5be
rb_usascii_encoding + 21
10  libruby.2.0.0.dylib             0x000000010276a299 rb_intern + 23
11  libruby.2.0.0.dylib             0x00000001027022a5 rb_define_module
+ 16

----------------------------------------
Bug #9149: rb-appscript crash
https://bugs.ruby-lang.org/issues/9149#change-43156

Author: unbewusst (Yvon Thoraval)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784)
[x86_64-darwin13.0.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


a simple script as :
#! /usr/bin/env ruby
# encoding: utf-8

require 'rubygems'
require 'appscript'
include Appscript

selected = app('Finder').selection.get(:result_type => :alias)
selected.each do |file|
  puts file.to_s
end

crashed with :
-- Control frame information
-----------------------------------------------
c:0013 p:-17575293241584 s:0058 e:000057 TOP    [FINISH]
c:0012 p:---- s:0056 e:000055 CFUNC  :require
c:0011 p:0115 s:0052 e:000051 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0010 p:0009 s:0042 e:000041 CLASS
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12
c:0009 p:0009 s:0040 e:000039 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7
[FINISH]
c:0008 p:---- s:0038 e:000037 CFUNC  :require
c:0007 p:0115 s:0034 e:000033 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0006 p:0007 s:0024 e:000023 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8
[FINISH]
c:0005 p:---- s:0022 e:000021 CFUNC  :require
c:0004 p:0073 s:0018 e:000017 BLOCK
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135
c:0003 p:0444 s:0015 e:000014 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144
c:0002 p:0015 s:0005 E:001fa0 EVAL   ./finder_selected.rb:5 [FINISH]
c:0001 p:0000 s:0002 E:0005a8 TOP    [FINISH]

./finder_selected.rb:5:in `<main>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`rescue in require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8:in
`<top (required)>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7:in
`<top (required)>'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12:in
`<module:MacTypes>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
F1d6cc2b735bfd82c8773172da2aeab9?d=identicon&s=25 Nobuyoshi Nakada (nobu)
on 2013-11-27 04:19
(Received via mailing list)
Issue #9149 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Feedback

It's #9142.

I couldn't reproduce it.
Maybe related to rvm?
----------------------------------------
Bug #9149: rb-appscript crash
https://bugs.ruby-lang.org/issues/9149#change-43191

Author: unbewusst (Yvon Thoraval)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784)
[x86_64-darwin13.0.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


a simple script as :
#! /usr/bin/env ruby
# encoding: utf-8

require 'rubygems'
require 'appscript'
include Appscript

selected = app('Finder').selection.get(:result_type => :alias)
selected.each do |file|
  puts file.to_s
end

crashed with :
-- Control frame information
-----------------------------------------------
c:0013 p:-17575293241584 s:0058 e:000057 TOP    [FINISH]
c:0012 p:---- s:0056 e:000055 CFUNC  :require
c:0011 p:0115 s:0052 e:000051 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0010 p:0009 s:0042 e:000041 CLASS
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12
c:0009 p:0009 s:0040 e:000039 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7
[FINISH]
c:0008 p:---- s:0038 e:000037 CFUNC  :require
c:0007 p:0115 s:0034 e:000033 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0006 p:0007 s:0024 e:000023 TOP
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8
[FINISH]
c:0005 p:---- s:0022 e:000021 CFUNC  :require
c:0004 p:0073 s:0018 e:000017 BLOCK
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135
c:0003 p:0444 s:0015 e:000014 METHOD
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144
c:0002 p:0015 s:0005 E:001fa0 EVAL   ./finder_selected.rb:5 [FINISH]
c:0001 p:0000 s:0002 E:0005a8 TOP    [FINISH]

./finder_selected.rb:5:in `<main>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`rescue in require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/appscript.rb:8:in
`<top (required)>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:7:in
`<top (required)>'
/Users/yt/.rvm/gems/ruby-2.0.0-p353/gems/rb-appscript-0.6.1/lib/_aem/mactypes.rb:12:in
`<module:MacTypes>'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
/Users/yt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
This topic is locked and can not be replied to.