You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated from the SAEJ2735 2016 specification using the new v0.9.29 compiler. The code looks good and compiles, but I am having trouble with one of the types, MessageFrame. That type is new to J2735 2016 and is really a container frame for any other type. The code generated produces a CHOICE union called value, but it seems that encoding that type fails. I took a known UPER encoded set of bytes (00130b0000003781000000000005), and it seems to decode with uper_decode_complete just fine to the MessageFrame (see Decoding MessageFrame as SEQUENCE.txt and the XER encoding in MessageFrame.txt). However, that same structure was passed into the uper_encode_to_buffer, and it fails to encode. (see Encoding MessageFrame.txt). For comparison, I took a SPAT message based on the 2014 XML (removing unused elements), and was able to XER decode to the structure, which was then encoded as UPER, decoded back to a new structure, then encoded again with UPER. Everything worked fine for that structure (see SPAT 2016 Encode_Decode_Encode Test.txt) and the bytes looked identical and the XER output looked identical. I then, tried to do the exact same test using the XML tags around that same SPAT, and it SEG faults trying to XER decode.
Relavent stack trace
#0 0x0000000000000000 in ?? () #1 0x00007ffff74deb6e in SEQUENCE_decode_xer (opt_codec_ctx=0x7fffffffda60, td=0x7342c0 <asn_DEF_MessageFrame>, struct_ptr=0x7fffffffdab8, opt_mname=0x0, buf_ptr=0x7377bf, size=1754)
at ../src/r63/constr_SEQUENCE.c:676 #2 0x00007ffff74971eb in xer_decode (opt_codec_ctx=0x7fffffffda60, td=0x7342c0 <asn_DEF_MessageFrame>, struct_ptr=0x7fffffffdab8, buffer=0x737798, size=1793) at ../src/r63/xer_decoder.c:37
Note that DER encoding/decoding seems to work great for the MessageFrame, so the problem seems to be UPER and XER related. And it seems to be specific to MessageFrame.
Generated from the SAEJ2735 2016 specification using the new v0.9.29 compiler. The code looks good and compiles, but I am having trouble with one of the types, MessageFrame. That type is new to J2735 2016 and is really a container frame for any other type. The code generated produces a CHOICE union called value, but it seems that encoding that type fails. I took a known UPER encoded set of bytes (00130b0000003781000000000005), and it seems to decode with uper_decode_complete just fine to the MessageFrame (see Decoding MessageFrame as SEQUENCE.txt and the XER encoding in MessageFrame.txt). However, that same structure was passed into the uper_encode_to_buffer, and it fails to encode. (see Encoding MessageFrame.txt). For comparison, I took a SPAT message based on the 2014 XML (removing unused elements), and was able to XER decode to the structure, which was then encoded as UPER, decoded back to a new structure, then encoded again with UPER. Everything worked fine for that structure (see SPAT 2016 Encode_Decode_Encode Test.txt) and the bytes looked identical and the XER output looked identical. I then, tried to do the exact same test using the XML tags around that same SPAT, and it SEG faults trying to XER decode.
Relavent debug output:
XER/SEQUENCE: tcv = 1, ph=0 [MessageFrame] (../src/r63/constr_SEQUENCE.c:711)
XER/SEQUENCE: tcv = 5, ph=1 [MessageFrame] (../src/r63/constr_SEQUENCE.c:711)
XER/SEQUENCE: tcv=5, ph=1, edx=0 (../src/r63/constr_SEQUENCE.c:770)
INTEGER body 2 0x31..0x39 (../src/r63/INTEGER.c:343)
Freeing INTEGER as a primitive type (../src/r63/asn_codecs_prim.c:125)
XER/SEQUENCE phase => 1, step => 1 (../src/r63/constr_SEQUENCE.c:685)
XER/SEQUENCE: tcv = 5, ph=1 [MessageFrame] (../src/r63/constr_SEQUENCE.c:711)
XER/SEQUENCE: tcv=5, ph=1, edx=1 (../src/r63/constr_SEQUENCE.c:770)
Relavent stack trace
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff74deb6e in SEQUENCE_decode_xer (opt_codec_ctx=0x7fffffffda60, td=0x7342c0 <asn_DEF_MessageFrame>, struct_ptr=0x7fffffffdab8, opt_mname=0x0, buf_ptr=0x7377bf, size=1754)
at ../src/r63/constr_SEQUENCE.c:676
#2 0x00007ffff74971eb in xer_decode (opt_codec_ctx=0x7fffffffda60, td=0x7342c0 <asn_DEF_MessageFrame>, struct_ptr=0x7fffffffdab8, buffer=0x737798, size=1793) at ../src/r63/xer_decoder.c:37
Note that DER encoding/decoding seems to work great for the MessageFrame, so the problem seems to be UPER and XER related. And it seems to be specific to MessageFrame.
SPAT 2016 Encode_Decode_Encode Test.txt
Encoding MessageFrame.txt
MessageFrame.txt
Decoding MessageFrame as SEQUENCE.txt
The text was updated successfully, but these errors were encountered: