There exists a possibility of an object being prematurely reclaimed by the garbage collector when there are no references to the object in .Net managed code or data, but the object is still in use in unmanaged code. This would trigger an unintentional object release possibly resulting in a crash. However this situation can be mitigated by the use of the garbage collector’s KeepAlive method. The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector. See PISDK help topic “Using the PI-SDK with Microsoft .Net” for further details. Not sure if this would address your issue, but it is definitely worth a try.
Also, have you tried adding [STAThread] attribute to you main module? (PISDK help topic “Using the PI-SDK with Microsoft .Net” has an example of using STAThread attribute)
Unfortunately the KeepAlive method didn't seem to fix the problem. We decided we would switch over the the AFSDK and so far the application has been stable for the past few hours. Instead of writing to the collective we are writing to the primary and manually copying the archive to the secondary. We didn't try the [STAThread] attribute so I can't say if this would have been a solution to our problem. Thank you for the suggestion Isaak.