Instance with invalid (NULL) class pointer

I’ve tried your configuration file, it was also ok for me. I think you’ve set the rtsp source type incorrectly. When I changed it to type=4 I got this error again with the same rtsp sources after 4.5 hours.

It much faster to get this error with batch-size=1. Also you can try to run with this config:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1

[tiled-display]
enable=1
rows=2
columns=2
width=1280
height=720

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://rtsp_stream
rtsp-reconnect-interval-sec=5
num-sources=1
gpu-id=0
cudadec-memtype=0

[source1]
enable=1
type=4
uri=rtsp://rtsp_stream
num-sources=1
gpu-id=0
cudadec-memtype=0

[source2]
enable=1
type=4
uri=rtsp://rtsp_stream
rtsp-reconnect-interval-sec=5
num-sources=1
gpu-id=0
cudadec-memtype=0

[source3]
enable=1
type=4
uri=rtsp://rtsp_stream
rtsp-reconnect-interval-sec=5
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=1
sync=0
gpu-id=0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=1
batch-size=1
batched-push-timeout=1000000
## Set muxer output width and height
width=640
height=360

[primary-gie]
enable=1
gpu-id=0
# Modify as necessary
batch-size=1
interval=0
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
gie-unique-id=1
config-file=yolo/config_infer_primary_yoloV7.txt

Also I noticed that for interval= 0-2 I get a message like:

** WARN: <watch_source_status:738>: No data from source 3 since last 5 sec. Trying reconnection
NVMEDIA: NVMEDIABufferProcessing: 1099: Consume the extra signalling for EOS 

But for interval=3 I no longer have this message and it gets the error faster (in 40 minutes) than in the first case.

Also with this configuration I don’t have an error after 12 hours:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1
#gie-kitti-output-dir=streamscl

[tiled-display]
enable=1
rows=2
columns=2
width=1280
height=720

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://rtsp_source
num-sources=1
gpu-id=0
cudadec-memtype=0

[source1]
enable=1
type=4
uri=rtsp://rtsp_source
num-sources=1
gpu-id=0
cudadec-memtype=0

[source2]
enable=1
type=4
uri=rtsp://rtsp_source
num-sources=1
gpu-id=0
cudadec-memtype=0

[source3]
enable=1
type=4
uri=rtsp://rtsp_source
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=1
sync=0
gpu-id=0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=1
batch-size=4
batched-push-timeout=1000000
## Set muxer output width and height
width=640
height=360

[primary-gie]
enable=1
gpu-id=0
# Modify as necessary
batch-size=4
interval=0
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
gie-unique-id=1
config-file=yolo/config_infer_primary_yoloV7.txt

I still can’t reproduce after setting type to 3, compared with my last test, here is the logs:
2.zip (106.7 KB)
2. can you highlight your modification compared with your last modification?

Now I tried to change stream to public RTSP stream: rtsp://rtsp.stream/pattern and after 8 hours it doesn’t crash. May be there is some problem with my IP camera? Below are my IP camera settings.
image

Modification between this

and this

is difference in batch-size and in a first config I removed rtsp-reconnect-interval-sec=5 lines.

I tried to change codec to H.264 and delay to medium in my IP camera settings, but there is no result.

what does this mean? please monitor the CPU and memory usage when test.

It means the error is still there.

I tried to do this second time and get an error after 26 hours.

Ok, next time I will try to track CPU usage and memory also.

Now I am trying to run this config again. After 17 hours it still works without the error.

After 48 hours it’s still working. Yeah, it seems that main problem in batch-size. I will now change it to 1 and monitor memory usage and share logs later.

Thanks for sharing, Is this still an issue to support? Thanks

I have done two experiments. I first changed the batch size to 1, but after 30 hours I didn’t have any errors. Then I added the line ‘rtsp-reconnect-interval-sec=5’ for each camera and after 26 hours I got an error. I attached the results of experiments with logs and memory statistics here.

test1.zip (1.3 MB)
test2.zip (1.3 MB)

  1. is this your custom code? what is the difference between this code and GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.1.1 / 6.1 / 6.0.1 / 6.0 configuration for YOLO models?
  2. dose the two test use the same rtsp source, from the test1’s log, there is no any rtsp error, but from the test2’s logs, there are many rtsp errors, like this: ServerInternal (500)
  1. No it’s not a custom code. This is default deepstream-app with YOLOv7 from that repository.
  2. No rtsp source is the same in both cases.
  1. from the test2’s memory logs, sometimes the system only has 200kB memory, this will let application not stable.
  2. to narrow down this issue, can you use gdb to debug this crash? you can get the stack when crash.

Sorry, can you explain how to use gdb to debug this?

gdb ./app is use to start application, set args is used to set parameters after start the application, like this:
set args lpr_app_infer_ch_config.yml

Sorry, for now I’m just waiting for application crash. It takes time.