anerjan / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

DynamicType + Arrays results in "Internal error; a missing key occurred" #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an e-mail address if this might need a dialogue!
fasdewx at gmail
==============

What steps will reproduce the problem?
Attempting to deserialise an array of objects which each hold an item with 
DynamicType=true. Array must be longer than 1 item to get exception. See 
attached code.

What is the expected output? What do you see instead?
Expected: Array deserialises a-ok.
Actual: Deserialisation results in exception "Internal error; a missing key 
occurred"

What version of the product are you using? On what operating system?
v2 r450 beta dll. Win7 64bit. Reproducible in .NET and Silverlight 5 beta

Please provide any additional information below.
In very similar scenarios (with additional levels of inheritance) I have also 
recieved the message "Internal error; a key mismatch occurred". This error 
seems difficult to reproduce as a demo, though.

Original issue reported on code.google.com by fasd...@gmail.com on 2 Nov 2011 at 12:14

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report. I'm busy preparing for Oredev 2011 currently, but I will 
investigate shortly after.

Original comment by marc.gravell on 2 Nov 2011 at 8:29

GoogleCodeExporter commented 9 years ago
Okay, thanks mate :)

Original comment by fasd...@gmail.com on 2 Nov 2011 at 10:23

GoogleCodeExporter commented 9 years ago
I'm facing exactly the same problem.

In this case is a list holding objects. Each object has one field with 
DynamicType=true.

I've tried using "Add" but there isn't any overload that allows you to set the 
type of the member being added. So I created one for the time being (see the 
patch attached).

Setting the type it works :)

Original comment by j.go...@pamediakopes.gr on 28 Dec 2011 at 4:42

Attachments:

GoogleCodeExporter commented 9 years ago
I have a project which depends on the patch provided in comment #3. Is there an 
alternative solution or any reason it's not been integrated into the official 
build?

Original comment by simon.mo...@gmail.com on 16 Nov 2012 at 7:44

GoogleCodeExporter commented 9 years ago
Bump?

Original comment by simon.mo...@gmail.com on 25 Feb 2013 at 8:43