Skip to content

It's a bug? #37

Description

@outofthink

Hello,I run a file in win7 and get this.

C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/winhelper.rb:5
0: [BUG] Segmentation fault
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

-- Control frame information -----------------------------------------------
c:0013 p:---- s:0056 b:0056 l:000055 d:000055 CFUNC :GetFileInformationByHandle

c:0012 p:0057 s:0051 b:0051 l:000050 d:000050 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/winhelper.rb:50
c:0011 p:0194 s:0044 b:0044 l:000043 d:000043 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:145
c:0010 p:0162 s:0034 b:0034 l:000738 d:000033 BLOCK C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:84
c:0009 p:0044 s:0030 b:0030 l:000021 d:000029 BLOCK C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:56
c:0008 p:---- s:0027 b:0027 l:000026 d:000026 FINISH
c:0007 p:---- s:0025 b:0025 l:000024 d:000024 CFUNC :each
c:0006 p:0019 s:0022 b:0022 l:000021 d:000021 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:53
c:0005 p:0042 s:0018 b:0018 l:000017 d:000017 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:117
c:0004 p:0027 s:0011 b:0011 l:000738 d:000738 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:76
c:0003 p:0069 s:0007 b:0007 l:000b6c d:0008c0 EVAL tt.rb:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000b6c d:000b6c TOP

-- Ruby level backtrace information ----------------------------------------
tt.rb:6:in <main>' C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:76:in subscribe'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:117:i
n subscribe' C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:53:in each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:53:in
each' C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb:56:in block in each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:84:in
block in subscribe' C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/tail.rb:145:in _open_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/winhelper.rb:5
0:in GetWindowsUniqueFileIdentifier' C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/winhelper.rb:5 0:inGetFileInformationByHandle'

-- C level backtrace information -------------------------------------------
C:\windows\SYSTEM32\ntdll.dll(KiFastSystemCallRet+0x0) [0x775070f4]
C:\windows\system32\kernel32.dll(WaitForSingleObjectEx+0x43) [0x76e2c3d3]
C:\windows\system32\kernel32.dll(WaitForSingleObject+0x12) [0x76e2c382]
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\system32\kernel32.dll(UnhandledExceptionFilter+0xf5) [0x76e407fe]
C:\windows\SYSTEM32\ntdll.dll(EtwReplyNotification+0x366) [0x77537f62]

-- Other runtime information -----------------------------------------------

  • Loaded script: tt.rb

  • 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/gbk.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/site_ruby/1.9.1/rubygems/version.rb
    12 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
    13 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
    14 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
    15 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
    16 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/utf_16le.so
    17 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/utf_16_32.so
    18 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/gbk.so
    19 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
    20 C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/buftok.r
    b
    21 C:/Ruby193/lib/ruby/1.9.1/thread.rb
    22 C:/Ruby193/lib/ruby/1.9.1/monitor.rb
    23 C:/Ruby193/lib/ruby/1.9.1/logger.rb
    24 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/1.9/ffi_c.so

    25 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/platform
    .rb
    26 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/types.rb

    27 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/library.
    rb
    28 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/errno.rb

    29 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/pointer.
    rb
    30 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/memorypo
    inter.rb
    31 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/struct_l
    ayout_builder.rb
    32 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/struct.r
    b
    33 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/union.rb

    34 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/manageds
    truct.rb
    35 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/callback
    .rb
    36 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/io.rb
    37 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/autopoin
    ter.rb
    38 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/variadic
    .rb
    39 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/enum.rb
    40 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi/ffi.rb
    41 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.3-x86-mingw32/lib/ffi.rb
    42 C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/winhelpe
    r.rb
    43 C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/watch.rb

    44 C:/Ruby193/lib/ruby/gems/1.9.1/gems/filewatch-0.6.0/lib/filewatch/tail.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.

tt.rb

require "rubygems"
require "filewatch/tail"

t = FileWatch::Tail.new
t.tail("*.log")
t.subscribe do |path, line|
puts "#{path}: #{line}"
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions