geysee / ossbuild

Automatically exported from code.google.com/p/ossbuild
Other
0 stars 0 forks source link

Exception in Assembly.Location for dynamic DLL's #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Function GstResolveType in class Gst.Application throws an exception while 
trying to access the Location property of dynamically generated assemblies.
This is a .Net issue but since that access is made outside a try-catch block, 
when it arises, the function "blows up".
This can be bypassed by just changing the order of 2 lines in the code of 
Application.cs around line 77:

from:

        foreach (AssemblyName ref_name in asm.GetReferencedAssemblies ()) {
          string asm_dir = Path.GetDirectoryName (asm.Location);
          try {
            Assembly ref_asm;

to:

        foreach (AssemblyName ref_name in asm.GetReferencedAssemblies ()) {
          try {
            string asm_dir = Path.GetDirectoryName (asm.Location);
            Assembly ref_asm;

This way the exception is caught inside the try-catch block and the loop can 
continue to process all the remaining valid DLL files.

File reference:
http://code.google.com/codesearch#cc98aI19-Hc/trunk/Main/GStreamer/Source/gstrea
mer-sharp/gstreamer-sharp/Application.cs

Original issue reported on code.google.com by Nonnu42 on 25 Jan 2012 at 4:36

GoogleCodeExporter commented 9 years ago
Be sure and file this upstream. We'll get the change eventually.

Original comment by david.g.hoyt on 11 Apr 2012 at 6:24