Bira
2008-Mar-01 02:19 UTC
[Ferret-talk] Possible bug when creating a Ferret::Search::Sort object?
I may have run across a bug in Ferret: if throws a segmentation fault
when I try to create a Sort object using the default fields (SCORE and
DOC_ID), but setting reverse to true.
Here''s the minimal example:
#!/usr/bin/env ruby
require ''rubygems''
require ''ferret''
Ferret::Search::Sort.new
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE,
Ferret::Search::SortField::DOC_ID
],
false
)
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE_REV,
Ferret::Search::SortField::DOC_ID_REV
],
false
)
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE,
Ferret::Search::SortField::DOC_ID
],
true
)
You should get something like this when creating the last object:
$ruby sort.rb
sort.rb:23: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [x86_64-linux]
Aborted
Again, this is with Ferret 0.11.6 in Linux.
Is this a known problem that''s being worked on, or should I report it
at the Trac tool on ferret.davebalmain.com?
--
Bira
http://compexplicita.wordpress.com
http://compexplicita.tumblr.com
Jens Kraemer
2008-Mar-02 17:10 UTC
[Ferret-talk] Possible bug when creating a Ferret::Search::Sort object?
Hi, this works fine for me with 0.11.6 with stock Ubuntu and Debian Ruby versions: ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] (Ubuntu 7.10) ruby 1.8.5 (2006-08-25) [x86_64-linux] (Debian 4.0 (stable)) irb(main):001:0> require ''ferret'' => true irb(main):002:0> Ferret::Search::Sort.new( irb(main):003:1* [ irb(main):004:2* Ferret::Search::SortField::SCORE, irb(main):005:2* Ferret::Search::SortField::DOC_ID irb(main):006:2> ], irb(main):007:1* true irb(main):008:1> ) => Sort[<SCORE>!, <DOC>!] irb(main):009:0> Ferret::VERSION => "0.11.6" Cheers, Jens On Fri, Feb 29, 2008 at 11:19:30PM -0300, Bira wrote:> I may have run across a bug in Ferret: if throws a segmentation fault > when I try to create a Sort object using the default fields (SCORE and > DOC_ID), but setting reverse to true. > > Here''s the minimal example: > > #!/usr/bin/env ruby > require ''rubygems'' > require ''ferret'' > > Ferret::Search::Sort.new > > Ferret::Search::Sort.new( > [ > Ferret::Search::SortField::SCORE, > Ferret::Search::SortField::DOC_ID > ], > false > ) > > Ferret::Search::Sort.new( > [ > Ferret::Search::SortField::SCORE_REV, > Ferret::Search::SortField::DOC_ID_REV > ], > false > ) > > Ferret::Search::Sort.new( > [ > Ferret::Search::SortField::SCORE, > Ferret::Search::SortField::DOC_ID > ], > true > ) > > You should get something like this when creating the last object: > > $ruby sort.rb > sort.rb:23: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [x86_64-linux] > > Aborted > > > Again, this is with Ferret 0.11.6 in Linux. > > Is this a known problem that''s being worked on, or should I report it > at the Trac tool on ferret.davebalmain.com? > > -- > Bira > http://compexplicita.wordpress.com > http://compexplicita.tumblr.com > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold
Benjamin Arai
2008-Mar-02 18:25 UTC
[Ferret-talk] Possible bug when creating a Ferret::Search::Sort object?
Works fine for me as well using CentOS 5 and OSX Leopard. Benjamin Jens Kraemer wrote:> Hi, > > this works fine for me with 0.11.6 with stock Ubuntu and Debian Ruby > versions: > > ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] (Ubuntu 7.10) > ruby 1.8.5 (2006-08-25) [x86_64-linux] (Debian 4.0 (stable)) > > > irb(main):001:0> require ''ferret'' > => true > irb(main):002:0> Ferret::Search::Sort.new( > irb(main):003:1* [ > irb(main):004:2* Ferret::Search::SortField::SCORE, > irb(main):005:2* Ferret::Search::SortField::DOC_ID > irb(main):006:2> ], > irb(main):007:1* true > irb(main):008:1> ) > => Sort[<SCORE>!, <DOC>!] > irb(main):009:0> Ferret::VERSION > => "0.11.6" > > > Cheers, > Jens > > On Fri, Feb 29, 2008 at 11:19:30PM -0300, Bira wrote: > >> I may have run across a bug in Ferret: if throws a segmentation fault >> when I try to create a Sort object using the default fields (SCORE and >> DOC_ID), but setting reverse to true. >> >> Here''s the minimal example: >> >> #!/usr/bin/env ruby >> require ''rubygems'' >> require ''ferret'' >> >> Ferret::Search::Sort.new >> >> Ferret::Search::Sort.new( >> [ >> Ferret::Search::SortField::SCORE, >> Ferret::Search::SortField::DOC_ID >> ], >> false >> ) >> >> Ferret::Search::Sort.new( >> [ >> Ferret::Search::SortField::SCORE_REV, >> Ferret::Search::SortField::DOC_ID_REV >> ], >> false >> ) >> >> Ferret::Search::Sort.new( >> [ >> Ferret::Search::SortField::SCORE, >> Ferret::Search::SortField::DOC_ID >> ], >> true >> ) >> >> You should get something like this when creating the last object: >> >> $ruby sort.rb >> sort.rb:23: [BUG] Segmentation fault >> ruby 1.8.6 (2007-09-24) [x86_64-linux] >> >> Aborted >> >> >> Again, this is with Ferret 0.11.6 in Linux. >> >> Is this a known problem that''s being worked on, or should I report it >> at the Trac tool on ferret.davebalmain.com? >> >> -- >> Bira >> http://compexplicita.wordpress.com >> http://compexplicita.tumblr.com >> _______________________________________________ >> Ferret-talk mailing list >> Ferret-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ferret-talk >> >> > >
Bira
2008-Mar-03 10:52 UTC
[Ferret-talk] Possible bug when creating a Ferret::Search::Sort object?
On Sun, Mar 2, 2008 at 2:10 PM, Jens Kraemer <kraemer at webit.de> wrote:> Hi, > > this works fine for me with 0.11.6 with stock Ubuntu and Debian Ruby > versions: > > ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] (Ubuntu 7.10) > ruby 1.8.5 (2006-08-25) [x86_64-linux] (Debian 4.0 (stable))I''m using Ferret 0.11.6 on Gentoo Linux: ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux] So maybe this is a Ruby 1.8.6-p111 bug? -- Bira http://compexplicita.wordpress.com http://compexplicita.tumblr.com