Query Related cvDestroyWindow : Error-Can't destroy non-registered window

I am using Opencv version 4.0, I manually installed in linux system, Also I put source code of opencv from drive also

I have installed using following steps on Linux machine :
I used following first then I uninstalled and installed again with gtk package
cmake -D CMAKE_BUILD_TYPE=RELEASE -D
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_GTK=ON

to build and install:
make -j8
make install

I used following command line to build:
g++ SilhDetector.cpp View.cpp Experiment.cpp main.cpp -lopencv_core -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -fopenmp -o FScommandline.exe -I/usr/local/include/opencv4 -I/home/towerlab/Downloads/OpenCv34/opencv/build/include

I re-installed opencv on linux and I also installed all necessary gtk libraries in the system using sudo apt-get install command

But i am getting following error after executing this command line :

FSCommandLine.exe Case_View0.avi 15 Case_View1.avi 15 y -1

Error :

terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.4.0-dev) /home/towerlab/Downloads/opencv/modules/highgui/src/window_gtk.cpp:1274: error: (-215:Assertion failed) found && “Can’t destroy non-registered window” in function ‘cvDestroyWindow’

Can you help me out ? Have you ever encountered the same error ?

Thank You
Regards
Himali Munshi