I am using the CompactFramework 3.5 version of protobuf-net and
debugging in the Arm emulator.  We have an abstract Message class with
50 child classes.  So our Message class has 50 ProtoInclude attributes
on it defining all direct child classes.  And all public properties in
the parent and children have ProtoMember attributes.
When we first call
ProtoBuf.Serializer.SerializeWithLengthPrefix<Message>, it appears to
loop through all the child classes and referenced classes and build
some sort of serializer object.  During this process, I get a
MissingMethodException when PropertyFactory.Create<T> is calling
CreateProperty<T>.

What's strange is that it works on the first 120 or so times through
Create<T>.  In fact, if I reduce my classes down to around 40, my
application works.  And it doesn't matter which classes I remove, just
that I get the size down some.

It is very consistent.  For a particular set of classes, it always
exceptions on the same property in the same class.

I'm not sure what could cause this.  It doesn't seem to be consistent
with a MissingMethodException as the DLL is loaded and working fine.
If it is helpful, I can zip it up and someone the class set.

Bryan


Mar 10, 13:53:24, Got unhandled exception, exiting:
MissingMethodException
Stack Trace:
   at ProtoBuf.Property.PropertyFactory.Create[T](MemberInfo member)
   at ProtoBuf.Serializer`1.Build()
   at ProtoBuf.Property.PropertyMessageString`4.OnAfterInit()
   at ProtoBuf.Property.Property`1.InitPrivate(Int32 tag, DataFormat
dataFormat, Boolean isOptional, MemberInfo member, Delegate getValue,
Delegate setValue, Object defaultValue)
   at ProtoBuf.Property.Property`1.Init(Int32 tag, DataFormat format,
Delegate getValue, Delegate setValue, Boolean isOptional, Object
defaultValue)
   at ProtoBuf.Serializer`1.Build()
   at ProtoBuf.Serializer`1.SerializeChecked(Transaction instance,
SerializationContext destination)
   at ProtoBuf.SerializerItemProxy`2.Serialize(Transaction instance,
SerializationContext destination)
   at ProtoBuf.SerializerProxy`1.Serialize(Transaction instance,
Stream destination)
   at ProtoBuf.Serializer.Serialize[T](Stream destination, Transaction
instance)
   at ProtoBuf.Serializer.SerializeWithLengthPrefix[T](Stream
destination, Transaction instance, PrefixStyle style, Int32 tag)
   at ProtoBuf.Serializer.SerializeWithLengthPrefix[T](Stream
destination, Transaction instance, PrefixStyle style)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to