I have recently trained my own cascade classifier to detect bricks using the opencv traincascade application, following all the relevant steps. After the training, I took the generated cascade.xml file and put it in my code. The code gets stuck at the "detectMultiScale" function when it is called using the trained cascade (Using a video). When a test with other cascades like After the training, haarcascade_frontalface_default.xml or haarcascade_eye.xml it has no problem.
System information (version) OpenCV => 4.1.0 Operating System / Pla => Centos 7 Python 3.6