Terminus-Project / Terminus-Bot

A scriptable IRC bot written in Ruby.
http://terminus-bot.net/
Other
38 stars 18 forks source link

Bot spews errors with every message to a channel #90

Closed dakotawhitevalley closed 8 years ago

dakotawhitevalley commented 8 years ago

Using Ruby 2.0 and all required gems, the bot does launch and connect properly, but the output in var/terminus-bot.log constantly spams: E, [2016-01-25T11:29:10.840843 #571] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed with every message received in a channel.

kabaka commented 8 years ago

@Caerdwyn please switch the log level to DEBUG and provide the backtrace for that error.

dakotawhitevalley commented 8 years ago

PRIVMSG Debug Log: https://gist.github.com/Caerdwyn/688a952b1ada65205573 Also errors out on a ;part command: https://gist.github.com/Caerdwyn/aefdee0b2d0730ec1ba6

kabaka commented 8 years ago

@Caerdwyn can you provide the logs inline/embedded? Those links are dead.

dakotawhitevalley commented 8 years ago
E, [2016-03-18T08:23:51.637064 #5545] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed
E, [2016-03-18T08:23:52.637647 #5545] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed
E, [2016-03-18T08:23:53.355001 #5545] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed

I sent 3 messages to a channel, 1 second apart. Each message caused the error above to appear in /var/terminus-bot.log.

Repeated the same thing again, but with DEBUG logging set in the configuration...

E, [2016-03-18T08:30:01.256105 #19395] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed
D, [2016-03-18T08:30:01.256207 #19395] DEBUG -- events.run: Backtrace for PRIVMSG: ["modules/buffer.rb:74:in `>'", "modules/buffer.rb:74:in `record_message'", "lib/events.rb:142:in `dispatch'", "lib/events.rb:67:in `block in dispatch'", "lib/events.rb:61:in `each'", "lib/events.rb:61:in `dispatch'", "lib/ircconnection.rb:233:in `receive_line'", "lib/ircconnection.rb:209:in `block in receive_data'", "lib/ircconnection.rb:205:in `each'", "lib/ircconnection.rb:205:in `receive_data'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:274:in `block in fork_reactor'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork_reactor'", "./terminus-bot:174:in `<main>'"]
D, [2016-03-18T08:30:01.256410 #19395] DEBUG -- chanlog.log_msg: ponychat #TEST PRIVMSG Cae hi
D, [2016-03-18T08:30:01.829273 #19395] DEBUG -- events.dispatch: :PRIVMSG
E, [2016-03-18T08:30:01.830293 #19395] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed
D, [2016-03-18T08:30:01.830405 #19395] DEBUG -- events.run: Backtrace for PRIVMSG: ["modules/buffer.rb:74:in `>'", "modules/buffer.rb:74:in `record_message'", "lib/events.rb:142:in `dispatch'", "lib/events.rb:67:in `block in dispatch'", "lib/events.rb:61:in `each'", "lib/events.rb:61:in `dispatch'", "lib/ircconnection.rb:233:in `receive_line'", "lib/ircconnection.rb:209:in `block in receive_data'", "lib/ircconnection.rb:205:in `each'", "lib/ircconnection.rb:205:in `receive_data'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:274:in `block in fork_reactor'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork_reactor'", "./terminus-bot:174:in `<main>'"]
D, [2016-03-18T08:30:01.830565 #19395] DEBUG -- chanlog.log_msg: ponychat #TEST PRIVMSG Cae hi
D, [2016-03-18T08:30:03.133298 #19395] DEBUG -- events.dispatch: :PRIVMSG
E, [2016-03-18T08:30:03.134524 #19395] ERROR -- events.run: Error running event PRIVMSG: comparison of Fixnum with nil failed
D, [2016-03-18T08:30:03.134627 #19395] DEBUG -- events.run: Backtrace for PRIVMSG: ["modules/buffer.rb:74:in `>'", "modules/buffer.rb:74:in `record_message'", "lib/events.rb:142:in `dispatch'", "lib/events.rb:67:in `block in dispatch'", "lib/events.rb:61:in `each'", "lib/events.rb:61:in `dispatch'", "lib/ircconnection.rb:233:in `receive_line'", "lib/ircconnection.rb:209:in `block in receive_data'", "lib/ircconnection.rb:205:in `each'", "lib/ircconnection.rb:205:in `receive_data'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:274:in `block in fork_reactor'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork'", "/home/edward/.rvm/gems/ruby-2.0.0-p643/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:268:in `fork_reactor'", "./terminus-bot:174:in `<main>'"]
D, [2016-03-18T08:30:03.134771 #19395] DEBUG -- chanlog.log_msg: ponychat #TEST PRIVMSG Cae test
kabaka commented 8 years ago

What is your max_size setting for the buffers section?

dakotawhitevalley commented 8 years ago

It seems that leaving max_size commented out in https://github.com/Terminus-Project/Terminus-Bot/blob/master/terminus-bot.conf.dist#L286 was my issue.

Not quite sure why that would be commented out by default if some of the scripts in the bot need it in order to function properly...?

kabaka commented 8 years ago

So it was commented out (not blank or anything) and now works when it is present? Your'e correct that it should work fine if commented out.

dakotawhitevalley commented 8 years ago

It was left alone, commented out, the same way it appears in the .conf.dist file. After uncommenting it, it began working normally, no more errors in the log.