Comments (8)
Is there any specific scenario that reproduces this? I wonder (for example)
whether
it is something to do with list-properties where the bespoke list doesn't have
a
default constructor...
I can try to investigate, but very hard without a reproducable scenario.
Original comment by marc.gravell
on 2 Dec 2008 at 12:11
from protobuf-net.
I tried to reproduce it, but it really happens occasionally. I've attached
definitions of my objects, maybe this will help. Each message is sent in Message
object. Each message has 'bytes payload', which is another ProtoBuf serialized
message. The error occurs when deserializing payload content (always). It
cannot be
null (if it was, earlier functions would throw appropriate exception) even if I
tried
to pass null, byte[0] the outcome was completely different. Payload contains
either
ObjectHubResponse or RequestMessages
Original comment by [email protected]
on 2 Dec 2008 at 3:05
Attachments:
from protobuf-net.
OK I think I've got the problem. As I've mentioned the problem happened
occasionally.
My environment is multithreaded with Protobuf.Serializer called from different
threads possibly at the same time. I wrongly assumed that since Serializer is
static
it's thread-safe but it's not. Now I've created utility class that serializes
access
to Serializer. So far so good :)
Original comment by [email protected]
on 3 Dec 2008 at 9:07
from protobuf-net.
Really? That is curious! It *should* be thread-safe. It is intended to be. I
will
investigate, but I can't think (without looking) why this would happen... the
only
thing (without checking) that could break this would be the Build() method
which
constructs the strategy per-type, but that should still be safe!
I will *definitely* look at this on the train tomorrow!
Thanks for the update.
Original comment by marc.gravell
on 3 Dec 2008 at 10:59
- Changed state: Started
from protobuf-net.
Well, the software now runs for 2 days without this error - so maybe the
thread-safety is the issue here.
Original comment by [email protected]
on 4 Dec 2008 at 9:10
from protobuf-net.
I'm happy to believe you - I am investigating. Thanks for reporting this.
Original comment by marc.gravell
on 4 Dec 2008 at 9:29
from protobuf-net.
Original comment by marc.gravell
on 9 Dec 2008 at 8:35
- Changed state: Fixed
from protobuf-net.
Closed (verified)
Original comment by marc.gravell
on 6 Jan 2009 at 7:51
- Changed state: Verified
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.