I have an ArcGIS Engine 10.1 app. It has been running fine. It opens an .mxd on initialization. The .mxd contains 3 feature classes that have class extensions applied.

I just tried to make a change to the app for the first time in years and now I cannot get the app to load the .mxd.

The .mxd can be opened in ArcMap without a problem so I know the class extensions are installed fine on the machine. But when the ArcGIS Engine app loads it crashes without error or warning as soon as it loads the .mxd.


If I remove the map layers from the .mxd that have the class extensions then it opens fine.

If I add the class extension library as a project reference and also have the class extension project open in visual studio I can step through the class extension code. What I see is the New sub being called and the module level variable being set, Once it gets to the end of the sub the ArcEngine app crashes, it doesn't call the New Sub on the next feature class in the map service.

Public Sub New()
End Sub  'Crash after this line

I've just noticed an error being recorded in the output window aftwer the crash. When the app crashes after loading the first class extension the error

Unlicensed ARC session - terminating!

Is recorded in the Output window. The ArcEngine app successfully binds to a runtime and I successfully initialize a license with AoInitialize so not why this error is being thrown.

  • What happens if you try to open the featureclass that has the class extension via IFeatureWorkspace.OpenFeatureclass? – Kirk Kuykendall Sep 30 '15 at 19:52
  • Same behavior occurs. The app crashes with no warnings – Dowlers Sep 30 '15 at 20:31
  • What happens if you add a reference to the class extension's dll in Visual Studio, and run code that creates a new instance of the class? – Kirk Kuykendall Sep 30 '15 at 21:01
  • @KirkKuykendall I've added the answer to your question to the original post. – Dowlers Oct 1 '15 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.