Exception after stand alone application was closed

1067
10
03-18-2012 08:13 AM
MarkMindlin
Occasional Contributor III
We've created simple stand alone windows application, that have only one code string:

Geoprocessor pGeoP = new Geoprocessor();

After application was closed we get exception message (see the attachment)

All answer will be appreciated.
0 Kudos
10 Replies
AlexanderGray
Occasional Contributor III
Have you tried releasing the object explicitly either with ComReleaser or MarshalComRelease?
0 Kudos
MarkMindlin
Occasional Contributor III
ComReleaser did not help.

Do you mean Marshal.ReleaseComObject(pGeoP)?
If so, this gets exception "The object's type must be  __ComObject ..."

I should stress that we use ArcInfo 10 SP2. But in 9.3.1 it was working.
0 Kudos
MarkMindlin
Occasional Contributor III
One more thing - we use .Net Framework 3.5.
0 Kudos
AlexanderGray
Occasional Contributor III
Sorry, I got confused with GeoprocessorClass which is a com class, Geoprocessor is a .net class.  The first is part of ESRI.ArcGIS.Geoprocessing, the latter is part of ESRI.ArcGIS.Geoprocessor.  Running SP3 with framework 3.5,  I didn't get an error just creating an instance of the class and letting it go out of scope...  I haven't used the Geoprocessor class since 9.2.  Could be a bug at 10 SP2.  I always use the GeoprocessorClass, the example seem written for this class (I believe it was new to 9.3.)
0 Kudos
GeorgeFaraj
Occasional Contributor III
We've created simple stand alone windows application, that have only one code string:

Geoprocessor pGeoP = new Geoprocessor();

After application was closed we get exception message (see the attachment)

All answer will be appreciated.


Are you doing license initialization? I have that line of code in an ArcEngine program running under version 10, service pack 3 without incident but I have an actual ArcEngine program that binds the license and ensures the runtime is available.
0 Kudos
MarkMindlin
Occasional Contributor III
Yes, there is no doubt, that we use standart wizard to add License checking to the VS project.
In addition (as a support recommends) we added - RuntimeManager.Bind(product code); - as a first line in method Main(). In this case - we do our best. (?)
0 Kudos
AlexanderGray
Occasional Contributor III
Lack of binding or license checkout would give you a different error.  Do you have old versions of python hanging around?  I had some problems with that and using the geoprocessing tools in the desktop interface.
0 Kudos
GeorgeFaraj
Occasional Contributor III
Yes, there is no doubt, that we use standart wizard to add License checking to the VS project.
In addition (as a support recommends) we added - RuntimeManager.Bind(product code); - as a first line in method Main(). In this case - we do our best. (?)


Well, that is clearly more than one code string. Have you tried the application on a machine with a clean install?  Have you tried moving to service pack 3?
0 Kudos
MarkMindlin
Occasional Contributor III
What do you mean "clean install"? How can I do "clean install" on the users' desktop? It is not about 1-2 users 🙂

No, SP3 will be for our office only by summer.
0 Kudos