Skip to content

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

@takekazuomi

Description

@takekazuomi

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

Activity

yfakariya

yfakariya commented on Apr 13, 2014

@yfakariya
Member

Hi. Sorry for delay.

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

takekazuomi

takekazuomi commented on Apr 13, 2014

@takekazuomi
Author

thanks

yfakariya

yfakariya commented on Sep 6, 2014

@yfakariya
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDetected as bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @takekazuomi@yfakariya

        Issue actions

          can not unpack the IDictionary<string, string> in 0.4.3 · Issue #27 · msgpack/msgpack-cli