Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Weird Infragistics UltraWinGrid Layout Loading Issue (8.2.3.5)
posted

We’ve recently upgraded our Infragistics .Net UltraWinGrid references to 8.2.3.5 from 8.1.2 and have started to see some very weird behaviors in terms of layout loading.

 

Our grid is bound to an interface and we save our infragistics layouts as serialized XML as the user's local layout.

 

On app start up, the grid then deserialise the XML node into a stream and the layout is loaded from that stream (using UltraGridLayout.LoadFromXml(...).

 

And here is where we start to have trouble – infragistics 8.2.3.5 appears to be reflecting all referenced classes (even if it is not loaded at the time of layout loading), instead of only the classes used in the layout. The result is that if any class is broken, infragistics UltraWinGrid will throw an exception and fail to load the layout. This worked perfectly well with 8.1.2.

 

By “broken” I meant below (reasons we have already discovered, and there might be more - we use late binding for pretty much everything as we have a customised environment which requires run time assebmly resolving)

-          the assembly cannot be loaded,

-          the class is not implementing an interface properly
this happens quite a lot in our late binding model: e.g. class
C implement interface I, interface I got updated to include a new method M but C hasn’t been upgraded. This works well with late binding as long as M is not called (which I’d consider to be reasonable) but infragistics here won’t be happy with that.

 

Since pretty much everything in our .net world is late binding this can be quite dangerous in terms of future maintenance.

 

I’m just wondering if anyone else had seen similar problems? 8.1.2, on the othe rhand is not having this issue. Has something changed in between?

Thanks for your help!

  • 275
    posted

    Attaching stack trace:

    (The LoaderExecption complains about either not being able to find an assembly or a method is missing implementation - what puzzles me is why Infragistics would try to bind to that assembly given that the saved layout has no reference to it)

    Exception='System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
       at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
       at System.Reflection.Assembly.GetTypes()
       at Infragistics.Shared.Serialization.Binder.FindType(Assembly assembly, String assemblyName, String typeName)
       at Infragistics.Shared.Serialization.Binder.BindToTypeImpl(String assemblyName, String typeName)
       at Infragistics.Shared.Serialization.Binder.BindToType(String assemblyName, String typeName)
       at Infragistics.Win.Serialization.Binder.BindToType(String assemblyName, String typeName)
       at Infragistics.Win.UltraWinGrid.Serialization.Binder.BindToType(String assemblyName, String typeName)
       at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Bind(String assemblyString, String typeString)
       at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessGetType(String value, String xmlKey, String& assemblyString)
       at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessType(ParseRecord pr, ParseRecord objectPr)
       at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessAttributes(ParseRecord pr, ParseRecord objectPr)
       at System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()
       at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
       at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
       at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
       at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
       at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream)
       at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadHelper(Stream stream, PropertyCategories propertyCategories, IFormatter formatter)
       at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories)