Issue #23 new

Segfault -- Ruby 1.9.3p327 -- Windows - Simple test case

Dan Sandberg
created an issue

I've got a segfault happening from calling a python function in another file.

Ruby version and Python version below. I'm running 32-bit Python and Ruby on an x64 machine under Windows 7.

Stack trace attached, see below for everything else.

-- fail.rb: Ruby source code ---

require "rubypython"

RubyPython.start
fail2 = RubyPython.import( "fail2" )

print "starting\n"
while true
  fail2.do_nothing
end

--- fail2.py: Python source code (in same directory as fail.rb)

def do_nothing():
    pass

--- ruby version ---

$ ruby -v ruby 1.9.3p327 (2012-11-10) [i386-mingw32]

--- python version ---

$ python -V Python 2.7.3

Comments (4)

  1. raineszm repo owner

    (Reply via rain...@gmail.com):

    Are you aware of how long the loop runs before seg faulting? I've seen similar behavior after many iterations which I believe is related to memory management conflicts between python and ruby. Unfortunately, I'm not actually a software engineer and I think the fix may be beyond my ability.

  2. Dan Sandberg reporter

    Strangely, it seems to consistently barf on the 205th iteration. I added the following code in front of the fail2.do_nothing:

    File.open( "count.txt", "w" ) do |file| file.print( "#{count}\n" ) end

    I think creating RubyPython qualifies you as a software engineer ;-)

  3. Log in to comment