Forums: users (Thread #8381)

異常終了の報告 (2005-08-11 17:36 by jgoamakf #15736)

データベースのupdateを実行するとエラーを表示して終了してしまいます。

OSはNetBSD 2.0.2、rubyは

ruby 1.8.2 (2004-12-25) [i386-netbsdelf]

bsfilter は

bsfilter release 1.0.9 revision 1.73

エラーメッセージは

% bsfilter -u
/usr/pkg/bin/bsfilter:256:in `min': comparison of Fixnum with Float failed (ArgumentError)
from /usr/pkg/bin/bsfilter:1686:in `each'
from /usr/pkg/bin/bsfilter:1686:in `min'
from /usr/pkg/bin/bsfilter:1686:in `update_probability'
from /usr/pkg/bin/bsfilter:1684:in `each'
from /usr/pkg/bin/bsfilter:1684:in `update_probability'
from /usr/pkg/bin/bsfilter:3246:in `run'
from /usr/pkg/bin/bsfilter:3243:in `each'
from /usr/pkg/bin/bsfilter:3243:in `run'
from /usr/pkg/bin/bsfilter:3310

です。

Reply to #15736×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 異常終了の報告 (2005-08-11 23:40 by nabeken #15757)

FixnumとFloatの比較が出来ないのは、Ruby処理系の動作として納得できません。
line 1686あたりのminは、整数についての比較のはずで、Floatが入っていることも解せないのですが、これはscriptのバグかもしれません。

以下の作業をお願いします。
1.
export-spam, export-cleanオプションで、それぞれのデータをtextでdump。最後のカラムが正の整数であることを確認。そうでなかったら適当に修正

2.
~/.bsfilter/*dbm*を別ディレクトリに移動してバックアップ

3.
データベースファイルがないところから、import-spam, import-cleanで、1のダンプ結果を読み込んでデータベースを生成

4.
bsfilter -u
Reply to #15736

Reply to #15757×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 異常終了の報告 (2005-08-12 18:22 by jgoamakf #15770)

ありがとうございます。

結論ですが、Ruby 自体を --disable-pthread をつけて configure、インストールからやり直したらエラーが発生しなくなりました。

そもそも何が問題なのかよく分からないのでもう少し調べたいですが、とにかく bsfilter は使用できるようになりましたので、報告します。
Reply to #15736

Reply to #15770×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login