Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get a exception #526

Closed
germsen opened this issue Aug 1, 2021 · 4 comments
Closed

I get a exception #526

germsen opened this issue Aug 1, 2021 · 4 comments

Comments

@germsen
Copy link

germsen commented Aug 1, 2021

Hi

I have a very large object contain several list of other objedcts etc when i try to serialize it then I get a exception. The class is to big to post here but the stack trace are :

   at ExtendedXmlSerializer.ReflectionModel.TypeCoercer.Get(TypeInfo parameter)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)
   at ExtendedXmlSerializer.ReflectionModel.SelectCoercer`2.Get(ImmutableArray`1 parameter)
   at ExtendedXmlSerializer.Core.Sources.CoercedResult`3.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.CoercedResult`3.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.CoercedResult`3.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.DecoratedSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.ReflectionModel.Extensions.Get[T](IParameterizedSource`2 this, TypeInfo[] parameters)
   at ExtendedXmlSerializer.ExtensionModel.Content.Members.AllowedMemberValuesExtension.Source.From(MemberDescriptor descriptor)
   at ExtendedXmlSerializer.ExtensionModel.Content.Members.AllowedMemberValuesExtension.Source.Get(MemberInfo parameter)
   at ExtendedXmlSerializer.Core.Sources.LinkedDecoratedSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.DecoratedSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.ContentModel.Members.WritableMemberAccessors.Create(IMember parameter)
   at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback)
   at ExtendedXmlSerializer.Core.Sources.ReferenceCacheBase`2.Get(TKey key)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.DecoratedSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Specifications.DelegatedAssignedSpecification`2.IsSatisfiedBy(TParameter parameter)
   at ExtendedXmlSerializer.Core.Specifications.AllSpecification`1.IsSatisfiedBy(T parameter)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)
   at ExtendedXmlSerializer.ContentModel.Members.TypeMembers.Create(TypeInfo parameter)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ExtendedXmlSerializer.Core.Sources.CacheBase`2.Get(TKey key)
   at ExtendedXmlSerializer.ContentModel.Members.MemberSerializations.Create(TypeInfo parameter)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ExtendedXmlSerializer.Core.Sources.CacheBase`2.Get(TKey key)
   at ExtendedXmlSerializer.ContentModel.Members.InstanceMemberSerialization..ctor(TypeInfo type, IMemberSerializations serializations)
   at ExtendedXmlSerializer.ContentModel.Members.InstanceMemberSerializations.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ContentModel.Members.MemberedContents.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.Core.Sources.ConditionalSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.ContentModel.Content.Recursion.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.Core.Sources.DecoratedSource`2.Get(TParameter parameter)
   at ExtendedXmlSerializer.ExtensionMethodsForCoreSources.Get[T](IParameterizedSource`2 this, Type parameter)
   at ExtendedXmlSerializer.ExtensionModel.Types.NullableStructureAwareExtension.NullableStructureAwareContents.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ExtensionModel.Xml.CustomSerializationExtension.Contents.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.Core.Sources.Cache`2.Create(TKey parameter)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ExtendedXmlSerializer.Core.Sources.CacheBase`2.Get(TKey key)
   at ExtendedXmlSerializer.ExtensionModel.References.DeferredContents.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ContentModel.Content.Serializers.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ExtensionModel.References.ReferenceAwareSerializers.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ContentModel.Content.DynamicAwareSerializers.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.ExtensionModel.RootInstanceExtension.Serializers.Get(TypeInfo parameter)
   at ExtendedXmlSerializer.Core.Sources.Cache`2.Create(TKey parameter)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ExtendedXmlSerializer.Core.Sources.CacheBase`2.Get(TKey key)
   at ExtendedXmlSerializer.ExtensionMethodsForCoreSources.Get[T](IParameterizedSource`2 this, Type parameter)
   at ExtendedXmlSerializer.ExtensionModel.Xml.Write.Execute(Writing parameter)
   at ExtendedXmlSerializer.ExtensionModel.Xml.Serializer.Serialize(XmlWriter writer, Object instance)
   at ExtendedXmlSerializer.ExtensionModel.Xml.ExtendedXmlSerializer.Serialize(XmlWriter writer, Object instance)
   at ExtendedXmlSerializer.ExtensionModel.Xml.InstanceFormatter.Get(Object parameter)
   at ExtendedXmlSerializer.ExtensionMethodsForSerialization.Serialize(IExtendedXmlSerializer this, IXmlWriterFactory factory, Func`1 stream, Object instance)
   at ExtendedXmlSerializer.ExtensionMethodsForSerialization.Serialize(IExtendedXmlSerializer this, XmlWriterSettings settings, Object instance)
   at XLF.Win.Framework.Compress.CompressObject[T](T value) in c:\SourceCode\XLF\XLF.Architect\Presentation\XLF.Win.Framework\Compress.cs:line 33
   at XLF.Services.DB.UserService.Verify(String userName, String password, String cvrno) in c:\SourceCode\XLF\XLF.Architect\Services\XLF.Services.DB\Authorization\UserService.cs:line 829
   at DynamicModule.ns.Wrapped_IUserService_2b4897a7862d4953b3bd4134a22185f3.<Verify_DelegateImplementation>__0(IMethodInvocation inputs, GetNextInterceptionBehaviorDelegate getNext)

Let me know if you need other information or I can do anything

@Mike-E-angelo
Copy link
Member

Hi @germsen thanks for writing in and reporting this. Are you able to say if this occurs when data is not applied? That is, if you try to serialize an empty (simply activated via new) instance, does this problem occur?

Unfortunately, it's not exactly possible to see what's happening via a stack trace, just that it's happening. If you are able to provide a simple reproduction with some basic code I can take a further look into it for you.

@germsen
Copy link
Author

germsen commented Aug 2, 2021 via email

@Mike-E-angelo
Copy link
Member

OK, no worries @germsen I am a bit slammed with time too, per #383. However, if you do manage to somehow find time and are able to get a reproducible project/code at some point, I will do my best to see if I can help you. 👍

@Mike-E-angelo
Copy link
Member

Going through the issues here. If you do manage to produce a project that reproduces the issue I can take a further look into this for you. Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants