Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) → GPU
• DeepStream Version → 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version → 7.2
• NVIDIA GPU Driver Version (valid for GPU only) → 455
• Issue Type( questions, new requirements, bugs) → questions/bug
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) increasing the frequency of sending messages (msgbroker) at nvosd probe function
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
Hi all, I am having an issue sending messages every single frame using the msgbroker element in the pipeline. It gives me segmentation fault when i changed frequency → %30 (sending every 30th frame) to %1 (sending every single frame). I suspect there’s something to do with underlying buffer/memory handling. I did not encounter segmentation fault when attaching NVDS_EVENT_MSG_META to the buffer at the tracker source/sink pad.
Below is the code segment containing the line that i’ve changed
# Ideally NVDS_EVENT_MSG_META should be attached to buffer by the
# component implementing detection / recognition logic.
# Here it demonstrates how to use / attach that meta data.
if not (frame_number%1):
# Frequency of messages to be send will be based on use case.
# Here message is being sent for first object every Nth frames.
# Allocating an NvDsEventMsgMeta instance and getting reference
# to it. The underlying memory is not manged by Python so that
# downstream plugins can access it. Otherwise the garbage collector
# will free it when this probe exits.
# send in bbox[top, left, width, height]
msg_meta=pyds.alloc_nvds_event_msg_meta()
msg_meta.bbox.top = obj_meta.rect_params.top
msg_meta.bbox.left = obj_meta.rect_params.left
msg_meta.bbox.width = obj_meta.rect_params.width
msg_meta.bbox.height = obj_meta.rect_params.height
msg_meta.frameId = frame_number
msg_meta.trackingId = long_to_int(obj_meta.object_id)
msg_meta.confidence = obj_meta.confidence
msg_meta = generate_event_msg_meta(msg_meta, obj_meta.class_id)
user_event_meta = pyds.nvds_acquire_user_meta_from_pool(batch_meta)
if(user_event_meta):
user_event_meta.user_meta_data = msg_meta
user_event_meta.base_meta.meta_type = pyds.NvDsMetaType.NVDS_EVENT_MSG_META
# Setting callbacks in the event msg meta. The bindings layer
# will wrap these callables in C functions. Currently only one
# set of callbacks is supported.
pyds.user_copyfunc(user_event_meta, meta_copy_func)
pyds.user_releasefunc(user_event_meta, meta_free_func)
pyds.nvds_add_user_meta_to_frame(frame_meta, user_event_meta)
else:
print("Error in attaching event meta to buffer\n")