Ruby 32 bit crashes and 64 bit devkit doesn't work on Windows 10 Anniversary Update

651 views
Skip to first unread message

Wayne Vucenic

unread,
Sep 23, 2016, 6:09:48 PM9/23/16
to RubyInstaller
Summary: Running cmd.exe on Windows 10 Anniversary Update 64 bit:
32 bit Ruby crashes immediately on startup
64 bit Ruby seems to run correctly, but trying to build native extensions with the devkit fails

Details:
I've been running Ruby (32 bit) fine for many years on Windows 7 64 bit.  Thanks for all your work on this!!!

I recently upgraded to Windows 10 Pro Anniversary Update 64 bit version 1607.  (I installed Win10 over Win7 on the same machine.)  This went well, and all my old apps that I've tested work fine, except for Ruby.

(Of course I'm running all this in cmd.exe, not the new Bash/Ubuntu environment)

Running "ruby -v" with Ruby 2.2.5p319 immediately gets a dialog box saying "Ruby interpreter (CUI) 2.2.5p319 [i386-mingw32] has stopped working".  Clicking "Debug" starts Visual Studio 2015 which displays the dialog "Unhandled exception at 0x0765DC30 in ruby.exe: 0xC0000005: Access violation reading location 0x0765DC30."

The call stack in Visual Studio 2015 shows only 3 lines:
0765DC30()
[Frames below may be incorrect and/or missing]
[External code]

I get the same behavior with several other 32 bit Rubies.  I tried changing ruby.exe to run in Windows 7 compatibility mode, but that didn't change anything.

64 bit Rubies (for example 2.2.5p319 64 bit or 2.3.1p112 64 bit) seem to work OK, but I didn't test them extensively.  But I can't build any native extensions
with DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe:

C:\Ruby\Ruby231p112x64\bin>gem install json --platform=ruby
Fetching: json-2.0.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
C:/Ruby/Ruby231p112x64/bin/ruby.exe -r ./siteconf20160923-93048-105xm42.rb extconf.rb
creating Makefile

current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR=" clean

current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR="

make failed, uncaught signal 11

Gem files will remain installed in C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2 for inspection.
Results logged to C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/json-2.0.2/gem_make.out

gem_make.out contains the following:
----------------------------------------

current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
C:/Ruby/Ruby231p112x64/bin/ruby.exe -r ./siteconf20160923-93048-105xm42.rb extconf.rb
creating Makefile

current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR=" clean

current directory: C:/Ruby/Ruby231p112x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR="

make failed, uncaught signal 11

--------------------------------------------------


Thanks for any assistance!!!

Wayne


Wayne Vucenic

unread,
Sep 27, 2016, 12:30:31 AM9/27/16
to RubyInstaller
I've done some more experiments:

As I mentioned above, Running "ruby -v" in cmd.exe with Ruby 2.2.5p319 32 bit immediately gets a dialog box saying "Ruby interpreter (CUI) 2.2.5p319 [i386-mingw32] has stopped working". 

However, in Rubymine 2016.1.2, I can run a project with Ruby 2.2.5p319 32 bit and it runs fine.

In Git CMD, Running "ruby -v" with Ruby 2.2.5p319 32 bit immediately gets a dialog box saying "Ruby interpreter (CUI) 2.2.5p319 [i386-mingw32] has stopped working".

But in Git Bash it works fine:

$ cd ruby/ruby225p319/bin
wayne@WORK MINGW64 /c/ruby/ruby225p319/bin
$ ./ruby -v
ruby 2.2.5p319 (2016-04-26 revision 54774) [i386-mingw32]

Cristian Parada

unread,
Sep 29, 2016, 3:08:11 PM9/29/16
to RubyInstaller
There its most important details thank you for information.

Justin Baker

unread,
Sep 29, 2016, 3:26:10 PM9/29/16
to RubyInstaller
Hey Wayne, I can't reproduce this at all.

All signs suggest that you are, for some odd reason, the DLL lookup in cmd.exe is different and you're loading a non-windows system DLL that is breaking the Ruby interpreter.
Is Cygwin in your path? Any other things that might hijack the console?

If there's anything else that you figure out, let me know.

Justin

Wayne Vucenic

unread,
Sep 30, 2016, 12:51:58 PM9/30/16
to rubyin...@googlegroups.com, azol...@gmail.com
Hi Justin and Cristian,

Thanks for your replies!

>> I can't reproduce this at all.

Were you able to try it on Win 10 Anniversary Update?  I'm guessing that's where the problem is.

Regarding DLL lookup, I can't think of anything that might cause problems with this.  cygwin is not in my path.  Also, Ruby was running perfectly on Win 7 just before I upgraded to Win10AU, then after the upgrade this problem appeared.  Of course, I'm not sure whether the Win10 upgrade modified my path.

I recreated the crash by running "ruby -v" in the Windows command prompt.  When I got the dialog box saying "Ruby interpreter (CUI) 2.2.5p319 [i386-mingw32] has stopped working" I clicked "Debug" and got the list of DLLs from the Module window in Visual Studio 2015.  Attached as "Win10AU cmd CRASH.PNG".  All the DLLs look pretty reasonable to me.

Since Ruby runs in Git Bash, I ran it in Git Bash:

wayne@WORK MINGW64 /c/Ruby/Ruby225p319/bin
$ ./ruby -e "gets"

I started a new Visual Studio 2015, attached the debugger to ruby.exe, and got the DLL list, attached as "Win10AU git bash WORKS 1 of 2".PNG (and 2 of 2 as the whole list wouldn't fit on the screen)

Thanks,

Wayne




--
You received this message because you are subscribed to a topic in the Google Groups "RubyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyinstaller/YcFdbvRXTk8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyinstaller+unsubscribe@googlegroups.com.
To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/d/optout.

Win10AU cmd CRASH.PNG
Win10AU git bash WORKS 1 of 2.PNG
Win10AU git bash WORKS 2 of 2.PNG

Justin Baker

unread,
Oct 1, 2016, 2:27:28 AM10/1/16
to RubyInstaller, azol...@gmail.com
Hey Wayne, see inline replies.


On Friday, September 30, 2016 at 11:51:58 AM UTC-5, Wayne Vucenic wrote:
>> I can't reproduce this at all.

Were you able to try it on Win 10 Anniversary Update?  I'm guessing that's where the problem is.

Yep, I actually tried it on the AU update and the insider fast ring. Both worked just fine for me.

The Windows Build Number I'm using is: 14393.187
 
Regarding DLL lookup, I can't think of anything that might cause problems with this.  cygwin is not in my path.  Also, Ruby was running perfectly on Win 7 just before I upgraded to Win10AU, then after the upgrade this problem appeared.  Of course, I'm not sure whether the Win10 upgrade modified my path.

I recreated the crash by running "ruby -v" in the Windows command prompt.  When I got the dialog box saying "Ruby interpreter (CUI) 2.2.5p319 [i386-mingw32] has stopped working" I clicked "Debug" and got the list of DLLs from the Module window in Visual Studio 2015.  Attached as "Win10AU cmd CRASH.PNG".  All the DLLs look pretty reasonable to me.

Indeed, unless it's crashing trying to load one. But I don't know enough about it to tell you how to tell. Troubleshooting DLL loading is tricky. =(
 
Since Ruby runs in Git Bash, I ran it in Git Bash:

wayne@WORK MINGW64 /c/Ruby/Ruby225p319/bin
$ ./ruby -e "gets"

I started a new Visual Studio 2015, attached the debugger to ruby.exe, and got the DLL list, attached as "Win10AU git bash WORKS 1 of 2".PNG (and 2 of 2 as the whole list wouldn't fit on the screen)

Can you try running it in PowerShell? I can't imagine that working but I can't imagine what's broken either.

Sorry I'm not much more help.

Justin

suren

unread,
Oct 14, 2016, 4:03:49 AM10/14/16
to RubyInstaller, azol...@gmail.com
Hi Justin,

I am using Ruby 2.3.1-x64 on Windows 10 pro and I am facing the same issue that Wayne Vucenic  mentioned about on 24 sep

C:\Users\E002858\WorkPlace\DevKit>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
updated PATH env variable
-------------------------------
C:\Users\E002858\Downloads\DevKit\bin;C:\Users\E002858\Downloads\DevKit\mingw\bin;C:\Users\E002858\WorkPlace\DevKit\bin;C:\Users\E002858\WorkPlace\DevKit\mingw\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Ruby23-x64\bin
-------------------------------
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20161014-12168-1vbk6l3.rb extconf.rb
creating Makefile

current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR=" clean

current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/json-2.0.2/ext/json/ext/generator
make "DESTDIR="

make failed, uncaught signal 11

Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/json-2.0.2 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/json-2.0.2/gem_make.out



RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.7
  - RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x64-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby23-x64/lib/ruby/gems/2.3.0
  - USER INSTALLATION DIRECTORY: C:/Users/E002858/.gem/ruby/2.3.0
  - RUBY EXECUTABLE: C:/Ruby23-x64/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby23-x64/bin
  - SPEC CACHE DIRECTORY: C:/Users/E002858/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  - RUBYGEMS PLATFORMS:
    - ruby
    - x64-mingw32
  - GEM PATHS:
     - C:/Ruby23-x64/lib/ruby/gems/2.3.0
     - C:/Users/E002858/.gem/ruby/2.3.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
  - SHELL PATH:
     - C:\Users\E002858\WorkPlace\DevKit\bin
     - C:\Users\E002858\WorkPlace\DevKit\mingw\bin
     - C:\ProgramData\Oracle\Java\javapath
     - C:\Program Files (x86)\Intel\iCLS Client\
     - C:\Program Files\Intel\iCLS Client\
     - C:\Windows\system32
     - C:\Windows
     - C:\Windows\System32\Wbem
     - C:\Windows\System32\WindowsPowerShell\v1.0\
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
     - C:\Ruby23-x64\bin

Thanks,
suren

Mark Duivesteijn

unread,
Jun 2, 2017, 11:29:18 AM6/2/17
to RubyInstaller
I had exactly the same issue, and x64 seems to work somewhat but not with the rest of my TA suite.
At some point my ex collegue gave me the tip to uninstall ansicon and that seemed to do the trick. (cmd -> cd <pathtoansiconfolder>\x64(or86)\ansicon -u
When I uninstalled ansicon, ruby did not crash anymore. I hope this info helps.


Op zaterdag 24 september 2016 00:09:48 UTC+2 schreef Wayne Vucenic:

Wayne Vucenic

unread,
Jun 19, 2017, 7:36:04 PM6/19/17
to rubyin...@googlegroups.com, mark...@gmail.com
Hi Mark,

Thank you for the information.  I tried your suggestion of uninstalling ansicon, but unfortunately that didn't make any difference:

>cd <directory where ansicon.exe is installed>

>ansicon -u

>ruby -v

Inline image 2


This is exactly the same error dialog I get whenever I do "ruby -v".


Reply all
Reply to author
Forward
0 new messages