Intermittent Assembly Load Errors

Posted by oedev on 25-Apr-2014 03:05

Good Morning.

Having just deployed an application which references a number of assemblies, I am getting a intermittent error being displayed by one of the screens in our application;

System.IO.FileNotFoundException: Could not load file or assembly 'Accusoft.Forms1, Version=1.0.2.30, Culture=neutral, PublicKeyToken=0da0e9e920b5aefa' or one of its dependencies. The system cannot find the file specified.

All the assemblies are on a local drive (c:) and referenced via the -assemblies parameter.

The odd thing is we can go hours without any error, using the screen which references this assembly, and suddenly we start getting this message. Closing the application down and re-opening resolves.

Is this a coding issue, or is it something else ? 

On 10.2B.

 Thanks.

All Replies

Posted by Garry Hall on 25-Apr-2014 07:33

If this assembly is in the assemblies.xml file, it should have been loaded when the CLR is loaded. From memory, I believe assemblies should stay in the AppDomain until the AppDomain is closed. In other words, once you load the assembly into the AVM, it should stay there, and should not need to be reloaded. At least, I believe that used to be the rules back when I was actively working on this code, maybe .NET 4.0 changed the rules.
 
If it is not in the assemblies.xml file, the AVM will load it when there is a reference to it, but should load it only once. The only way I could explain this behaviour is if the assembly in question is not actually being referenced directly by this screen that has been running for “hours”, but is referenced by something called by that screen only occasionally.
 
The only way I know to get insight into the loading of .NET assemblies is through fuslogvw. You might want to look at fuslogvw when starting the AVM (when the CLR is loaded), and when you first run the screen. If you see the assembly loaded when the AVM loads the CLR, then I would say log a call with Tech Support, and try for some sort of reproducible case.
 
[collapse]
From: oedev [mailto:bounce-oedev@community.progress.com]
Sent: Friday, April 25, 2014 4:06 AM
To: TU.OE.Development@community.progress.com
Subject: Intermittent Assembly Load Errors
 
Thread created by oedev

Good Morning.

Having just deployed an application which references a number of assemblies, I am getting a intermittent error being displayed by one of the screens in our application;

System.IO.FileNotFoundException: Could not load file or assembly 'Accusoft.Forms1, Version=1.0.2.30, Culture=neutral, PublicKeyToken=0da0e9e920b5aefa' or one of its dependencies. The system cannot find the file specified.

All the assemblies are on a local drive (c:) and referenced via the -assemblies parameter.

The odd thing is we can go hours any error, using the screen which references this assembly, and suddenly we startgetting this message. Closing the application down and re-opening resolves.

Is this a coding issue, or is it something else ? 

On 10.2B.

 Thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by oedev on 25-Apr-2014 10:42

Thanks Garry.

The assembly is referenced in the assemblies.xml file.

I'll try the utility you mention and see what that throws up.

This thread is closed