pmq20 / ruby-packer

Packing your Ruby application into a single executable.
MIT License
1.56k stars 99 forks source link

Got error while running rubyc-v0.4.0-x64.exe directly #83

Open gxm11 opened 5 years ago

gxm11 commented 5 years ago

Run the downloaded file directly in cmd, without any parameters. Here's the output. Windows 10 1809

D:\test>rubyc-v0.4.0-x64.exe
D:/__enclose_io_memfs__/local/lib/compiler.rb:71: [BUG] Segmentation fault
ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mswin64_140]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0032 e:000031 CFUNC  :write
c:0005 p:---- s:0029 e:000028 CFUNC  :puts
c:0004 p:0152 s:0024 e:000023 METHOD D:/__enclose_io_memfs__/local/lib/compiler.rb:71 [FINISH]
c:0003 p:---- s:0018 e:000017 CFUNC  :new
c:0002 p:0153 s:0012 E:000ca0 EVAL   /__enclose_io_memfs__/local/bin/rubyc:148 [FINISH]
c:0001 p:0000 s:0003 E:0001c0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/__enclose_io_memfs__/local/bin/rubyc:148:in `<main>'
/__enclose_io_memfs__/local/bin/rubyc:148:in `new'
D:/__enclose_io_memfs__/local/lib/compiler.rb:71:in `initialize'
D:/__enclose_io_memfs__/local/lib/compiler.rb:71:in `puts'
D:/__enclose_io_memfs__/local/lib/compiler.rb:71:in `write'

-- C level backtrace information -------------------------------------------
C:\Windows\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0x14) [0x00007FF90A77F714]
C:\Windows\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x93) [0x00007FF9072C83D3]
 [0x00007FF7DB5D3934]
 [0x00007FF7DB5D39B9]
 [0x00007FF7DB50AE40]
 [0x00007FF7DB575026]
C:\Windows\System32\ucrtbase.dll(seh_filter_exe+0x233) [0x00007FF9068BCFA3]
 [0x00007FF7DB64CB00]
C:\Windows\SYSTEM32\VCRUNTIME140.dll(_C_specific_handler+0xa0) [0x00007FF8F955B980]
C:\Windows\SYSTEM32\ntdll.dll(_chkstk+0x11f) [0x00007FF90A7846AF]
C:\Windows\SYSTEM32\ntdll.dll(RtlWalkFrameChain+0x14bf) [0x00007FF90A6E4BEF]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e) [0x00007FF90A78341E]
C:\Windows\SYSTEM32\ntdll.dll(EtwNotificationRegister+0x2c3) [0x00007FF90A72DF23]
C:\Windows\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x12c) [0x00007FF90A6E9BBC]
C:\Windows\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x40) [0x00007FF90A6E9AD0]
 [0x00007FF7DB4CAC46]
 [0x00007FF7DB4B354C]
 [0x00007FF7DB52E9DD]
 [0x00007FF7DB52E856]
 [0x00007FF7DB52F202]
 [0x00007FF7DB5309EF]
 [0x00007FF7DB5001A1]
 [0x00007FF7DB500002]
 [0x00007FF7DB4FFCCA]
 [0x00007FF7DB4FA656]
 [0x00007FF7DB4FB511]
 [0x00007FF7DB535AB8]
 [0x00007FF7DB500545]
 [0x00007FF7DB501029]
 [0x00007FF7DB500C4D]
 [0x00007FF7DB503886]
 [0x00007FF7DB5025C1]
 [0x00007FF7DB4FFF36]
 [0x00007FF7DB4FFCCA]
 [0x00007FF7DB4FA656]
 [0x00007FF7DB4FB511]
 [0x00007FF7DB51B274]
 [0x00007FF7DB500545]
 [0x00007FF7DB501029]
 [0x00007FF7DB500C4D]
 [0x00007FF7DB503886]
 [0x00007FF7DB5025C1]
 [0x00007FF7DB4AEA5F]
 [0x00007FF7DB4AEAB9]
 [0x00007FF7DB4AED30]
 [0x00007FF7DB4A111C]
 [0x00007FF7DB64BE59]
C:\Windows\System32\KERNEL32.DLL(BaseThreadInitThunk+0x14) [0x00007FF907B57974]

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

* Loaded script: /__enclose_io_memfs__/local/bin/rubyc

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 encdb.so
    5 trans/transdb.so
    6 enc/gbk.so
    7 D:/__enclose_io_memfs__/lib/ruby/2.4.0/unicode_normalize.rb
    8 D:/__enclose_io_memfs__/lib/ruby/2.4.0/x64-mswin64_140/rbconfig.rb
    9 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/compatibility.rb
   10 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/defaults.rb
   11 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/deprecate.rb
   12 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/errors.rb
   13 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/version.rb
   14 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/requirement.rb
   15 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/platform.rb
   16 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/basic_specification.rb
   17 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/stub_specification.rb
   18 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/util/list.rb
   19 stringio.so
   20 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/specification.rb
   21 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/exceptions.rb
   22 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_gem.rb
   23 D:/__enclose_io_memfs__/lib/ruby/2.4.0/monitor.rb
   24 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb
   25 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems.rb
   26 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/dependency.rb
   27 D:/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/path_support.rb
   28 D:/__enclose_io_memfs__/lib/ruby/2.4.0/fileutils.rb
   29 D:/__enclose_io_memfs__/local/lib/compiler/constants.rb
   30 D:/__enclose_io_memfs__/local/lib/compiler/error.rb
   31 D:/__enclose_io_memfs__/lib/ruby/2.4.0/shellwords.rb
   32 D:/__enclose_io_memfs__/lib/ruby/2.4.0/tmpdir.rb
   33 D:/__enclose_io_memfs__/lib/ruby/2.4.0/open3.rb
   34 D:/__enclose_io_memfs__/local/lib/compiler/utils.rb
   35 D:/__enclose_io_memfs__/lib/ruby/2.4.0/json/version.rb
   36 D:/__enclose_io_memfs__/lib/ruby/2.4.0/ostruct.rb
   37 D:/__enclose_io_memfs__/lib/ruby/2.4.0/json/generic_object.rb
   38 D:/__enclose_io_memfs__/lib/ruby/2.4.0/json/common.rb
   39 json/ext/parser.so
   40 json/ext/generator.so
   41 D:/__enclose_io_memfs__/lib/ruby/2.4.0/json/ext.rb
   42 D:/__enclose_io_memfs__/lib/ruby/2.4.0/json.rb
   43 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/rfc2396_parser.rb
   44 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/rfc3986_parser.rb
   45 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/common.rb
   46 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/generic.rb
   47 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/ftp.rb
   48 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/http.rb
   49 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/https.rb
   50 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/ldap.rb
   51 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/ldaps.rb
   52 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri/mailto.rb
   53 D:/__enclose_io_memfs__/lib/ruby/2.4.0/uri.rb
   54 date_core.so
   55 D:/__enclose_io_memfs__/lib/ruby/2.4.0/date.rb
   56 D:/__enclose_io_memfs__/lib/ruby/2.4.0/time.rb
   57 D:/__enclose_io_memfs__/lib/ruby/2.4.0/open-uri.rb
   58 D:/__enclose_io_memfs__/local/lib/compiler/gem_package.rb
   59 pathname.so
   60 D:/__enclose_io_memfs__/lib/ruby/2.4.0/pathname.rb
   61 D:/__enclose_io_memfs__/local/lib/compiler.rb
   62 D:/__enclose_io_memfs__/lib/ruby/2.4.0/optparse.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
runapp commented 5 years ago

It seems to be wired with Windows 10 1809. I've compiled a helloworld on 1607. The exe can run on another Win10 1803 computer (no ruby is installed ever on that computer). However the exe has no output neither any error dialogs when run on 1809. Test was made on two 1809 computers, one of them has no ruby-related stuff ever either.

hermanzh commented 5 years ago

Same issue on me!

pmq20 commented 4 years ago

The v0.4.0 binary is very old. Let me try if I can reproduce it on the latest master branch.

ravicious commented 3 years ago

The unstable version seems to run on Windows 10, though I haven't tried compiling anything with it. But at least rubyc -v doesn't crash with that error.