# Segmentation fault with turing gem on 64bit gentoo

**URL:** <https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398>\
**Category:** Ruby\
**Created:** [September 28, 2006, 10:04pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398 "2006-09-28T22:04:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike343](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike343](https://www.ruby-forum.com/u/mike343)\
**Post date:** [September 28, 2006, 10:04pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398/1 "2006-09-28T22:04:54Z")

</div>

I’m sorry if this is not the appropriate place to post this:

I am running 64bit gentoo with the truetype use flag used to build gd,  
with the turing and gd2 gems installed on kernel  
2.6.18, with ruby 1.8.4-r3.  
When attempting to use turing from irb the following happens:

Output is posted below:

eric@mongrel2 /usr/lib/ruby/gems/1.8/gems/turing-0.0.9/lib $ irb  
irb(main):001:0\> require ‘turing’  
=\> true  
irb(main):002:0\> tc = Turing::Challenge.new  
=\> #\<Turing::Challenge:0x2b72842a9fd8 @store=#\<PStore:0x2b72842a9588  
@filename="/tmp/turing-challenges.pstore", @transaction=false,  
@abort=false\>, @ti=#\<Turing::Image:0x2b72842a93d0  
@options={:lifetime=\>600, :width=\>280,  
:store=\>"/tmp/turing-challenges.pstore", :height=\>115,  
:fontdir=\>"./turing/…/ …  
\<…snip…\>

irb(main):003:0\> c = tc.generate\_challenge  
/usr/lib64/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/font.rb:234: [BUG]  
Segmentation fault  
ruby 1.8.4 (2005-12-24) [x86\_64-linux]

Thanks,  
Michael

---

<div class="post-metadata">

**Author:** ![mike343](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike343](https://www.ruby-forum.com/u/mike343)\
**Post date:** [November 12, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398/2 "2007-11-12T15:40:05Z")

</div>

Michael Moody wrote:

> irb(main):003:0\> c = tc.generate\_challenge  
> /usr/lib64/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/font.rb:234: [BUG]  
> Segmentation fault  
> ruby 1.8.4 (2005-12-24) [x86\_64-linux]

Was this issue ever resolved? I’m getting the same error 1 year later on  
my Arch 64 VPS.

/usr/lib/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/font.rb:234: [BUG]  
Segmentation fa  
ult  
ruby 1.8.6 (2007-09-24) [x86\_64-linux]

---

<div class="post-metadata">

**Author:** ![mike343](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike343](https://www.ruby-forum.com/u/mike343)\
**Post date:** [November 13, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398/3 "2007-11-13T16:09:03Z")

</div>

> I’ve had quite a few people ask over the last year(apparently, this gets  
> high results on google). Yes we did solved it (for a while, I didn’t  
> remember how). The solution was a patch. Although we originally patched  
> the software ourselves, someone else has also done so.
> 
> [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/227097](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/227097)
> 
> Thanks,  
> Michael

The patch did the trick! Thanks so much for the quick response.

---

<div class="post-metadata">

**Author:** ![mike343](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike343](https://www.ruby-forum.com/u/mike343)\
**Post date:** [November 12, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398/4 "2007-11-12T16:37:38Z")

</div>

Dave Cornelius wrote:

> Was this issue ever resolved? I’m getting the same error 1 year later on  
> my Arch 64 VPS.
> 
> /usr/lib/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/font.rb:234: [BUG]  
> Segmentation fa  
> ult  
> ruby 1.8.6 (2007-09-24) [x86\_64-linux]

I’ve had quite a few people ask over the last year(apparently, this gets  
high results on google). Yes we did solved it (for a while, I didn’t  
remember how). The solution was a patch. Although we originally patched  
the software ourselves, someone else has also done so.

[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/227097](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/227097)

Thanks,  
Michael
