[gstreamer-bugs] [Bug 608959] New: GstResolveType throws "The path is not of a legal form."

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Feb 3 23:27:05 PST 2010


https://bugzilla.gnome.org/show_bug.cgi?id=608959
  GStreamer | gst-sharp | unspecified

           Summary: GstResolveType throws "The path is not of a legal
                    form."
    Classification: Desktop
           Product: GStreamer
           Version: unspecified
        OS/Version: Windows
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-sharp
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: reyems at telkomsa.net
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


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 !

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list