Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not unpack the IDictionary<string, string> in 0.4.3 #27

Closed
takekazuomi opened this issue Apr 10, 2014 · 3 comments
Closed

can not unpack the IDictionary<string, string> in 0.4.3 #27

takekazuomi opened this issue Apr 10, 2014 · 3 comments
Labels
bug Detected as bug

Comments

@takekazuomi
Copy link

In MsgPack.Cli 0.4.3, I can not unpack the IDictionary<string, string>. It's works in the previous 0.4.2.

By pack such a class, then unpack

public class SomeOne
{
    public string Target;
    public IDictionary<string, string> Data;
}

It is an error such as:

ハンドルされていない例外: System.NullReferenceException: オブジェクト参照がオブジェクト インスタンスに設定されていません。
   場所 MsgPack.Serialization.DefaultSerializers.System_Collections_Generic_KeyValuePair_2MessagePackSerializer`2.UnpackFromCore(Unpacker unpacker)
   場所 MsgPack.Serialization.MessagePackSerializer`1.UnpackFrom(Unpacker unpacker)
   場所 MsgPack.Serialization.UnpackHelpers.UnpackCollectionTo[T](Unpacker unpacker, MessagePackSerializer`1 serializer, IEnumerable`1 collection, Act
ion`1 addition)
   場所 MsgPack.Serialization.EmittingSerializers.Generated.System_Collections_Generic_IDictionary_2_System_String_System_String_Serializer0.UnpackFro
mCore(Unpacker )
   場所 MsgPack.Serialization.UnpackHelpers.InvokeUnpackFrom[T](MessagePackSerializer`1 serializer, Unpacker unpacker)
   場所 MsgPack.Serialization.EmittingSerializers.Generated.TestMsgpackCli001_TestMsgpackCli001_SomeOneSerializer0.UnpackFromCore(Unpacker )
   場所 MsgPack.Serialization.MessagePackSerializer`1.UnpackFrom(Unpacker unpacker)
   場所 MsgPack.Serialization.AutoMessagePackSerializer`1.UnpackFromCore(Unpacker unpacker)
   場所 MsgPack.Serialization.MessagePackSerializer`1.UnpackFrom(Unpacker unpacker)
   場所 MsgPack.Serialization.MessagePackSerializer`1.Unpack(Stream stream)
   場所 TestMsgpackCli001.TestMsgpackCli001.Extentions.UnPack[T](Byte[] data) 場所 c:\GitHub\sandbox\csharp\TestMsgpackCli001\TestMsgpackCli001\Progra
m.cs:行 51
   場所 TestMsgpackCli001.TestMsgpackCli001.Program.Main(String[] args) 場所 c:\GitHub\sandbox\csharp\TestMsgpackCli001\TestMsgpackCli001\Program.cs:
行 31

Reproduce code
https://gist.github.com/takekazuomi/10332165

yfakariya added a commit that referenced this issue Apr 13, 2014
* Collection traits detection does not care about source interface type itself
* Creating delegate in generated code emits wrong method reference due to above wrong traits.
@yfakariya
Copy link
Member

Hi. Sorry for delay.

It is a bug related to interface type handling. I fixed it and released 0.4.4.

@yfakariya yfakariya added the bug label Apr 13, 2014
@takekazuomi
Copy link
Author

thanks

yfakariya added a commit that referenced this issue Apr 28, 2014
* Collection traits detection does not care about source interface type itself
* Creating delegate in generated code emits wrong method reference due to above wrong traits.
@yfakariya
Copy link
Member

Close because this issue seems to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Detected as bug
Projects
None yet
Development

No branches or pull requests

2 participants