Bug #426

avatar

Connection crashes when connecting to a BIP server

Added by Mirco Bauer 5260 days ago. Updated 5048 days ago.

Status:Closed Start:07/31/2010
Priority:High Due date:
Assigned to:avatarMirco Bauer % Done:

100%

Category:Engine IRC
Target version:0.8
Complexity:

Medium

Found in Version:

Votes: 0

Description

When Smuxi connects to a BIP server (an IRC bouncer) the connection crashes with the following exception:
2010-07-28 11:58:04,615 [IrcProtocolManager (balthasar:4912) listener] ERROR Smuxi.Engine.IrcProtocolManager - _Run(): exception in _Listen() occurred!
System.ArgumentNullException: Argument cannot be null.
Parameter name: nickname
  at Meebey.SmartIrc4net.IrcClient.GetIrcUser (System.String nickname) [0x00000]
  at Meebey.SmartIrc4net.IrcClient._Event_NICK (Meebey.SmartIrc4net.IrcMessageData ircdata) [0x00000]
  at Meebey.SmartIrc4net.IrcClient._HandleEvents (Meebey.SmartIrc4net.IrcMessageData ircdata) [0x00000]
  at Meebey.SmartIrc4net.IrcClient._Worker (System.Object sender, Meebey.SmartIrc4net.ReadLineEventArgs e) [0x00000]
  at (wrapper delegate-invoke) Meebey.SmartIrc4net.ReadLineEventHandler:invoke_void__this___object_ReadLineEventArgs (object,Meebey.SmartIrc4net.ReadLineEventArgs)
  at Meebey.SmartIrc4net.IrcConnection.ReadLine (Boolean blocking) [0x00000]
  at Meebey.SmartIrc4net.IrcConnection.Listen (Boolean blocking) [0x00000]
  at Meebey.SmartIrc4net.IrcConnection.Listen () [0x00000]
  at Smuxi.Engine.IrcProtocolManager._Listen () [0x00000]

History

Updated by Mirco Bauer 5260 days ago

avatar

I could track the issue down in the SmartIrc4net code that parses the IRC messsage:
http://git.qnetp.net/?p=smartirc4net.git;a=blob;f=src/IrcClient/IrcClient.cs;h=df79f68c6fd872dafe1adcb949c1094982814d5d;hb=HEAD#l832

The parser expects that an IRC message always contains nick, user and host at the same which might be not true according to the IRC "http://www.faqs.org/rfcs/rfc2812.html":RFC2812 which states:
prefix     =  servername / ( nickname [ [ "!" user ] "@" host ] )

This means the nick or nick + host or nick + user + host can be present.
BIP only sends the nick in this case which leads to the crash:
:jonp NICK jonp-smuxi

Updated by Mirco Bauer 5256 days ago

avatar
Another BIP specific issue popped up, but this time BIP is violating the IRC RFCs, example:
:b.i.p 353 jonp @ ##dblinq jonp

The IRC RFCs define the colon after the channel as mandatory.
SmartIrc4net needs a hack for this issue.

Updated by Mirco Bauer 5048 days ago

avatar
  • Status changed from New to Closed
  • Target version set to 0.8
  • % Done changed from 0 to 100
  • Complexity set to Medium

Fixed in SmartIrc4net 8dbef2fa9e15988872ac1db208f6b10b0eaa98a9:
http://git.qnetp.net/?p=smartirc4net.git;a=commit;h=8dbef2fa9e15988872ac1db208f6b10b0eaa98a9

Also available in: Atom PDF