Custom payload schema with nvmsgconv.cpp - weird output string instead of JSON

Okay, I made some progress.

the config line msg-conv-msg2p-lib=/opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so references the libnvds_msgconv.so file within the Docker container file system, not my custom libnvds_msgconv.so within Jetson device!

I mounted my libnvds_msgconv.so as a volume for docker and pointed the config to the file.
But it failed, the app would not start (see the error at the bottom of this post).

I thought I made some mistakes in code before compiling, so I once again compiled the default, unmodified files in the /opt/nvidia/deepstream/deepstream/sources/libs/nvdsmsgconv/ directory. Mounted the file, and it failed again.

And so I thought it might be a problem with mounting the file to Docker container but when I mounted the original libnvds_msgconv.so file (the one you can find in /opt/nvidia/deepstream/deepstream/lib) - it worked.

So there must be an issue with compiling - even using the default files with no modifications.
BTW, the original libnvds_msgconv.so is ~1.4M in size, my compiled files are ~2.1M in size.

Here’s the error I get when using the compiled libnvds_msgconv.so:

(deepstream-test5-app:1): GLib-CRITICAL **: 12:42:32.798: g_strrstr: assertion 'haystack != NULL' failed
nvds_msgapi_connect : connect success
Opening in BLOCKING MODE 
** ERROR: <main:1504>: Failed to set pipeline to PAUSED
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
ERROR from sink_sub_bin_transform1: Could not initialize supporting library.
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvmsgconv/gstnvmsgconv.c(410): gst_nvmsgconv_start (): /GstPipeline:pipeline/GstBin:sink_sub_bin1/GstNvMsgConv:sink_sub_bin_transform1:
unable to open converter library
Disconnecting Azure..
App run failed

Not quite sure how to proceed now :(