Stack overflow crash when a pipeline is cleared and recreated many times

A RTSP pipeline is running with Qt5 sink. Cameras may be switched many times.
When camera URLs change, the pipeline will be destroyed first and then recreated.
After about 100 times changes, stack overflow crash occurs. What could cause this problem? How to fix it? No backtrace for this bug.

Without more information there’s nothing actionable here. You’d have to get a backtrace of the crash at least, or ideally provide a testcase to (more or less) reliably reproduce the problem.

This happens on Ubuntu 22.04 with gstreamer 1.22.5. I will try to make a small test case for this issue.