From: Daniel Berger Date: 2009-06-13T10:16:53+09:00 Subject: Re: win32-service Segmentation fault > -----Original Message----- > From: sdsurfgeek@gmail.com [mailto:sdsurfgeek@gmail.com] > Sent: Friday, June 12, 2009 5:59 PM > To: ruby-talk ML > Subject: win32-service Segmentation fault > > > Having an issue with win32-service, it works on most 2003 servers I've > tried, but on several, it segfaults. > > Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack > 2, I have other servers of the same level and they work fine. > > > require 'rubygems' > require 'win32/service' > require 'win32ole' > > include Win32 > > host = 'mps-bes1' > > Service.services( host, "" ){ |s| > puts s.display_name > puts "" > } > > c:\>ruby check_services_test.rb > Application Experience Lookup Service > > Alerter > > Application Layer Gateway Service > > Application Management > > ASP.NET State Service > > RAS Asynchronous Media Driver > > Audio Stub Driver > > BlackBerry Attachment Service > > Background Intelligent Transfer Service > > BlackBerry Controller > > BlackBerry Database Consistency Service > > BlackBerry Dispatcher > > c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32- > 60/lib/win32/serv > ice.rb:1100: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i386-mswin32] > > > This application has requested the Runtime to terminate it in an > unusual > way. > Please contact the application's support team for more information. That's odd. Line 1100 is actually pure Ruby code: binary_path = binary_path.unpack('Z*')[0] I wonder if you've found a bug. A few questions. What version of Ruby are you running? One click or hand built? What version of win32-service? Does it always segfault at the same place? If it does segfault at the same place, can you open up your services explorer window and see what the next one on the list is? Control Panel -> Administrative Tools -> Services Or, if you could step through the debugger, I'd love to see what the 'binary_path' variable is set to when it dies. Regards, Dan