On ter?a-feira, 15 de mar?o de 2016 15:12:58 PDT Iovene, Salvatore wrote: > Bumping up and copying Thiago, as the author of tinycbor. The problem > lies somewhere in the fact that tinycbor asserts when the value is not > a map. > > Thiago, what might cause that?
It asserts that it is not a map when you try to decode as a map something that isn't a map. The user of the API needs to check what the contents of the stream is before using the type-specific functions. > > #07 pc 0002f880 > > /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so > > (cbor_value_map_find_value+80) > > I/DEBUG ( 334): #08 pc 0001b99c > > /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so > > I/DEBUG ( 334): #09 pc 00017ebc > > /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so > > (OCParsePayload+312) OCParsePayload and the function it called (#08) have a bug. This sounds like mixing an old version of IoTivity with a new one: we're no longer sending the "rep" map that we used to, so it's possible that the code found "rep", entered it (and failed, but forgot to check for failure) and tried to use as a map. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
