Deepstream

Please provide complete information as applicable to your setup.

• Hardware Platform :Jetson
• DeepStream Version 5.1
• JetPack Version 45

How to safty deepstream python app

i configure a pipeline that work wheel. any time i stop the execution with (ctrl +C) I have to restart Jetson before I restart the app else it will not run.

^CTraceback (most recent call last):

File “run.py”, line 66, in
main(args)
File “run.py”, line 60, in main
ds_meta_rasp_rtsp.tf_ssd_model(args.model)
File “/home/jetsonnano/Dokumente/DS_python_OD_IS/python_app/ds_meta_rasp_rtsp.py”, line 264, in tf_ssd_model
loop.run()
File “/usr/lib/python3/dist-packages/gi/overrides/GLib.py”, line 588, in run
raise KeyboardInterrupt
KeyboardInterrupt

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element pipeline0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element src-elem, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element convertor_src, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element nvmm_caps, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element Stream-muxer, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(python3:7118): GStreamer-CRITICAL **: 15:28:55.864:
Trying to dispose element primary-inference, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

Segmentation fault (core dumped)

and when I try to run it without resatrting the app

NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:656 Failed to create CaptureSession

(python3:8695): GStreamer-CRITICAL **: 15:30:12.084: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed
End-of-stream
I0404 13:30:12.672940 8695 model_repository_manager.cc:837] unloading: ssd_inception_v2_coco_2018_01_28:1
I0404 13:30:12.689219 8695 tensorflow.cc:2063] TRITONBACKEND_ModelInstanceFinalize: delete instance state
I0404 13:30:12.689248 8695 server.cc:280] Waiting for in-flight requests to complete.
I0404 13:30:12.689319 8695 server.cc:295] Timeout 30: Found 1 live models and 0 in-flight non-inference requests
I0404 13:30:12.845171 8695 tensorflow.cc:2001] TRITONBACKEND_ModelFinalize: delete model state
I0404 13:30:12.846358 8695 model_repository_manager.cc:966] successfully unloaded ‘ssd_inception_v2_coco_2018_01_28’ version 1
I0404 13:30:13.689435 8695 server.cc:295] Timeout 29: Found 0 live models and 0 in-flight non-inference requests

You have to handle signal in your python script and set the gstreamer pipeline to correct state in the handler. It is python programming problem.

Thanks you for your Answer.
Its still incomprehensible for me. Please can you help to do that, I need more explanation. Or example code. Please.

This is not deepstream related. You can search python resources with google.

E.G. Handling Unix Signals in Python (stackabuse.com)