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?

TIA,
Salvatore

On Fri, Mar 11, 2016 at 1:03 PM, Iovene, Salvatore
<salvatore.iovene at intel.com> wrote:
> Hi,
> as I'm writing a Cordova/Android plugin on top of the Iotivity Java
> API, things were working fine, when I decided to switch from the
> shipped "simple server" to something more complex, for testing.
>
> As soon as I do OCResource.get, I get the following log plus crash.
>
> Can anybody offer any suggestions?
>
> Thanks in advance,
> Salvatore
>
> D/OIC-JNI ( 9894): OcResource_get
> D/OIC-JNI ( 9894): OnEventListener: new listener
> I/OIC_RI_STACK( 9894): Entering OCDoResource
> D/OIC_CA_CONN_MGR( 9894): CAGenerateToken
> D/OIC_CA_PRTCL_MSG( 9894): token len:8, token:
> D/OIC_CA_PRTCL_MSG( 9894): 47 61 4D 19 D7 A6 7F 9F
> I/OIC_RI_CLIENTCB( 9894): Adding client callback with token
> I/OIC_RI_CLIENTCB( 9894): 47 61 4D 19 D7 A6 7F 9F
> I/OIC_RI_CLIENTCB( 9894): Added Callback for uri : /a/temperature
> D/OIC_RM_UTIL( 9894): IN
> D/OIC_RM_UTIL( 9894): IN
> E/OIC_RM_UTIL( 9894): Invalid input:options
> I/OIC_RM_UTIL( 9894): Route option is not present
> D/OIC_RM_RAP( 9894): IN
> D/OIC_RM_RAP( 9894): createoption dlen 0 slen [0]
> I/OIC_RM_RAP( 9894): Option Length is 5
> D/OIC_RM_RAP( 9894): OUT
> D/OIC_RM_UTIL( 9894): OUT
> D/OIC_CA_CONN_MGR( 9894): CASendRequest
> D/OIC_CA_MSG_HANDLE( 9894): CAPrepareSendData IN
> D/OIC_CA_BWT( 9894): Send request
> D/OIC_CA_BWT( 9894): BlockID is
> D/OIC_CA_BWT( 9894): 47 61 4D 19 D7 A6 7F 9F B7 F8
> D/OIC_CA_BWT( 9894): Send request
> D/OIC_CA_BWT( 9894): BlockID is
> D/OIC_CA_BWT( 9894): 47 61 4D 19 D7 A6 7F 9F B7 F8
> D/OIC_CA_BWT( 9894): There is no block data
> D/OIC_CA_BWT( 9894): payloadLen=0, maxBlockSize=1024
> D/OIC_CA_BWT( 9894): IN-CACreateNewBlockData
> D/OIC_CA_BWT( 9894): BlockID is
> D/OIC_CA_BWT( 9894): 47 61 4D 19 D7 A6 7F 9F B7 F8
> D/OIC_CA_BWT( 9894): OUT-CreateBlockData
> D/OIC_CA_MSG_HANDLE( 9894): normal msg will be sent
> D/OIC_CA_QING( 9894): wake up..
> D/OIC_CA_MSG_HANDLE( 9894): Unicast message
> D/OIC_CA_MSG_HANDLE( 9894): requestInfo is available..
> D/OIC_CA_PRTCL_MSG( 9894): url : coap://[::]//a/temperature
> D/OIC_CA_PRTCL_MSG( 9894): parse Head Opt: 1
> D/OIC_CA_PRTCL_MSG( 9894): Head opt ID: 65524
> D/OIC_CA_PRTCL_MSG( 9894): Head opt data:
> D/OIC_CA_PRTCL_MSG( 9894): Head opt length: 5
> D/OIC_CA_PRTCL_MSG( 9894): transport type: 0, payload size: 0
> D/OIC_CA_PRTCL_MSG( 9894): msgID is 0
> D/OIC_CA_PRTCL_MSG( 9894): gen msg id=26085
> D/OIC_CA_PRTCL_MSG( 9894): messageId in pdu is 26085, 26085
> D/OIC_CA_PRTCL_MSG( 9894): token info token length: 8, token :
> D/OIC_CA_PRTCL_MSG( 9894): 47 61 4D 19 D7 A6 7F 9F
> D/OIC_CA_BWT( 9894): IN-AddBlockOption
> D/OIC_CA_BWT( 9894): previous payload - (null)
> D/OIC_CA_BWT( 9894): BlockID is
> D/OIC_CA_BWT( 9894): 47 61 4D 19 D7 A6 7F 9F B7 F8
> D/OIC_CA_BWT( 9894): IN-GetBlockOptionType
> D/OIC_CA_BWT( 9894): OUT-GetBlockOptionType
> D/OIC_CA_BWT( 9894): no BLOCK option
> D/OIC_CA_BWT( 9894): [a] opt will be added.
> D/OIC_CA_BWT( 9894): [12] pdu length
> D/OIC_CA_BWT( 9894): [temperature] opt will be added.
> D/OIC_CA_BWT( 9894): [14] pdu length
> D/OIC_CA_BWT( 9894): [<] opt will be added.
> D/OIC_CA_BWT( 9894): [26] pdu length
> D/OIC_CA_BWT( 9894): [] opt will be added.
> D/OIC_CA_BWT( 9894): [28] pdu length
> D/OIC_CA_BWT( 9894): [36] pdu length after option
> I/OIC_CA_BWT( 9894): not Blockwise Transfer
> D/OIC_CA_BWT( 9894): OUT-AddBlockOption
> D/OIC_CA_MSG_HANDLE( 9894): PDU Maker - payload : (null)
> D/OIC_CA_MSG_HANDLE( 9894): PDU Maker - type : 1
> D/OIC_CA_MSG_HANDLE( 9894): PDU Maker - code : 1
> D/OIC_CA_MSG_HANDLE( 9894): PDU Maker - token :
> D/OIC_CA_MSG_HANDLE( 9894): 47 61 4D 19 D7 A6 7F 9F
> D/OIC_CA_INF_CTR( 9894): unicast message to adapter
> D/OIC_CA_RETRANS( 9894): sent pdu, msgtype=1, msgid=26085
> D/OIC_CA_RETRANS( 9894): not supported message type
> D/OIC_CA_MSG_HANDLE( 9894): CADestroyData IN
> D/OIC_CA_MSG_HANDLE( 9894): CADestroyData OUT
> D/OIC_CA_QING( 9894): wait..
> D/OIC_CA_QING( 9894): wake up..
> D/OIC_CA_IP_SERVER( 9894): IN
> I/OIC_CA_IP_SERVER( 9894): unicast ipv4 sendTo is successful: 36 bytes
> D/OIC_CA_QING( 9894): wait..
> D/OIC_CA_IP_ADAP( 9894): Address: 192.168.0.104, port:47096
> D/OIC_CA_MSG_HANDLE( 9894): received pdu data :
> D/OIC_CA_MSG_HANDLE( 9894): 58 45 E5 65 47 61 4D 19 D7 A6 7F 9F B1 61 0B 74
> D/OIC_CA_MSG_HANDLE( 9894): 65 6D 70 65 72 61 74 75 72 65 11 3C E4 FE DB 00
> D/OIC_CA_MSG_HANDLE( 9894): 00 00 00 FF 9F BF 63 72 65 70 BF 62 72 74 71 6F
> D/OIC_CA_MSG_HANDLE( 9894): 69 63 2E 72 2E 74 65 6D 70 65 72 61 74 75 72 65
> D/OIC_CA_MSG_HANDLE( 9894): 62 69 64 6B 74 65 6D 70 65 72 61 74 75 72 65 6B
> D/OIC_CA_MSG_HANDLE( 9894): 74 65 6D 70 65 72 61 74 75 72 65 FB 40 39 63 D7
> D/OIC_CA_MSG_HANDLE( 9894): 0A 3D 70 A4 65 75 6E 69 74 73 61 43 65 72 61 6E
> D/OIC_CA_MSG_HANDLE( 9894): 67 65 67 2D 34 30 2C 31 32 35 FF FF FF
> D/OIC_CA_PRTCL_MSG( 9894): pdu parse-transport type : 0
> D/OIC_CA_PRTCL_MSG( 9894): pdu parse ret: 1
> D/OIC_CA_MSG_HANDLE( 9894): code = 205
> D/OIC_CA_MSG_HANDLE( 9894): CAGenerateHandlerData IN
> D/OIC_CA_MSG_HANDLE( 9894): address : 192.168.0.104
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : a
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : temperature
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : <
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element :
> D/OIC_CA_PRTCL_MSG( 9894): inside token length : 8
> D/OIC_CA_PRTCL_MSG( 9894): inside pdu->data
> D/OIC_CA_PRTCL_MSG( 9894): URL length:14
> D/OIC_CA_MSG_HANDLE( 9894): Response Info :
> D/OIC_CA_MSG_HANDLE( 9894): optionID: 65524
> D/OIC_CA_MSG_HANDLE( 9894): list:
> D/OIC_CA_MSG_HANDLE( 9894): payload: 0x9e388700(89)
> D/OIC_CA_MSG_HANDLE( 9894): token:
> D/OIC_CA_MSG_HANDLE( 9894): 47 61 4D 19 D7 A6 7F 9F
> D/OIC_CA_MSG_HANDLE( 9894): msgID: 26085
> D/OIC_CA_MSG_HANDLE( 9894): CAGenerateHandlerData OUT
> D/OIC_CA_RETRANS( 9894): IN
> D/OIC_CA_RETRANS( 9894): received pdu, msgtype=1, msgid=26085, code=205
> D/OIC_CA_BWT( 9894): CAReceiveBlockWiseData
> D/OIC_CA_BWT( 9894): it's normal pdu
> D/OIC_CA_BWT( 9894): BlockID is
> D/OIC_CA_BWT( 9894): 47 61 4D 19 D7 A6 7F 9F B7 F8
> D/OIC_CA_BWT( 9894): CARemoveBlockData
> E/OIC_CA_MSG_HANDLE( 9894): this message does not have block option
> D/OIC_CA_MSG_HANDLE( 9894): response callback : 1
> I/OIC_RI_STACK( 9894): Enter HandleCAResponses
> D/OIC_RM_UTIL( 9894): IN
> D/OIC_RM_UTIL( 9894): IN
> D/OIC_RM_UTIL( 9894): Request- optionID: 65524
> I/OIC_RM_UTIL( 9894): Found Option at 0
> D/OIC_RM_UTIL( 9894): OUT
> D/OIC_RM_UTIL( 9894): OUT
> D/OIC_RI_STACK( 9894): Enter OCHandleResponse
> I/OIC_RI_CLIENTCB( 9894): Looking for token
> I/OIC_RI_CLIENTCB( 9894): 47 61 4D 19 D7 A6 7F 9F
> I/OIC_RI_CLIENTCB( 9894): Found in callback list
> I/OIC_RI_CLIENTCB( 9894): 27 E6 C8 F2 C0 36 F2 04
> I/OIC_RI_CLIENTCB( 9894): FB 2B 37 A4 B3 5D 58 C3
> I/OIC_RI_CLIENTCB( 9894): 47 61 4D 19 D7 A6 7F 9F
> I/OIC_RI_OBSERVE( 9894): Looking for token
> I/OIC_RI_OBSERVE( 9894): 47 61 4D 19 D7 A6 7F 9F
> I/OIC_RI_OBSERVE( 9894): Found token:
> I/OIC_RI_OBSERVE( 9894): Observer node not found!!
> I/OIC_RI_STACK( 9894): There is a cbNode associated with the response token
> I/OIC_RI_STACK( 9894): This is a regular response, A client call back is found
> I/OIC_RI_STACK( 9894): Calling into application address space
> I/OIC_RI_STACK( 9894): Assuming PAYLOAD_TYPE_REPRESENTATION: 1 /a/temperature
> I/OIC_RI_PAYLOADPARSE( 9894): CBOR Parsing size: 89
> D/OIC_CA_IP_ADAP( 9894): Address: 192.168.0.102, port:35658
> D/OIC_CA_MSG_HANDLE( 9894): received pdu data :
> D/OIC_CA_MSG_HANDLE( 9894): 58 01 CB FC 5E E3 DA C4 E0 5F 50 DD B3 6F 69 63
> D/OIC_CA_MSG_HANDLE( 9894): 03 72 65 73 61 3C E4 FE D6 00 00 00 00
> D/OIC_CA_PRTCL_MSG( 9894): pdu parse-transport type : 0
> D/OIC_CA_PRTCL_MSG( 9894): pdu parse ret: 1
> D/OIC_CA_MSG_HANDLE( 9894): code = 1
> D/OIC_CA_MSG_HANDLE( 9894): CAGenerateHandlerData IN
> D/OIC_CA_MSG_HANDLE( 9894): address : 192.168.0.102
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : oic
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : res
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element : <
> D/OIC_CA_PRTCL_MSG( 9894): option[17] has an unsupported format [60]
> D/OIC_CA_PRTCL_MSG( 9894): COAP URI element :
> D/OIC_CA_PRTCL_MSG( 9894): inside token length : 8
> D/OIC_CA_PRTCL_MSG( 9894): URL length:8
> D/OIC_CA_MSG_HANDLE( 9894): Request Info :
> D/OIC_CA_MSG_HANDLE( 9894): optionID: 65524
> D/OIC_CA_MSG_HANDLE( 9894): list:
> D/OIC_CA_MSG_HANDLE( 9894): token:
> D/OIC_CA_MSG_HANDLE( 9894): 5E E3 DA C4 E0 5F 50 DD
> D/OIC_CA_MSG_HANDLE( 9894): msgID: 64715
> D/OIC_CA_MSG_HANDLE( 9894): CAGenerateHandlerData OUT
> D/OIC_CA_BWT( 9894): CAReceiveBlockWiseData
> D/OIC_CA_BWT( 9894): it's normal pdu
> E/OIC_CA_MSG_HANDLE( 9894): this message does not have block option
> I/DEBUG   (  334): [2016-03-11 13:00:14.880]
> I/DEBUG   (  334): *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** *** ***
> I/DEBUG   (  334): Build fingerprint:
> 'lge/g2_open_com/g2:5.0.2/LRX22G/1602583081506:user/release-keys'
> I/DEBUG   (  334): Revision: '10'
> I/DEBUG   (  334): ABI: 'arm'
> I/DEBUG   (  334): pid: 9894, tid: 10033, name: JavaBridge  >>>
> com.example.CordovaPluginOicDemo <<<
> E/DEBUG   (  334): AM write failure (32 / Broken pipe)
> I/DEBUG   (  334): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
> I/DEBUG   (  334): Abort message:
> 'extlibs/tinycbor/tinycbor/src/cborparser.c:679:
> cbor_value_map_find_value: assertion "cbor_value_is_map(map)" failed'
> I/DEBUG   (  334):     r0 00000000  r1 00002731  r2 00000006  r3 00000000
> I/DEBUG   (  334):     r4 92aa8db8  r5 00000006  r6 00000000  r7 0000010c
> I/DEBUG   (  334):     r8 9e384b88  r9 9e384b88  sl b6f2f9fd  fp 92aa8ae4
> I/DEBUG   (  334):     ip 00002731  sp 92aa8a30  lr b6f30231  pc
> b6f54468  cpsr 600f0010
> I/DEBUG   (  334):
> I/DEBUG   (  334): backtrace:
> I/DEBUG   (  334):     #00 pc 00038468  /system/lib/libc.so (tgkill+12)
> I/DEBUG   (  334):     #01 pc 0001422d  /system/lib/libc.so (pthread_kill+52)
> I/DEBUG   (  334):     #02 pc 00014e3f  /system/lib/libc.so (raise+10)
> I/DEBUG   (  334):     #03 pc 000116ad  /system/lib/libc.so
> (__libc_android_abort+36)
> I/DEBUG   (  334):     #04 pc 0000fe4c  /system/lib/libc.so (abort+4)
> I/DEBUG   (  334):     #05 pc 0001295d  /system/lib/libc.so (__libc_fatal+16)
> I/DEBUG   (  334):     #06 pc 00011731  /system/lib/libc.so (__assert2+20)
> I/DEBUG   (  334):     #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)
> I/DEBUG   (  334):     #10 pc 0000cb3c
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so
> (OCHandleResponse+1620)
> I/DEBUG   (  334):     #11 pc 0000d37c
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so
> I/DEBUG   (  334):     #12 pc 00016c7c
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/libconnectivity_abstraction.so
> (CAHandleRequestResponseCallbacks+352)
> I/DEBUG   (  334):     #13 pc 00013970
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/libconnectivity_abstraction.so
> (CAHandleRequestResponse+76)
> I/DEBUG   (  334):     #14 pc 00010750
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboctbstack.so
> (OCProcess+12)
> I/DEBUG   (  334):     #15 pc 0035d120
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboc.so
> (OC::InProcClientWrapper::listeningFunc()+100)
> I/DEBUG   (  334):     #16 pc 0036eb54
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboc.so (void
> std::_Mem_fn<void (OC::InProcClientWrapper::*)()>::operator()<,
> void>(OC::InProcClientWrapper*) const+116)
> I/DEBUG   (  334):     #17 pc 0036e520
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboc.so (void
> std::_Bind_simple<std::_Mem_fn<void (OC::InProcClientWrapper::*)()>
> (OC::InProcClientWrapper*)>::_M_invoke<0u>(std::_Index_tuple<0u>)+88)
> I/DEBUG   (  334):     #18 pc 0036d7cc
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboc.so
> (std::_Bind_simple<std::_Mem_fn<void (OC::InProcClientWrapper::*)()>
> (OC::InProcClientWrapper*)>::operator()()+24)
> I/DEBUG   (  334):     #19 pc 0036d4a0
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/liboc.so
> (std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void
> (OC::InProcClientWrapper::*)()> (OC::InProcClientWrapper*)>
>>::_M_run()+28)
> I/DEBUG   (  334):     #20 pc 00091207
> /data/app/com.example.CordovaPluginOicDemo-1/lib/arm/libgnustl_shared.so
> (execute_native_thread_routine+14)
> I/DEBUG   (  334):     #21 pc 00013a1b  /system/lib/libc.so
> (__pthread_start(void*)+30)
> I/DEBUG   (  334):     #22 pc 00011a0b  /system/lib/libc.so (__start_thread+6)
> I/DEBUG   (  334):
> I/DEBUG   (  334): Tombstone written to: /data/tombstones/tombstone_09
>
>
> --
> Salvatore Iovene <salvatore.iovene at intel.com>
> Linux Software Engineer
> Intel Open Source Technology Center, Finland
> Tel.: +358504804026



-- 
Salvatore Iovene <salvatore.iovene at intel.com>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026

Reply via email to