views:

717

answers:

1

I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. The application was running without errors until recently. After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005). The error happens when I make a call to produce an instance of another external application. Once this error has occurred it never goes away, occurring each time my application is opened. This error breaks the functionality of my program because it is reliant on the 2nd application it is calling.

I am not sure what starts this error to occurring but I do know that it is user specific and not the application. It appears to be something that occurs in the user's Windows profile. I can use a different user on the same machine or create a new profile for the user with the issue and the program will work without error for a while. Eventually (within a few weeks) the error will return and stay until I resolve it again. I am trying to debug the COM error to understand why this is happening but this is such strange behavior I'm not sure where to start. I've never seen an error that would wire itself into a profile and cause it to be persistent.

I don't have a lot of .NET experience but I have done a lot of VB 6 application programming. Please offer any suggestions you have. Your help is greatly appreciated.

Here is the CODE BLOCK where the error is occurring:

Public Class frmMain

Public btApp As BarTender.Application

Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try

btApp = New BarTender.Application

Catch COMex As Runtime.InteropServices.COMException

MessageBox.Show("Error " + COMex.ErrorCode.ToString() + ": " + COMex.Message)

End Try

I declare the variable at the top of my frmMain.vb form (the first form to load). I load the COM Object when the first form loads. I leave it active until the application closes because I make a lot of calls to it.

Thank You for your help.

+1  A: 

It sounds like the error is security related. It it magically happens on a new user after a certain period of time, I would look at your user policy definitions. Do passwords expire after a certain period of time? Do the new users have small temp directories that are filling up based on your application usage (therefore causing out of disk errors that are masked as COM exceptions)? What is this third party application? We're kind of short on details here. But those are some things to start looking at.

Nick
The application I am calling is Seagull Scientific's Bartender software. It is a label printing application. We use it for shipping labels. I do not believe it is a security issue. Your temp directory idea is worth pursuing. I suspect it is some process in Bartender which is causing this.
I forgot to add that even promoting the user to Local Administrator has no effect on this problem.