Comments (7)
Can reproduce with sample file. Investigating.
Original comment by marc.gravell
on 17 Mar 2009 at 8:24
from protobuf-net.
I want to vote for this problem. I am also experiencing this issue. It occurs
when
the class hierarchy is above 40-50 inherited classes. The stack trace is like
this:
ProtoBuf.Property.PropertyFactory.Create[T](MemberInfo member)
ProtoBuf.Serializer.Build(1)
ProtoBuf.Serializer.Serialize[T](Stream destination, BooleanValue instance)
I have also seen the exception with this 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(AbstractValue instance,
SerializationContext destination)
at ProtoBuf.SerializerItemProxy`2.Serialize(DateTimeValue instance,
SerializationContext destination)
at ProtoBuf.SerializerProxy`1.Serialize(DateTimeValue instance, Stream destination)
at ProtoBuf.Serializer.Serialize[T](Stream destination, DateTimeValue instance)
The only way to resolve the issue is by excluding members from the inheritance
hierarchy through compiler preprocessor directives.
The error never happens on the desktop framework, only on the compact framework.
Original comment by [email protected]
on 2 Dec 2009 at 3:32
from protobuf-net.
Original comment by marc.gravell
on 22 Apr 2010 at 9:18
- Added labels: Milestone-Release2.0
from protobuf-net.
I was just wondering if there is a release that has this fixed in it. I
believe I am running the latest version and I get this intermittently.
Thanks for any information you can pass along.
Original comment by [email protected]
on 21 Jan 2011 at 4:46
from protobuf-net.
This is a problem with too much generics (internal to protobuf-net). In "v2",
the entire core has been re-written with this is mind, and it should be far
happier on CF (and faster, thanks to full pre-generation of dlls).
Note that this is *NOT* yet fully tested, but you are more than welcome to play
with the "trunk" - note also that the build scripts are not fully tidied at the
moment.
Marc
Original comment by marc.gravell
on 21 Jan 2011 at 7:47
from protobuf-net.
Marc,
I'm another developer working with adondero above. We're not really wanting to
move to v2 until it is released. Do you know of any work-arounds to this? We
only seem to get the problem after some certain number of saved objects has
been reached (within a single run of the application.) Is there any way to
"clean up" the Serializer class? Would dynamically loading and unloading the
protobuf dll make a difference? Any other suggestions?
Thank you,
Steve
Original comment by [email protected]
on 1 Feb 2011 at 11:17
from protobuf-net.
Original comment by marc.gravell
on 2 Nov 2011 at 9:54
- Changed state: Fixed
from protobuf-net.
Related Issues (20)
- Suffix missing for required non-primitive properties HOT 2
- global:: prefix forgot when generate field and property
- Concurrent dictionarys and linked lists goes null on serializing/deserializing.
- Calling GetSchema can cause call to serialize to throw an exception
- Method to detect built-in types
- Await/async proposal HOT 9
- Invalid proto data with TimeSpan via GetSchema() HOT 1
- Please add Windows Phone 8.1 to PCL version HOT 1
- protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll should target v4.0.30319, not v2.0.50727
- Custom serializer works in debug - not in release HOT 5
- Won't build to Windows Phone 8
- Exception due to code in default constructor HOT 3
- I think with 100 runs of same code on same data I can see all exception of protobuf-net !! HOT 5
- Need Help Getting Started HOT 2
- Protobuf.net 'IsDefined' logical bug?
- Deserializing Dictionary<string, List<T>> leads to An element with the same key already exists in the dictionary.
- sub-classes serialization
- Precompiler failed to process asm which targets .NET Framework 3.5
- Value null exception
- Protobuf error System.Xml.Writer wrong assembly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-net.