I am using Valgrind to debug an OpenCV application. My application often stops with Segmentation Fault error. I thought this is related to memory, so I debug it using Valgrind in Eclipse. Unfortunately, when I run the valgrind profile in Eclipse, it returns : cannot connect to X server and valgrind stops executing my application.
According to this post, I have set DISPLAY variable to 0.0, but same behavior still happened. I also tried installing xorg and openbox, but still nothing happened.
The application runs until before I called "cvNamedWindow(WINDOW_TITLE, CV_WINDOW_AUTOSIZE);". On executing the line, Valgrind outputs : cannot connect to X server and then stops.
Based on my previous experience with Valgrind, I expect it will execute the application, and exits when memory problem happened/application terminated, because that is what happened if I run the application normally (Segmentation Fault). Also, thats how I debug multithreading in in an application, previously.
Any help is appreciated. Thanks!