question

Upvotes
Accepted
55 2 2 6

rsslEncodeFieldListComplete segfaults.

Hi. I am encoding a market price update message and rsslEncodeFieldListComplete receives SIGSEGV. Any ideas what the cause might be? As far as I can tell I am following the proper sequence of rsslEncodeFieldListInit, rsslEncodeFieldEntry, rsslEncodeFieldListComplete. In gdb, "disas" shows the following line where it segfaulted: "=> 0x0000000001245fcc <+92>: mov %dx,(%rax)". "x $rax" shows the following: "0x0: Cannot access memory at address 0x0". So clearly there is a NULL dereference. Any ideas what I might have done wrong? Thank you very much.


EDIT: I think I have identified the error and am looking into it. For the field entries I was using RSSL_DT_REAL but the values were RsslDoubles. I assume this is likely the cause

EDIT2: I have converted the values to reals. Now the RsslFieldEntry's dataType field is RSSL_DT_REAL and also the third argument to rsslEncodeFieldEntry is the address of a local RsslReal variable. It is still receiving segfault.

#technologycrdmencodingupa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvotes
Accepted
55 2 2 6

I needed the RsslFieldList flags to contain RSSL_FLF_HAS_STANDARD_DATA

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@bneway

Please confirm if this answer is the solution of this issue.

Hi @bneway ,

Could you please provide an information requested?

Thanks,
AHS

Hi @bneway ,

Could you please provide an information requested?

Thanks,
AHS

Hi. Sorry! It was in the fact the answer but I am unable to select it as the answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.