cruisecontrol.netpollingcctray

CCTray v1.6 Continuously Disconnects and Reconnects to v1.4.4 Server When Polling


Background: I am investigating CCNet backwards compatibility with versions 1.4.4.75 and 1.6.7981.1: an older server with a newer version of CCTray, and a newer server with an older version of CCTray.

I have installed CCNet 1.4.4.75 and am running it locally on my machine. I placed one project on this local server, and can view it on CCTray 1.4.4.75 as I expected.

I then installed CCTray 1.6.7981.1 and tried having it list this project by adding the server (ticking "Connect to pre-1.5.0 server" when doing so). The project is listed, and is successfully added to the main CCTray screen, but it seems every time CCTray polls the server, it disconnects and reconnects to it, resulting in a very visible grey CCTray icon for the few seconds during the reconnection process.

I don't have this problem with the 1.4.4.75 version of CCTray, so I was wondering what could be causing this behaviour in the 1.6 version? Short of upgrading my CCNet server to 1.6, how do I solve this issue?

Any help is much appreciated.

~Sam.


Solution

  • The problem is in CruiseControl.NET-1.6.7981.1: $\project\Remote\QueueSetSnapshot.cs(59) and $\project\Remote\QueueSnapshot.cs(71).

    [OnDeserialized] DataReceived(StreamingContext context) is commented out, therefore no information about server queues is available if server is pre-1.5.0.

    Null pointer exception occurs later in: CruiseServerSnapshot.IsQueueSetSnapshotChanged() $\project\Remote\CruiseServerSnapshot.cs, line 73

    I have downloaded the source code, uncommented DataReceived(...) methods, compiled and CCTray seems to be working fine.