Closed GoogleCodeExporter closed 9 years ago
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
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 maciej.p...@gmail.com
on 2 Dec 2008 at 3:05
Attachments:
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 maciej.p...@gmail.com
on 3 Dec 2008 at 9:07
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
Well, the software now runs for 2 days without this error - so maybe the
thread-safety is the issue here.
Original comment by maciej.p...@gmail.com
on 4 Dec 2008 at 9:10
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
Original comment by marc.gravell
on 9 Dec 2008 at 8:35
Closed (verified)
Original comment by marc.gravell
on 6 Jan 2009 at 7:51
Original issue reported on code.google.com by
maciej.p...@gmail.com
on 2 Dec 2008 at 10:17