After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608959 - GstResolveType throws "The path is not of a legal form."
GstResolveType throws "The path is not of a legal form."
Status: RESOLVED DUPLICATE of bug 604810
Product: GStreamer
Classification: Platform
Component: gst-sharp
unspecified
Other Windows
: Normal normal
: 0.9.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-04 07:26 UTC by Stefan Meyer
Modified: 2010-02-04 19:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Meyer 2010-02-04 07:26:59 UTC
I have run into a problem using gstreamer sharp bindings whcih relates to the code in Application.cs as follows: 

private static System.Type GstResolveType (Gst.GLib.GType gtype, string gtype_name) {
      Assembly[] assemblies = (Assembly[]) AppDomain.CurrentDomain.GetAssemblies ().Clone ();

......
......
......

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

During the process of iteration to load asssemblies some of the entries at the end (with weird "dynamic" names like w2fzia3w.dll) has the asm.Location set to an empty string. This causes GetDirectoryName to throw the "The path is not a legal form" exception causing (in my case) Parse.Launch(..) of any valid trivial description to fail.
I have found that the list off assmblies depends on the application and the bug is therefore dificult to reproduce (i.e. the same code executed perfectly in another application).
My solution was to simply check for empty string as follows:

      foreach (Assembly asm in assemblies) {
          foreach (AssemblyName ref_name in asm.GetReferencedAssemblies())
          {
              if (asm.Location != "")
              {
                  string asm_dir = Path.GetDirectoryName(asm.Location);
                  try
                  {

Hope this helps somebody else to save a day of debugging !
Comment 1 Sebastian Dröge (slomo) 2010-02-04 19:52:18 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.

*** This bug has been marked as a duplicate of bug 604810 ***